Fix Bug #550: AI修复
This commit is contained in:
@@ -1,274 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="开单时间:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="药品查询:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="输入名称/拼音/编码后回车查询"
|
||||
clearable
|
||||
style="width: 220px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="统计类型:">
|
||||
<el-select
|
||||
v-model="inventoryScope"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in inventoryOptions"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="handleQuery"
|
||||
>查询</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
|
||||
>重置</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="药品编码"
|
||||
align="center"
|
||||
key="medicineNo"
|
||||
prop="medicineNo"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="medicineName"
|
||||
prop="medicineName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="待发数量"
|
||||
align="center"
|
||||
key="dispenseQuantity"
|
||||
prop="dispenseQuantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="处方类型"
|
||||
align="center"
|
||||
key="dispenseEnum_enumText"
|
||||
prop="dispenseEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="病人"
|
||||
align="center"
|
||||
key="patientName"
|
||||
prop="patientName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="处方号"
|
||||
align="center"
|
||||
key="prescriptionNo"
|
||||
prop="prescriptionNo"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="门诊号"
|
||||
align="center"
|
||||
key="outpatientNo"
|
||||
prop="outpatientNo"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="住院号"
|
||||
align="center"
|
||||
key="admissionNo"
|
||||
prop="admissionNo"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="开单时间"
|
||||
align="center"
|
||||
key="createTime"
|
||||
prop="createTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="awaitingMedicineDetails">
|
||||
import {getAwaitingPendingMedicationPageList,} from "./statisticalManagent";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
import {ref} from "vue";
|
||||
|
||||
const userStore = useUserStore();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const inventoryOptions = ref([])
|
||||
const totalAmount = ref(0);
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const inventoryScope = ref("")
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
// startTime:undefined,
|
||||
// endTime: undefined,
|
||||
// inventoryScope: undefined,
|
||||
createTimeSTime:undefined,
|
||||
createTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
watch(
|
||||
() => purchaseinventoryList.value,
|
||||
(newVlaue) => {
|
||||
if(newVlaue&&newVlaue.length>0){
|
||||
handleTotalAmount()
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
/**计算合计金额 */
|
||||
function handleTotalAmount() {
|
||||
totalAmount.value = purchaseinventoryList.value.reduce(
|
||||
(accumulator, currentRow) => {
|
||||
return (accumulator + (Number(currentRow.totalPrice) || 0))
|
||||
},
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
// 统计类型
|
||||
inventoryOptions.value = [
|
||||
{value:1,label:'待发药明细账'},
|
||||
]
|
||||
inventoryScope.value = 1
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getAwaitingPendingMedicationPageList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.createTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.createTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
queryParams.value.createTimeSTime = ""
|
||||
queryParams.value.createTimeETime = ""
|
||||
occurrenceTime.value = ""
|
||||
// inventoryScope.value = ""
|
||||
// 清空查询条件
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,159 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<el-form-item label="药品类别:" prop="itemTypeCode">
|
||||
<el-select multiple v-model="queryParams.itemTypeCode" clearable style="width: 200px">
|
||||
<el-option v-for="category in itemList" :key="category.value" :label="category.label"
|
||||
:value="category.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="选择年份:">
|
||||
<el-date-picker v-model="queryParams.occurrenceTime" type="year" value-format="YYYY" placeholder="选择日期"
|
||||
style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" style="margin-left: 20px; margin-right: 0px; margin-bottom: 5px">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="basicInformationDetailsList" @selection-change="handleSelectionChange"
|
||||
height="calc(100vh - 300px)">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="序号" align="center" key="no" prop="no" width="200" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="数据上报日期" align="center" key="dataReportingDate" prop="dataReportingDate" width="200"
|
||||
:show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.occurrenceTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- itemTable -->
|
||||
<el-table-column label="省级行政区划代码" align="center" key="provinceCodes" prop="provinceCodes" width="200"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="组织机构代码" align="center" key="organizationCode" prop="organizationCode" width="200"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="医疗机构代码" align="center" key="medicalCode" prop="medicalCode" width="200"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="组织机构名称" align="center" key="organizationName" prop="organizationName" width="200"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="年度药品总收入(元)" align="center" key="yearMedicineTotalRevenue" prop="yearMedicineTotalRevenue"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="实有床位数" align="center" key="actualBedsNo" prop="actualBedsNo"
|
||||
:show-overflow-tooltip="true" />
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="basicInformationDetails">
|
||||
import {ElMessage} from 'element-plus';
|
||||
import {getReportBasicInformationDetails,} from './statisticalManagent';
|
||||
import {onMounted} from 'vue';
|
||||
|
||||
const basicInformationDetailsList = ref([]);
|
||||
const loading = ref(false);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const approvalTime = ref([]);
|
||||
const supplierListOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
const occurrenceTime = ref([]);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
occurrenceTimeSTime: undefined,
|
||||
occurrenceTimeETime: undefined,
|
||||
occurrenceTime,
|
||||
itemTypeCode:[]
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { fin_type_code } = proxy.useDict(
|
||||
'fin_type_code'
|
||||
);
|
||||
const itemList = ref([])
|
||||
watch(
|
||||
() => fin_type_code.value, // 监听 fin_type_code 的值变化
|
||||
(newDict) => {
|
||||
// 确保 newDict 是数组(避免初始值为 undefined)
|
||||
if (Array.isArray(newDict) && newDict.length > 0) {
|
||||
itemList.value = newDict.filter(item =>
|
||||
item.label === "西药" || item.label === "中成药" || item.label === "中草药"|| item.label === "外购药品"
|
||||
);
|
||||
}
|
||||
},
|
||||
{ immediate: true } // 组件挂载时立即执行一次(处理字典已缓存的情况)
|
||||
);
|
||||
onMounted(() => {
|
||||
console.log("fin_type_code:",fin_type_code);
|
||||
|
||||
})
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportBasicInformationDetails(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
basicInformationDetailsList.value = res.data
|
||||
});
|
||||
}
|
||||
|
||||
// getList();
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
if(!queryParams.value.itemTypeCode?.length){
|
||||
ElMessage.warning("请选择药品类型")
|
||||
}else if(queryParams.value.occurrenceTime == null){
|
||||
ElMessage.warning("请选择时间")
|
||||
}else {
|
||||
queryParams.value.occurrenceTime = occurrenceTime.value;
|
||||
// queryParams.value.searchKey = row.
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
}
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.occurrenceTime = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
// 导出
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'/report-manage/report/excel-out/1',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`年度药品总收入_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,398 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="药品名称:" prop="searchKey" label-width="120px">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="编码/项目名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="编码:" prop="busNo">
|
||||
<el-input
|
||||
v-model="queryParams.busNo"
|
||||
placeholder="编码:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称:" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="项目名称:"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="项目类型:" prop="categoryType">
|
||||
<el-select
|
||||
v-model="queryParams.categoryType"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in item_category_code"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="盘点日期:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="handleQuery"
|
||||
|
||||
>查询</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
|
||||
>重置</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusno"
|
||||
prop="supplyBusno"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="类型"
|
||||
align="center"
|
||||
key="itemTableText"
|
||||
prop="itemTableText"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="仓库"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="货位"
|
||||
align="center"
|
||||
key="locationStoreName"
|
||||
prop="locationStoreName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购单价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盈亏数量"
|
||||
align="center"
|
||||
key="itemQuantity"
|
||||
prop="itemQuantity"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盈亏金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
key="supplier"
|
||||
prop="supplier"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审核人"
|
||||
align="center"
|
||||
key="approverId_dictText"
|
||||
prop="approverId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单日期"
|
||||
align="center"
|
||||
key="occurrenceTime"
|
||||
prop="occurrenceTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盘点日期"
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</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"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ChkstockPartDetails">
|
||||
import {
|
||||
getInit,
|
||||
getPharmacyCabinetList,
|
||||
getReportStocktakingPage,
|
||||
getReportStocktakingPageAuto,
|
||||
} from "./statisticalManagent";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const chrgitmLv_enumTextOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
// busNo: undefined,
|
||||
// name:undefined,
|
||||
categoryType: undefined,
|
||||
// occurrenceTime:undefined,
|
||||
approvalTimeSTime:undefined,
|
||||
approvalTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
// 监听路由变化
|
||||
watch(
|
||||
() => route.query,
|
||||
(newQuery) => {
|
||||
// 如果路由中包含指定参数,则使用这些参数进行查询
|
||||
if (newQuery.purposeLocationId || newQuery.occurrenceTimeSTime || newQuery.occurrenceTimeETime) {
|
||||
// 设置查询参数
|
||||
if (newQuery.purposeLocationId) {
|
||||
queryParams.value.purposeLocationId = newQuery.purposeLocationId;
|
||||
}
|
||||
if (newQuery.occurrenceTimeSTime) {
|
||||
queryParams.value.occurrenceTimeSTime = newQuery.occurrenceTimeSTime + ' 00:00:00';
|
||||
}
|
||||
if (newQuery.occurrenceTimeETime) {
|
||||
queryParams.value.occurrenceTimeETime = newQuery.occurrenceTimeETime + ' 23:59:59';
|
||||
}
|
||||
|
||||
// 执行查询
|
||||
getList();
|
||||
}else {
|
||||
queryParams.value.purposeLocationId = newQuery.sourceLocationId;
|
||||
queryParams.value.time = newQuery.time + ' 00:00:00';
|
||||
getReportStocktakingPageAuto(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data
|
||||
});
|
||||
getInit().then((response) => {
|
||||
chrgitmLv_enumTextOptions.value = response.data.chrgitmLvOptions
|
||||
})
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
if(!route.query.sourceLocationId) {
|
||||
getReportStocktakingPage(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.approvalTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.approvalTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.approvalTimeSTime = ""
|
||||
queryParams.value.approvalTimeETime = ""
|
||||
occurrenceTime.value = ""
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet("report-manage/stocktaking/excel-out", {
|
||||
...queryParams.value
|
||||
}, `dict_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,228 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<el-form-item label="姓名:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="序号/姓名"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="就诊日期:">
|
||||
<el-date-picker
|
||||
v-model="approvalTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="diseaseList"
|
||||
@selection-change="handleSelectionChange"
|
||||
height="calc(100vh - 300px)"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
key="supplyBusno"
|
||||
prop="supplyBusno"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="姓名"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="性别"
|
||||
align="center"
|
||||
key="genderEnum"
|
||||
prop="genderEnum"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="年龄"
|
||||
align="center"
|
||||
key="age"
|
||||
prop="age"
|
||||
width="140px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="科室"
|
||||
align="center"
|
||||
key="locationId"
|
||||
prop="locationId"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="就诊时间"
|
||||
align="center"
|
||||
key="encounterStartTime"
|
||||
prop="encounterStartTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="身份证号"
|
||||
align="center"
|
||||
key="idCard"
|
||||
prop="idCard"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="电话"
|
||||
align="center"
|
||||
key="phone"
|
||||
prop="phone"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="诊断"
|
||||
align="center"
|
||||
key="conditionId"
|
||||
prop="conditionId"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="diseaseDetails">
|
||||
import {getDiseaseDetails,} from './statisticalManagent';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
|
||||
const diseaseList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const approvalTime = ref([]);
|
||||
const supplierListOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
busNo: undefined,
|
||||
name: undefined,
|
||||
medicationDefId: undefined,
|
||||
department: undefined,
|
||||
purposeLocationId: undefined,
|
||||
categoryType: undefined,
|
||||
supplierId: undefined,
|
||||
occurrenceTimeSTime: undefined,
|
||||
occurrenceTimeETime: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data;
|
||||
});
|
||||
getInboundInit().then((response) => {
|
||||
supplierListOptions.value = response.data.supplierListOptions;
|
||||
});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet(
|
||||
'report-manage/inbound/excel-out',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`dict_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getDiseaseDetails(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
diseaseList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.occurrenceTimeSTime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[0] + ' 00:00:00' : '';
|
||||
queryParams.value.occurrenceTimeETime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[1] + ' 23:59:59' : '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.occurrenceTimeSTime = '';
|
||||
queryParams.value.occurrenceTimeETime = '';
|
||||
approvalTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,167 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="150px">
|
||||
<el-form-item label="项目名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="项目名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="医疗机构名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.medinsName"
|
||||
placeholder="医疗机构名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="drugExpensesGrowthRateList"
|
||||
@selection-change="handleSelectionChange"
|
||||
height="calc(100vh - 300px)"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医疗机构名称"
|
||||
align="center"
|
||||
key="medinsName"
|
||||
prop="medinsName"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="本年度药品支出额(元)"
|
||||
align="center"
|
||||
key="currentYearExpenditure"
|
||||
prop="currentYearExpenditure"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="上一年度药品支出额(元)"
|
||||
align="center"
|
||||
key="lastYearExpenditure"
|
||||
prop="lastYearExpenditure"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="drugExpensesGrowthRate">
|
||||
import {getDrugExpensesGrowthRate} from './statisticalManagent';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const drugExpensesGrowthRateList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams} = toRefs(data);
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet(
|
||||
'report-manage/inbound/excel-out',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`dict_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getDrugExpensesGrowthRate(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
drugExpensesGrowthRateList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.name = '';
|
||||
queryParams.value.medinsName = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,303 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="earlyWarningRef"
|
||||
:inline="true"
|
||||
:rules="rules"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="药品名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入药品名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="效期小于(天):" prop="remainingDays" label-width="150px">
|
||||
<el-input
|
||||
v-model="queryParams.remainingDays"
|
||||
placeholder="请输入效期小于(天)"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="药品类别:" prop="categoryCode">
|
||||
<el-select
|
||||
v-model="queryParams.categoryCode"
|
||||
placeholder="请选择药品类别"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in item_category_code"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="有效期介于:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="库存件数检查">
|
||||
<el-radio-group v-model="queryParams.flg" @change="handleQuery">
|
||||
<el-radio label="1" :value="1">是</el-radio>
|
||||
<el-radio label="0" :value="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="药品类别"
|
||||
align="center"
|
||||
key="categoryCode_dictText"
|
||||
prop="categoryCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="medicineName"
|
||||
prop="medicineName"
|
||||
width="240"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
width="270"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
width="320"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="有效期至"
|
||||
align="center"
|
||||
key="expirationDate"
|
||||
prop="expirationDate"
|
||||
width="165"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.expirationDate) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="效期(天)"
|
||||
align="center"
|
||||
key="remainingDays"
|
||||
prop="remainingDays"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="效期(月)"
|
||||
align="center"
|
||||
key="remainingMonth"
|
||||
prop="remainingMonth"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="库存单位"
|
||||
align="center"
|
||||
key="minUnitCode_dictText"
|
||||
prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="库存量(最小单位)"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="该药总库存(最小单位)"
|
||||
align="center"
|
||||
key="specificationQuantity"
|
||||
prop="specificationQuantity"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小库存警戒量"
|
||||
align="center"
|
||||
key="itemMinQuantity"
|
||||
prop="itemMinQuantity"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最大库存警戒量"
|
||||
align="center"
|
||||
key="itemMaxQuantity"
|
||||
prop="itemMaxQuantity"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="earlyWarning">
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const { item_category_code } = proxy.useDict('item_category_code');
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const occurrenceTime = ref([]);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const supplyTypeOptions = ref(undefined);
|
||||
const supplyStatusOptions = ref(undefined);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
categoryCode: undefined,
|
||||
remainingDays: 180,
|
||||
expirationDateSTime: undefined,
|
||||
expirationDateETime: undefined,
|
||||
flg: undefined,
|
||||
},
|
||||
rules: {
|
||||
remainingMonth: [
|
||||
// { required: true, message: '单次最大剂量不能为空', trigger: 'blur' },
|
||||
{ validator: validateMaxUnit, trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function validateMaxUnit(rule, value, callback) {
|
||||
const numberRegex = /^[0-9]+$/; // 正则表达式,确保输入为数字
|
||||
if (!numberRegex.test(value)) {
|
||||
callback(new Error('请输入有效的数字'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
const params = {
|
||||
...queryParams.value,
|
||||
flg: queryParams.value.flg == 1 ? '1' : null,
|
||||
};
|
||||
// getExpirationWarning(params).then((res) => {
|
||||
// loading.value = false;
|
||||
// purchaseinventoryList.value = res.data.records;
|
||||
// total.value = res.data.total;
|
||||
// });
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
proxy.$refs['earlyWarningRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
queryParams.value.expirationDateSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + ' 00:00:00'
|
||||
: '';
|
||||
queryParams.value.expirationDateETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + ' 23:59:59'
|
||||
: '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.expirationDateSTime = '';
|
||||
queryParams.value.expirationDateETime = '';
|
||||
occurrenceTime.value = '';
|
||||
proxy.resetForm('earlyWarningRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -1,377 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="85px"
|
||||
>
|
||||
<el-form-item label="结算经办机构:" prop="setlOptins" label-width="110px">
|
||||
<el-input
|
||||
v-model="queryParams.setlOptins"
|
||||
placeholder="请输入结算经办机构"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算日期:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="清算类型:" prop="clrType">
|
||||
<el-select
|
||||
v-model="queryParams.clrType"
|
||||
placeholder="请选择清算类型"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in clrTypeOptions"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Edit"
|
||||
@click="handleQuery"
|
||||
>统计</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Edit"
|
||||
@click="handleApplyForLiquidation"
|
||||
>申请清算</el-button
|
||||
>
|
||||
<!-- </el-col> -->
|
||||
</el-row>
|
||||
<div style="margin-bottom:5px">结算笔数:{{counts}}(其中 总费用:{{totalPrice1?totalPrice1.toFixed(2):0}}元, 基金支付金额:{{totalPrice2?totalPrice2.toFixed(2):0}}元, 账户支付金额:{{totalPrice3?totalPrice3.toFixed(2):0}}元,现金支付金额:{{totalPrice4?totalPrice4.toFixed(2):0}}元)</div>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
@row-click="handleRowClick"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="个人编码"
|
||||
align="center"
|
||||
key="psnNo"
|
||||
prop="psnNo"
|
||||
width="190"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="患者姓名"
|
||||
align="center"
|
||||
key="patientName"
|
||||
prop="patientName"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="就诊ID"
|
||||
align="center"
|
||||
key="mdtrtId"
|
||||
prop="mdtrtId"
|
||||
width="270"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="结算ID"
|
||||
align="center"
|
||||
key="setlId"
|
||||
prop="setlId"
|
||||
width="270"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="总费用"
|
||||
align="center"
|
||||
key="medfeeSumamt"
|
||||
prop="medfeeSumamt"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="基金支付金额"
|
||||
align="center"
|
||||
key="fundPaySumamt"
|
||||
prop="fundPaySumamt"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="个人账户金额"
|
||||
align="center"
|
||||
key="acctPay"
|
||||
prop="acctPay"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="结算时间"
|
||||
align="center"
|
||||
key="setlTime"
|
||||
prop="setlTime"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.setlTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
label="是否退费"
|
||||
align="center"
|
||||
key="refdSetlFlag"
|
||||
prop="refdSetlFlag"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.refdSetlFlag==1?'退费':'' }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="150"
|
||||
class-name="small-padding fixed-width"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
link
|
||||
icon="revoked-filled"
|
||||
:disabled="scope.row.id == ''"
|
||||
@click="revokedSelectedRows(scope.row)"
|
||||
>
|
||||
撤销
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="reconciliationDetails">
|
||||
import {applyUnClearing, autoApplyFinancialClearing, reconcileDetailList} from "./statisticalManagent";
|
||||
import {formatDateStr} from '@/utils/index';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(false);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([
|
||||
formatDateStr(getFirstDayOfMonth(new Date()), 'YYYY-MM-DD'), // 当前月份的第一天
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD') // 当天
|
||||
])
|
||||
const clrTypeOptions = ref([]);
|
||||
const filePath = ref("")
|
||||
const purchaseinventoryReturnList = ref([])
|
||||
const loadingReturn = ref(false)
|
||||
const selectedRow = ref([])
|
||||
const counts = ref(0)
|
||||
const totalPrice1 = ref(0)
|
||||
const totalPrice2 = ref(0)
|
||||
const totalPrice3 = ref(0)
|
||||
const totalPrice4 = ref(0)
|
||||
|
||||
const fileSize = ref(10)
|
||||
const uploadList = ref([]);
|
||||
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
||||
const fileType = ref(["zip","txt"]);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
// pageNo: 1,
|
||||
// pageSize: 10,
|
||||
setlOptins: '229900',
|
||||
filePath: undefined,
|
||||
orgId:undefined,
|
||||
clrType: undefined,
|
||||
fileQuryNo: undefined,
|
||||
stmtBegnDate:undefined,
|
||||
stmtEndDate:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
watch(
|
||||
() => purchaseinventoryList.value,
|
||||
(newVlaue) => {
|
||||
if(newVlaue&&newVlaue.length>0){
|
||||
handleTotalAmount()
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.stmtBegnDate =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.stmtEndDate =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
// queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
function getFirstDayOfMonth(date) {
|
||||
return new Date(date.getFullYear(), date.getMonth(), 1);
|
||||
}
|
||||
|
||||
// 对象转成指定字符串分隔
|
||||
function listToString(list, separator) {
|
||||
let strs = "";
|
||||
separator = separator || ",";
|
||||
for (let i in list) {
|
||||
if (list[i].url) {
|
||||
strs += list[i].url + separator;
|
||||
}
|
||||
}
|
||||
return strs != '' ? strs.substr(0, strs.length - 1) : '';
|
||||
}
|
||||
/**计算合计金额 */
|
||||
function handleTotalAmount() {
|
||||
counts.value = purchaseinventoryList.value.length
|
||||
totalPrice1.value = purchaseinventoryList.value.reduce(
|
||||
(accumulator, currentRow) => {
|
||||
return (accumulator + (Number(currentRow.medfeeSumamt) || 0))
|
||||
},
|
||||
0
|
||||
);
|
||||
totalPrice2.value = purchaseinventoryList.value.reduce(
|
||||
(accumulator, currentRow) => {
|
||||
return (accumulator + (Number(currentRow.fundPaySumamt) || 0))
|
||||
},
|
||||
0
|
||||
);
|
||||
totalPrice3.value = purchaseinventoryList.value.reduce(
|
||||
(accumulator, currentRow) => {
|
||||
return (accumulator + (Number(currentRow.acctPay) || 0))
|
||||
},
|
||||
0
|
||||
);
|
||||
// 现金支付金额
|
||||
// totalPrice4.value = purchaseinventoryList.value.reduce(
|
||||
// (accumulator, currentRow) => {
|
||||
// return (accumulator + (Number(currentRow.profitAmount) || 0))
|
||||
// },
|
||||
// 0
|
||||
// );
|
||||
}
|
||||
function getPharmacyCabinetLists() {
|
||||
clrTypeOptions.value = [
|
||||
{ value: 11, label: '门诊' },
|
||||
{ value: 21, label: '住院' },
|
||||
];
|
||||
}
|
||||
function handleSelectionChangeReturn(selection) {
|
||||
idsReturn.value = selection.map((item) => item.id);
|
||||
singleReturn.value = selection.length != 1;
|
||||
multipleReturn.value = !selection.length;
|
||||
}
|
||||
|
||||
function getList() {
|
||||
reconcileDetailList(queryParams.value).then((res) => {
|
||||
// console.log(res,"res----------------")
|
||||
// loading.value = false;
|
||||
// purchaseinventoryList.value = [{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"4.72",insutype:"410",clrType: 11,contractNo:"229900"},{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"7.43",insutype:"410",clrType: 11,contractNo:"229900"},{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"1",insutype:"410",clrType: 11,contractNo:"229900"},{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"-1",insutype:"410",clrType: 11,contractNo:"229900"}]
|
||||
purchaseinventoryList.value = res.data.records ? res.data.records : res.data;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
function handleApplyForLiquidation () {
|
||||
let params = {}
|
||||
params.clrType = queryParams.value.clrType?queryParams.value.clrType:""
|
||||
params.setlOptins = queryParams.value.setlOptins?queryParams.value.setlOptins:""
|
||||
params.stmtBegnDate = queryParams.value.stmtBegnDate?queryParams.value.stmtBegnDate:""
|
||||
params.stmtEndDate = queryParams.value.stmtEndDate?queryParams.value.stmtEndDate:""
|
||||
autoApplyFinancialClearing(params).then((res) => {
|
||||
console.log(res.data,'res----------------');
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
function isAllSelected() {
|
||||
return selectedRow.value.length === purchaseinventoryList.value.length;
|
||||
}
|
||||
|
||||
function revokedSelectedRows(row) {
|
||||
let queryParamsss = {
|
||||
clrAppyEvtId:row.outResult,
|
||||
clroptins:queryParams.value.setlOptins?queryParams.value.setlOptins:"",
|
||||
}
|
||||
applyUnClearing(queryParamsss).then(res => {
|
||||
proxy.$message.success('撤销成功')
|
||||
getList()
|
||||
}).catch(err => {
|
||||
proxy.$message.error('撤销失败')
|
||||
})
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
selectedRow.value = selection
|
||||
console.log(selectedRow.value,"selectedRow.value")
|
||||
ids.value = selection.map((item) => item.setlId);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
//点击列表当前行
|
||||
function handleRowClick(row) {
|
||||
// editRowTK.value = row
|
||||
console.log(row,"row")
|
||||
// if(row.returnStatus==1){
|
||||
// loadingReturn.value = true
|
||||
// generatedReturnDetail(row.supplyBusNo).then((response) => {
|
||||
// purchaseinventoryReturnList.value = response.data
|
||||
// purchaseinventoryReturnList.value.map(k=>{
|
||||
// // k.returnStatus_text = k.returnStatus==1?'已退库':''
|
||||
// k.originalSupplyBusNo = k.originalSupplyBusNo?k.originalSupplyBusNo:row.supplyBusNo
|
||||
// })
|
||||
|
||||
// })
|
||||
// loadingReturn.value = false
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,797 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="90px">
|
||||
<el-form-item label="药品名称" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="药品编码/药品名称/名称拼音"
|
||||
clearable
|
||||
style="width: 260px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="剩余过期天数" prop="remainingDays" label-width="110px">
|
||||
<el-input
|
||||
v-model="queryParams.remainingDays"
|
||||
placeholder="查询 ≤ X 天的记录"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="药品类型" prop="medCategoryCodes">
|
||||
<el-select
|
||||
v-model="queryParams.medCategoryCodes"
|
||||
placeholder="请选择药品类别"
|
||||
clearable
|
||||
multiple
|
||||
filterable
|
||||
style="width: 260px"
|
||||
:collapse-tags="true"
|
||||
:max-collapse-tags="2"
|
||||
@change="handleChangeMedCategoryCode"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in medCategoryCodeOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="耗材类型" prop="devCategoryCodes">
|
||||
<el-select
|
||||
v-model="queryParams.devCategoryCodes"
|
||||
placeholder="请选择耗材类别"
|
||||
clearable
|
||||
multiple
|
||||
filterable
|
||||
style="width: 260px"
|
||||
:collapse-tags="true"
|
||||
:max-collapse-tags="2"
|
||||
@change="handleChangeDeviceCategoryCode"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in deviceCategoryCodeOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="停供状态" prop="inventoryStatusEnum">
|
||||
<el-select
|
||||
v-model="queryParams.inventoryStatusEnum"
|
||||
placeholder="请选择停供状态"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option label="未停供" :value="2" />
|
||||
<el-option label="已停供" :value="3" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="医保等级" prop="chrgitmLv">
|
||||
<el-select
|
||||
v-model="queryParams.chrgitmLv"
|
||||
placeholder="请选择医保等级"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="chrgitmLv_enumText in chrgitmLv_enumTextOptions"
|
||||
:key="chrgitmLv_enumText.value"
|
||||
:label="chrgitmLv_enumText.info"
|
||||
:value="chrgitmLv_enumText.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="库存范围" prop="zeroFlag">
|
||||
<el-select
|
||||
v-model="queryParams.zeroFlag"
|
||||
placeholder="请选择库存范围"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in inventory_range"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库药房" prop="locationId">
|
||||
<el-select
|
||||
v-model="locationId"
|
||||
placeholder="请选择仓库药房"
|
||||
multiple
|
||||
clearable
|
||||
style="width: 260px"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in locationIdList"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商" prop="supplierId">
|
||||
<el-select
|
||||
v-model="supplierId"
|
||||
placeholder="请选择供应商"
|
||||
multiple
|
||||
clearable
|
||||
style="width: 260px"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in supplierList"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备份日期" prop="backUpDate">
|
||||
<el-date-picker
|
||||
v-model="queryParams.backUpDate"
|
||||
type="date"
|
||||
placeholder="请选择备份日期"
|
||||
clearable
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery"> 查询 </el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear"> 重置 </el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Download" @click="handleExport"> 导出Excel </el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
max-height="600"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column label="序号" type="index" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="项目编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="130"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
key="itemName"
|
||||
prop="itemName"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目类别"
|
||||
align="center"
|
||||
key="medCategoryCode_dictText"
|
||||
prop="medCategoryCode_dictText"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.itemTable == 'adm_device_definition'
|
||||
? scope.row.devCategoryCode_dictText
|
||||
: scope.row.medCategoryCode_dictText
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="仓库"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
width="180px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="120px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="库存(包装单位)"
|
||||
align="right"
|
||||
header-align="center"
|
||||
key="quantityUnit"
|
||||
prop="quantityUnit"
|
||||
width="130px"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ formatQuantity(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="库存(最小单位)"
|
||||
align="right"
|
||||
header-align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
width="130px"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.quantity + ' ' + scope.row.minUnitCode_dictText }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="拆零比"
|
||||
align="center"
|
||||
key="partPercent"
|
||||
prop="partPercent"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购价格"
|
||||
align="right"
|
||||
header-align="center"
|
||||
key="purchasePrice"
|
||||
prop="purchasePrice"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ Number(scope.row.purchasePrice || 0).toFixed(3) + ' 元' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="零售价"
|
||||
align="right"
|
||||
header-align="center"
|
||||
key="salePrice"
|
||||
prop="salePrice"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ Number(scope.row.salePrice || 0).toFixed(3) + ' 元' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="进价总额"
|
||||
align="right"
|
||||
header-align="center"
|
||||
key="totalPurchasePrice"
|
||||
prop="totalPurchasePrice"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ Number(scope.row.totalPurchasePrice || 0).toFixed(3) + ' 元' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="零售价总额"
|
||||
align="right"
|
||||
header-align="center"
|
||||
key="totalSalePrice"
|
||||
prop="totalSalePrice"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ Number(scope.row.totalSalePrice || 0).toFixed(3) + ' 元' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="剂型"
|
||||
align="center"
|
||||
key="doseFormCode_dictText"
|
||||
prop="doseFormCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.doseFormCode_dictText || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="国药准字"
|
||||
align="center"
|
||||
key="approvalNumber"
|
||||
prop="approvalNumber"
|
||||
width="165"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.approvalNumber || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
key="supplierName"
|
||||
prop="supplierName"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保等级"
|
||||
align="center"
|
||||
key="chrgitmLv_enumText"
|
||||
prop="chrgitmLv_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产日期"
|
||||
align="center"
|
||||
key="productionDate"
|
||||
prop="productionDate"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ formatDateStr(scope.row.productionDate, 'YYYY-MM-DD') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="有效期至"
|
||||
align="center"
|
||||
key="expirationDate"
|
||||
prop="expirationDate"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ formatDateStr(scope.row.expirationDate, 'YYYY-MM-DD') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="剩余过期天数"
|
||||
align="center"
|
||||
key="remainingDays"
|
||||
prop="remainingDays"
|
||||
width="110px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="货位"
|
||||
align="center"
|
||||
key="locationStoreName"
|
||||
prop="locationStoreName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="停供状态"
|
||||
align="center"
|
||||
key="inventoryStatusEnum_enumText"
|
||||
prop="inventoryStatusEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="180"
|
||||
fixed="right"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<!-- 停供/停用3,取消停供/启用2 -->
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handlestopcancelSupply(scope.row)"
|
||||
v-if="scope.row.inventoryStatusEnum == 2"
|
||||
>停供</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handlestopcancelSupply(scope.row)"
|
||||
v-if="scope.row.inventoryStatusEnum == 3"
|
||||
>取消停供</el-button
|
||||
>
|
||||
<el-button link type="primary" icon="Edit" @click="handleOpenPage(scope.row)"
|
||||
>追溯码</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="float: right; margin-top: 10px; margin-right: 10px">
|
||||
<span class="descriptions-item-label"> 进价合计金额:{{ salePriceTotal.toFixed(4) }} </span>
|
||||
<span class="descriptions-item-label"> 零售价合计金额:{{ priceTotal.toFixed(4) }} </span>
|
||||
</div>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
:style="'margin-top: 35px;'"
|
||||
@pagination="paginationList"
|
||||
/>
|
||||
<el-dialog
|
||||
title="药品追溯码"
|
||||
v-model="visible"
|
||||
width="1400"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
:draggable="true"
|
||||
>
|
||||
<traceabilityCodeManagement :recordInfo="recordInfo"></traceabilityCodeManagement>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="StatisticalManagement">
|
||||
import {
|
||||
cancelSupply,
|
||||
getInit,
|
||||
getPharmacyCabinetList,
|
||||
getproductReturnBackUpPage,
|
||||
getproductReturnPage,
|
||||
productBackupPageTotal,
|
||||
productPageTotal,
|
||||
stopSupply,
|
||||
} from './statisticalManagent';
|
||||
import traceabilityCodeManagement from './traceabilityCodeManagement.vue';
|
||||
import {formatDateStr} from '@/utils/index';
|
||||
import {getSupplierList} from '@/api/public';
|
||||
import {useStore} from '@/store/store';
|
||||
import {computed, watch} from 'vue';
|
||||
|
||||
const store = useStore();
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const { item_category_code, inventory_range, device_category_code, med_category_code } =
|
||||
proxy.useDict(
|
||||
'item_category_code',
|
||||
'inventory_range',
|
||||
'med_category_code',
|
||||
'device_category_code'
|
||||
);
|
||||
const medCategoryCodeOptions = computed(() => {
|
||||
return [{ value: 'all', label: '全部' }, ...med_category_code.value];
|
||||
});
|
||||
const deviceCategoryCodeOptions = computed(() => {
|
||||
return [{ value: 'all', label: '全部' }, ...device_category_code.value];
|
||||
});
|
||||
const purchaseinventoryList = ref([]);
|
||||
const visible = ref(false);
|
||||
const recordInfo = ref({});
|
||||
const route = useRoute();
|
||||
|
||||
const loading = ref(true);
|
||||
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const salePriceTotal = ref(0);
|
||||
const priceTotal = ref(0);
|
||||
const chrgitmLv_enumTextOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
const supplierList = ref([]);
|
||||
const locationId = ref([]);
|
||||
const supplierId = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
remainingDays: undefined,
|
||||
categoryCode: [],
|
||||
chrgitmLv: undefined,
|
||||
zeroFlag: undefined,
|
||||
locationId: undefined,
|
||||
medCategoryCodes: [],
|
||||
devCategoryCodes: [],
|
||||
backUpDate: undefined,
|
||||
inventoryStatusEnum: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
watch(
|
||||
() => store.remainingDays,
|
||||
(newValue) => {
|
||||
if (newValue) {
|
||||
queryParams.value.remainingDays = newValue;
|
||||
handleQuery(); // 触发查询
|
||||
store.clearRemainingDays(); // 清除值
|
||||
}
|
||||
},
|
||||
{ immediate: true } // 修正拼写错误
|
||||
);
|
||||
watch(
|
||||
() => queryParams.value.backUpDate,
|
||||
(newValue, oldValue) => {
|
||||
// 只在值真正变化时触发,避免初始化时触发
|
||||
if (newValue !== oldValue) {
|
||||
if (newValue) {
|
||||
getBackUpList();
|
||||
} else if (oldValue !== undefined) {
|
||||
// 只有当之前有值,现在清空时才调用 getList
|
||||
getList();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
const paginationList = computed(() => {
|
||||
if (queryParams.value.backUpDate) {
|
||||
return getBackUpList();
|
||||
}
|
||||
return getList();
|
||||
});
|
||||
function handleChangeMedCategoryCode(value) {
|
||||
// 如果选择的value等于"全部"(all),则全部选中
|
||||
if (value && value.includes('all')) {
|
||||
// 获取所有选项的值(排除"全部"本身,因为"全部"只是触发全选的选项)
|
||||
const allValues = medCategoryCodeOptions.value
|
||||
.filter((item) => item.value !== 'all')
|
||||
.map((item) => item.value);
|
||||
// 选中所有实际选项(不包含"全部")
|
||||
queryParams.value.medCategoryCodes = allValues;
|
||||
} else {
|
||||
// 如果选择了其他选项,保持当前选择
|
||||
queryParams.value.medCategoryCodes = value || [];
|
||||
}
|
||||
}
|
||||
function handleChangeDeviceCategoryCode(value) {
|
||||
// 如果选择的value等于"全部"(all),则全部选中
|
||||
if (value && value.includes('all')) {
|
||||
// 获取所有选项的值(排除"全部"本身,因为"全部"只是触发全选的选项)
|
||||
const allValues = deviceCategoryCodeOptions.value
|
||||
.filter((item) => item.value !== 'all')
|
||||
.map((item) => item.value);
|
||||
// 选中所有实际选项(不包含"全部")
|
||||
queryParams.value.devCategoryCodes = allValues;
|
||||
} else {
|
||||
// 如果选择了其他选项,保持当前选择
|
||||
queryParams.value.devCategoryCodes = value || [];
|
||||
}
|
||||
}
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data;
|
||||
});
|
||||
getSupplierList().then((response) => {
|
||||
supplierList.value = response.data;
|
||||
});
|
||||
getInit().then((response) => {
|
||||
chrgitmLv_enumTextOptions.value = response.data.chrgitmLvOptions;
|
||||
});
|
||||
}
|
||||
/** 查询备份日期库存明细列表 */
|
||||
function getBackUpList() {
|
||||
loading.value = true;
|
||||
salePriceTotal.value = 0;
|
||||
priceTotal.value = 0;
|
||||
|
||||
const params = {
|
||||
...queryParams.value,
|
||||
locationIds: locationId.value.join(','),
|
||||
supplierIds: supplierId.value.join(','),
|
||||
medCategoryCodes:
|
||||
queryParams.value.medCategoryCodes?.length > 0
|
||||
? queryParams.value.medCategoryCodes.join(',')
|
||||
: undefined,
|
||||
devCategoryCodes:
|
||||
queryParams.value.devCategoryCodes?.length > 0
|
||||
? queryParams.value.devCategoryCodes.join(',')
|
||||
: undefined,
|
||||
backUpDateSTime: queryParams.value.backUpDate + ' 00:00:00' || undefined,
|
||||
backUpDateETime: queryParams.value.backUpDate + ' 23:59:59' || undefined,
|
||||
backUpDate: undefined,
|
||||
};
|
||||
getproductReturnBackUpPage(params).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records;
|
||||
if (purchaseinventoryList.value && purchaseinventoryList.value.length > 0) {
|
||||
purchaseinventoryList.value.map((k, index) => {
|
||||
k.inventoryStatusEnum_enumText =
|
||||
k.inventoryStatusEnum == 2 ? '未停供' : k.inventoryStatusEnum == 3 ? '已停供' : '';
|
||||
k.quantityUnit = k.quantity / k.partPercent;
|
||||
});
|
||||
}
|
||||
total.value = res.data.total;
|
||||
});
|
||||
productBackupPageTotal(params).then((res) => {
|
||||
salePriceTotal.value = res.data.purchasePriceStatistics;
|
||||
priceTotal.value = res.data.salePriceStatistics;
|
||||
});
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
salePriceTotal.value = 0;
|
||||
priceTotal.value = 0;
|
||||
const params = {
|
||||
...queryParams.value,
|
||||
locationIds: locationId.value.join(','),
|
||||
supplierIds: supplierId.value.join(','),
|
||||
medCategoryCodes:
|
||||
queryParams.value.medCategoryCodes?.length > 0
|
||||
? queryParams.value.medCategoryCodes.join(',')
|
||||
: undefined,
|
||||
devCategoryCodes:
|
||||
queryParams.value.devCategoryCodes?.length > 0
|
||||
? queryParams.value.devCategoryCodes.join(',')
|
||||
: undefined,
|
||||
};
|
||||
getproductReturnPage(params).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records;
|
||||
if (purchaseinventoryList.value && purchaseinventoryList.value.length > 0) {
|
||||
purchaseinventoryList.value.map((k, index) => {
|
||||
k.inventoryStatusEnum_enumText =
|
||||
k.inventoryStatusEnum == 2 ? '未停供' : k.inventoryStatusEnum == 3 ? '已停供' : '';
|
||||
k.quantityUnit = k.quantity / k.partPercent;
|
||||
});
|
||||
}
|
||||
total.value = res.data.total;
|
||||
});
|
||||
productPageTotal(params).then((res) => {
|
||||
// 使用 Number() 强制转换,解决字符串问题
|
||||
// 使用 || 0 解决 null/undefined 问题
|
||||
const purchasePrice = res.data?.purchasePriceStatistics;
|
||||
const salePrice = res.data?.salePriceStatistics;
|
||||
|
||||
salePriceTotal.value = Number(purchasePrice || 0);
|
||||
priceTotal.value = Number(salePrice || 0);
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
// queryParams.value.occurrenceTimeSTime =
|
||||
// occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
// ? occurrenceTime.value[0] + " 00:00:00"
|
||||
// : "";
|
||||
// queryParams.value.occurrenceTimeETime =
|
||||
// occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
// ? occurrenceTime.value[1] + " 23:59:59"
|
||||
// : "";
|
||||
queryParams.value.pageNo = 1;
|
||||
if (queryParams.value.backUpDate) {
|
||||
getBackUpList();
|
||||
} else {
|
||||
getList();
|
||||
}
|
||||
}
|
||||
|
||||
function formatQuantity(row) {
|
||||
if (row.remainder > 0) {
|
||||
return (
|
||||
row.number + ' ' + row.unitCode_dictText + row.remainder + ' ' + row.minUnitCode_dictText
|
||||
);
|
||||
} else {
|
||||
return row.number + ' ' + row.unitCode_dictText;
|
||||
}
|
||||
}
|
||||
// 导出
|
||||
function handleExport() {
|
||||
const exportParams = {
|
||||
...queryParams.value,
|
||||
locationIds: locationId.value.join(','),
|
||||
supplierIds: supplierId.value.join(','),
|
||||
medCategoryCodes:
|
||||
queryParams.value.medCategoryCodes?.length > 0
|
||||
? queryParams.value.medCategoryCodes.join(',')
|
||||
: undefined,
|
||||
devCategoryCodes:
|
||||
queryParams.value.devCategoryCodes?.length > 0
|
||||
? queryParams.value.devCategoryCodes.join(',')
|
||||
: undefined,
|
||||
};
|
||||
proxy.downloadGet(
|
||||
'/inventory-manage/product/excel-out',
|
||||
exportParams,
|
||||
`库存明细记录_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
proxy.resetForm('queryRef');
|
||||
// 清空不在 queryParams 中的字段
|
||||
locationId.value = [];
|
||||
supplierId.value = [];
|
||||
getList();
|
||||
}
|
||||
|
||||
function handleOpenPage(row) {
|
||||
recordInfo.value = row;
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
/** 备份 */
|
||||
function openAddaddTransferProductDialog() {
|
||||
// getTransferProductTypeList();
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["transferProductRef"].show();
|
||||
// });
|
||||
// const partItem = {partFlg: 'add',rowData: []}
|
||||
// item: JSON.stringify(partItem)
|
||||
// ,query:{item: JSON.stringify(partItem)}
|
||||
// router.push({ path: '/medicationmanagement/transferManagement/transferManagent'})
|
||||
}
|
||||
|
||||
// 取消停供 停供
|
||||
function handlestopcancelSupply(row) {
|
||||
if (row.inventoryStatusEnum == 2) {
|
||||
stopSupply(row.inventoryId).then((response) => {
|
||||
proxy.$modal.msgSuccess('停供成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
if (row.inventoryStatusEnum == 3) {
|
||||
cancelSupply(row.inventoryId).then((response) => {
|
||||
proxy.$modal.msgSuccess('取消停供成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 停供
|
||||
function handlestopSupply(row) {}
|
||||
|
||||
// getTransferProductTypeList();
|
||||
getList();
|
||||
getPharmacyCabinetLists();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -1,472 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<!-- <el-form-item label="药品名称:" prop="searchKey" label-width="120px">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="项目编号/项目品名"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="商品编码:" prop="medicationDefId">
|
||||
<el-input
|
||||
v-model="queryParams.busNo"
|
||||
placeholder="商品编码:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称:" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="商品名称:"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="剩余过期天数:" prop="remainingDays" label-width="120px">
|
||||
<el-input
|
||||
v-model="queryParams.remainingDays"
|
||||
placeholder="查询 ≤ X 天的记录"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item label="项目类型:" prop="categoryType">
|
||||
<el-select
|
||||
v-model="queryParams.categoryType"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in item_category_code"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="医保等级:" prop="chrgitmLv" label-width="120px">
|
||||
<el-select
|
||||
v-model="queryParams.chrgitmLv"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="chrgitmLv_enumText in chrgitmLv_enumTextOptions"
|
||||
:key="chrgitmLv_enumText.value"
|
||||
:label="chrgitmLv_enumText.info"
|
||||
:value="chrgitmLv_enumText.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="药房:" prop="purposeLocationId" label-width="80px">
|
||||
<el-select
|
||||
v-model="queryParams.purposeLocationId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in locationIdList"
|
||||
:key="supplyStatus.id ?? supplyStatus.value"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="库存范围:" prop="inventoryScope">
|
||||
<el-select
|
||||
v-model="queryParams.inventoryScope"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in inventory_range"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商:" prop="manufacturerText">
|
||||
<el-input
|
||||
v-model="queryParams.manufacturerText"
|
||||
placeholder="回车查询"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="handleQuery"
|
||||
|
||||
>查询</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
|
||||
>重置</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="药品编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- itemTable -->
|
||||
<el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="120px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
width="180px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品类型"
|
||||
align="center"
|
||||
key="itemTableText"
|
||||
prop="itemTableText"
|
||||
width="90"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="库存数量"
|
||||
align="center"
|
||||
key="itemQuantity"
|
||||
prop="itemQuantity"
|
||||
width="80"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="计量单位"
|
||||
align="center"
|
||||
key="unitCode"
|
||||
prop="unitCode"
|
||||
width="80"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="小包装库存数"
|
||||
align="center"
|
||||
key="minPackageQuantity"
|
||||
prop="minPackageQuantity"
|
||||
width="110"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="小包装单位"
|
||||
align="center"
|
||||
key="minPackageUnit"
|
||||
prop="minPackageUnit"
|
||||
width="90"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="进价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="售价"
|
||||
align="center"
|
||||
key="salePrice"
|
||||
prop="salePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
-->
|
||||
<el-table-column
|
||||
label="拆零进价"
|
||||
align="center"
|
||||
key="partPrice"
|
||||
prop="partPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="拆零售价"
|
||||
align="center"
|
||||
key="partSalePrice"
|
||||
prop="partSalePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="进价金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="售价金额"
|
||||
align="center"
|
||||
key="totalSalePrice"
|
||||
prop="totalSalePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="仓库类型"
|
||||
align="center"
|
||||
key="purposeTypeEnum_enumText"
|
||||
prop="purposeTypeEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="仓库名称"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="货位名称"
|
||||
align="center"
|
||||
key="locationStoreName"
|
||||
prop="locationStoreName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="有效期至"
|
||||
align="center"
|
||||
key="expirationDate"
|
||||
prop="expirationDate"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.expirationDate) }}</span>
|
||||
</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"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="InventoryProductDetails">
|
||||
import {getInit, getPharmacyCabinetList, getReportProductPage,} from "./statisticalManagent";
|
||||
import {watch} from "vue";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
const {
|
||||
item_category_code,
|
||||
inventory_range,
|
||||
} = proxy.useDict(
|
||||
"item_category_code",
|
||||
"inventory_range",
|
||||
);
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const chrgitmLv_enumTextOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
// medicationDefId: undefined,
|
||||
busNo:undefined,
|
||||
name: undefined,
|
||||
categoryType:undefined,
|
||||
purposeLocationId:undefined,
|
||||
inventoryScope: undefined,
|
||||
supplierId: undefined,
|
||||
// occurrenceTimeSTime:undefined,
|
||||
// occurrenceTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
// 监听路由变化
|
||||
watch(
|
||||
() => route.query,
|
||||
(newQuery) => {
|
||||
// 如果路由中包含指定参数,则使用这些参数进行查询
|
||||
if (newQuery.purposeLocationId || newQuery.occurrenceTimeSTime || newQuery.occurrenceTimeETime) {
|
||||
// 设置查询参数
|
||||
if (newQuery.purposeLocationId) {
|
||||
queryParams.value.purposeLocationId = newQuery.purposeLocationId;
|
||||
}
|
||||
if (newQuery.occurrenceTimeETime) {
|
||||
queryParams.value.time = newQuery.occurrenceTimeETime + ' 00:00:00';
|
||||
}
|
||||
|
||||
// 执行查询
|
||||
getList();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data
|
||||
});
|
||||
getInit().then((response) => {
|
||||
chrgitmLv_enumTextOptions.value = response.data.chrgitmLvOptions
|
||||
})
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportProductPage(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records
|
||||
|
||||
if(purchaseinventoryList.value&& purchaseinventoryList.value.length>0){
|
||||
purchaseinventoryList.value.map((k,index)=>{
|
||||
k.inventoryStatusEnum_enumText = k.inventoryStatusEnum==2?'未停供':(k.inventoryStatusEnum==3?'已停供':'')
|
||||
k.quantityUnit = k.quantity / k.partPercent
|
||||
const integerPart1 = Math.floor(k.quantityUnit); // 获取整数部分
|
||||
const decimalPart1 = k.quantityUnit - integerPart1; // 获取小数部分
|
||||
|
||||
if(decimalPart1){
|
||||
k.quantityUnit = integerPart1 + k.unitCode_dictText +
|
||||
(decimalPart1*k.partPercent).toFixed(0) + k.minUnitCode_dictText
|
||||
}
|
||||
})
|
||||
}
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
// queryParams.value.occurrenceTimeSTime =
|
||||
// occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
// ? occurrenceTime.value[0] + " 00:00:00"
|
||||
// : "";
|
||||
// queryParams.value.occurrenceTimeETime =
|
||||
// occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
// ? occurrenceTime.value[1] + " 23:59:59"
|
||||
// : "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet("report-manage/inventory-product/excel-out", {
|
||||
...queryParams.value
|
||||
}, `dict_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,794 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-tabs v-model="activeTabName" type="card" class="inOut-tabs" @tab-click="hendleTabChange">
|
||||
<el-tab-pane label="对账" name="first">
|
||||
<el-row :guutter="15">
|
||||
<el-form :model="totalPrice" ref="priceRef" :inline="true">
|
||||
<el-row :guutter="15">
|
||||
<el-form-item label="结算经办机构:" prop="setlOptins" label-width="160px">
|
||||
<el-input
|
||||
v-model="totalPrice.setlOptins"
|
||||
placeholder="请输入结算经办机构"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算日期:" label-width="130px">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="清算类型:" prop="clrType" label-width="160px">
|
||||
<el-select
|
||||
v-model="queryParams.clrType"
|
||||
placeholder="请选择清算类型"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in clrTypeOptions"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="险种类型:" prop="insutype" label-width="160px">
|
||||
<el-select
|
||||
v-model="queryParams.insutype"
|
||||
placeholder="请选择险种类型"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in insutypeOptions"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row :guutter="15">
|
||||
<el-form-item label="医疗费总额:" prop="medfeeSumamt" label-width="160px">
|
||||
<el-input
|
||||
v-model="totalPrice.medfeeSumamt"
|
||||
placeholder="请输入医疗费总额"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="基金支付总额:" prop="fundAppySum" label-width="160px">
|
||||
<el-input
|
||||
v-model="totalPrice.fundAppySum"
|
||||
placeholder="请输入基金支付总额"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="个人账户支付金额:" prop="acctPay" label-width="160px">
|
||||
<el-input
|
||||
v-model="totalPrice.acctPay"
|
||||
placeholder="请输入个人账户支付金额"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="现金支付金额:" prop="cashPayamt" label-width="160px">
|
||||
<el-input
|
||||
v-model="totalPrice.cashPayamt"
|
||||
placeholder="请输入现金支付金额"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算笔数:" prop="setlCnt" label-width="160px">
|
||||
<el-input
|
||||
v-model="totalPrice.setlCnt"
|
||||
placeholder="请输入结算笔数"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-button type="primary" plain icon="Edit" @click="handOperatedApply">手动清算</el-button> -->
|
||||
<el-button type="primary" plain icon="Edit" @click="handOperatedReconcileAccounts"
|
||||
>手动对账</el-button
|
||||
>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<!-- </div> -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
@row-click="handleRowClick"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="申请清算ID"
|
||||
align="center"
|
||||
key="outResult"
|
||||
prop="outResult"
|
||||
width="270"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="开始时间"
|
||||
align="center"
|
||||
key="begndate"
|
||||
prop="begndate"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="结束时间"
|
||||
align="center"
|
||||
key="enddate"
|
||||
prop="enddate"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="清算类别"
|
||||
align="center"
|
||||
key="clrType"
|
||||
prop="clrType"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="总费用"
|
||||
align="center"
|
||||
key="medfeeSumamt"
|
||||
prop="medfeeSumamt"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保认可总费用"
|
||||
align="center"
|
||||
key="medSumfee"
|
||||
prop="medSumfee"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="基金申报金额"
|
||||
align="center"
|
||||
key="fundAppySum"
|
||||
prop="fundAppySum"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="现金支付总额"
|
||||
align="center"
|
||||
key="cashPayamt"
|
||||
prop="cashPayamt"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="个人账户金额"
|
||||
align="center"
|
||||
key="acctPay"
|
||||
prop="acctPay"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
align="center"
|
||||
key="status"
|
||||
prop="status"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.setlTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
label="是否退费"
|
||||
align="center"
|
||||
key="refdSetlFlag"
|
||||
prop="refdSetlFlag"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.refdSetlFlag==1?'退费':'' }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="300"
|
||||
class-name="small-padding fixed-width"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
link
|
||||
icon="revoked-filled"
|
||||
:disabled="scope.row.id == ''"
|
||||
@click="revokedSelectedRows(scope.row)"
|
||||
>
|
||||
撤销
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span class="descriptions-item-label">对账结果:</span>
|
||||
<div
|
||||
style="
|
||||
background: #f5f7fa;
|
||||
border: solid 1px;
|
||||
border-color: #e4e7ed;
|
||||
width: 50%;
|
||||
height: 100px;
|
||||
margin-top: 20px;
|
||||
"
|
||||
>
|
||||
<span>{{ reconciliation }}</span>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="清算" name="second">
|
||||
<el-row :guutter="15">
|
||||
<el-form :model="totalPrice" ref="priceRef" :inline="true">
|
||||
<el-row :guutter="15">
|
||||
<el-form-item label="结算经办机构:" prop="setlOptins" label-width="160px">
|
||||
<el-input
|
||||
v-model="totalPrice.setlOptins"
|
||||
placeholder="请输入结算经办机构"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算日期:" label-width="130px">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="清算类型:" prop="clrType" label-width="160px">
|
||||
<el-select
|
||||
v-model="queryParams.clrType"
|
||||
placeholder="请选择清算类型"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in clrTypeOptions"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="险种类型:" prop="insutype" label-width="160px">
|
||||
<el-select v-model="queryParams.insutype" placeholder="请选择险种类型" clearable style="width: 150px">
|
||||
<el-option v-for="categoryCode in insutypeOptions" :key="categoryCode.value" :label="categoryCode.label"
|
||||
:value="categoryCode.value" />
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
</el-row>
|
||||
<el-row :guutter="15">
|
||||
<el-form-item label="医疗费总额:" prop="medfeeSumamt" label-width="160px">
|
||||
<el-input
|
||||
v-model="totalPrice.medfeeSumamt"
|
||||
placeholder="请输入医疗费总额"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="基金支付总额:" prop="fundAppySum" label-width="160px">
|
||||
<el-input
|
||||
v-model="totalPrice.fundAppySum"
|
||||
placeholder="请输入基金支付总额"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="个人账户支付金额:" prop="acctPay" label-width="160px">
|
||||
<el-input
|
||||
v-model="totalPrice.acctPay"
|
||||
placeholder="请输入个人账户支付金额"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="现金支付金额:" prop="cashPayamt" label-width="160px">
|
||||
<el-input
|
||||
v-model="totalPrice.cashPayamt"
|
||||
placeholder="请输入现金支付金额"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="结算笔数:" prop="setlCnt" label-width="160px">
|
||||
<el-input v-model="totalPrice.setlCnt" placeholder="请输入结算笔数" clearable style="width: 150px" />
|
||||
</el-form-item> -->
|
||||
<el-button type="primary" plain icon="Edit" @click="handOperatedApply"
|
||||
>手动清算</el-button
|
||||
>
|
||||
<!-- <el-button type="primary" plain icon="Edit" @click="handOperatedReconcileAccounts">手动对账</el-button> -->
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<!-- </div> -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
@row-click="handleRowClick"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="申请清算ID"
|
||||
align="center"
|
||||
key="outResult"
|
||||
prop="outResult"
|
||||
width="270"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="开始时间"
|
||||
align="center"
|
||||
key="begndate"
|
||||
prop="begndate"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="结束时间"
|
||||
align="center"
|
||||
key="enddate"
|
||||
prop="enddate"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="清算类别"
|
||||
align="center"
|
||||
key="clrType"
|
||||
prop="clrType"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="总费用"
|
||||
align="center"
|
||||
key="medfeeSumamt"
|
||||
prop="medfeeSumamt"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保认可总费用"
|
||||
align="center"
|
||||
key="medSumfee"
|
||||
prop="medSumfee"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="基金申报金额"
|
||||
align="center"
|
||||
key="fundAppySum"
|
||||
prop="fundAppySum"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="现金支付总额"
|
||||
align="center"
|
||||
key="cashPayamt"
|
||||
prop="cashPayamt"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="个人账户金额"
|
||||
align="center"
|
||||
key="acctPay"
|
||||
prop="acctPay"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
align="center"
|
||||
key="status"
|
||||
prop="status"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.setlTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
label="是否退费"
|
||||
align="center"
|
||||
key="refdSetlFlag"
|
||||
prop="refdSetlFlag"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.refdSetlFlag==1?'退费':'' }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="300"
|
||||
class-name="small-padding fixed-width"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
link
|
||||
icon="revoked-filled"
|
||||
:disabled="scope.row.id == ''"
|
||||
@click="revokedSelectedRows(scope.row)"
|
||||
>
|
||||
撤销
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span class="descriptions-item-label">清算结果:</span>
|
||||
<div
|
||||
style="
|
||||
background: #f5f7fa;
|
||||
border: solid 1px;
|
||||
border-color: #e4e7ed;
|
||||
width: 50%;
|
||||
height: 100px;
|
||||
margin-top: 20px;
|
||||
"
|
||||
>
|
||||
<span>{{ reconciliation }}</span>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="LiquidationRecords">
|
||||
import {
|
||||
applyFinancialClearingList,
|
||||
applyUnClearing,
|
||||
autoApplyFinancialClearing,
|
||||
handOperatedApplyFinancialClearing,
|
||||
handOperatedApplyReconcileAccounts,
|
||||
} from './statisticalManagent';
|
||||
import {formatDateStr} from '@/utils/index';
|
||||
import {ref} from 'vue';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(false);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([
|
||||
formatDateStr(getFirstDayOfMonth(new Date()), 'YYYY-MM-DD'), // 当前月份的第一天
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'), // 当天
|
||||
]);
|
||||
const activeTabName = ref('first');
|
||||
const clrTypeOptions = ref([]);
|
||||
const insutypeOptions = ref([]);
|
||||
const filePath = ref('');
|
||||
const purchaseinventoryReturnList = ref([]);
|
||||
const loadingReturn = ref(false);
|
||||
const selectedRow = ref([]);
|
||||
|
||||
const fileSize = ref(10);
|
||||
const uploadList = ref([]);
|
||||
const reconciliation = ref('');
|
||||
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
||||
const fileType = ref(['zip', 'txt']);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
// pageNo: 1,
|
||||
// pageSize: 10,
|
||||
setlOptins: '229900',
|
||||
filePath: undefined,
|
||||
orgId: undefined,
|
||||
clrType: 11,
|
||||
fileQuryNo: undefined,
|
||||
stmtBegnDate: undefined,
|
||||
stmtEndDate: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const totalPrice = reactive({
|
||||
medfeeSumamt: 0,
|
||||
fundAppySum: 0,
|
||||
acctPay: 0,
|
||||
cashPayamt: 0,
|
||||
counts: 0,
|
||||
setlCnt: 0,
|
||||
medSumfee: 0.0,
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
// 接收路由参数
|
||||
const route = useRoute();
|
||||
|
||||
// 监听路由变化
|
||||
watch(
|
||||
() => route.query,
|
||||
(newQuery) => {
|
||||
// 当路由 query 参数变化时执行
|
||||
if (newQuery.currentRow) {
|
||||
try {
|
||||
const currentRow = JSON.parse(newQuery.currentRow);
|
||||
console.log('接收到的currentRow参数:', currentRow);
|
||||
|
||||
// 处理接收到的参数
|
||||
if (currentRow) {
|
||||
totalPrice.medfeeSumamt = currentRow.medFeeSumAmt || 0;
|
||||
totalPrice.fundAppySum = currentRow.fundPaySumAmt || 0;
|
||||
totalPrice.acctPay = currentRow.acctPay || 0;
|
||||
totalPrice.cashPayamt = currentRow.acctGjPay || 0;
|
||||
totalPrice.counts = currentRow.fixMedInsSetlCnt || 0;
|
||||
queryParams.insutype = currentRow.insutype;
|
||||
|
||||
// 如果有传递时间参数也一并处理
|
||||
if (newQuery.occurrenceTime) {
|
||||
occurrenceTime.value = newQuery.occurrenceTime;
|
||||
}
|
||||
console.log('已更新参数:', currentRow);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('解析currentRow参数失败:', error);
|
||||
}
|
||||
}
|
||||
},
|
||||
{ immediate: true } // 立即执行一次,处理首次加载的情况
|
||||
);
|
||||
|
||||
watch(
|
||||
() => purchaseinventoryList.value,
|
||||
(newVlaue) => {
|
||||
if (newVlaue && newVlaue.length > 0) {
|
||||
handleTotalAmount();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.stmtBegnDate =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + ' 00:00:00'
|
||||
: '';
|
||||
queryParams.value.stmtEndDate =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + ' 23:59:59'
|
||||
: '';
|
||||
// queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
function getFirstDayOfMonth(date) {
|
||||
return new Date(date.getFullYear(), date.getMonth(), 1);
|
||||
}
|
||||
|
||||
// 对象转成指定字符串分隔
|
||||
function listToString(list, separator) {
|
||||
let strs = '';
|
||||
separator = separator || ',';
|
||||
for (let i in list) {
|
||||
if (list[i].url) {
|
||||
strs += list[i].url + separator;
|
||||
}
|
||||
}
|
||||
return strs != '' ? strs.substr(0, strs.length - 1) : '';
|
||||
}
|
||||
/**计算合计金额 */
|
||||
function handleTotalAmount() {
|
||||
totalPrice.counts = purchaseinventoryList.value.length;
|
||||
totalPrice.medfeeSumamt = purchaseinventoryList.value.reduce((accumulator, currentRow) => {
|
||||
return Number((accumulator + Number(currentRow.medfeeSumamt || 0)).toFixed(2));
|
||||
}, 0);
|
||||
totalPrice.fundAppySum = purchaseinventoryList.value.reduce((accumulator, currentRow) => {
|
||||
return Number((accumulator + Number(currentRow.fundPaySumamt || 0)).toFixed(2));
|
||||
}, 0);
|
||||
totalPrice.acctPay = purchaseinventoryList.value.reduce((accumulator, currentRow) => {
|
||||
return Number((accumulator + Number(currentRow.acctPay || 0)).toFixed(2));
|
||||
}, 0);
|
||||
// 现金支付金额
|
||||
// cashPayamt.value = purchaseinventoryList.value.reduce(
|
||||
// (accumulator, currentRow) => {
|
||||
// return (accumulator + (Number(currentRow.profitAmount) || 0))
|
||||
// },
|
||||
// 0
|
||||
// );
|
||||
}
|
||||
function getPharmacyCabinetLists() {
|
||||
clrTypeOptions.value = [
|
||||
{ value: 11, label: '门诊' },
|
||||
{ value: 21, label: '住院' },
|
||||
];
|
||||
insutypeOptions.value = [
|
||||
{ value: 310, label: '职工基本医疗保险' },
|
||||
{ value: 390, label: '城乡居民基本医疗保险' },
|
||||
{ value: 320, label: '公务员医疗补助' },
|
||||
{ value: 330, label: '大额医疗费用补助' },
|
||||
{ value: 340, label: '离休人员医疗保障' },
|
||||
{ value: 350, label: '一至六级残废军人医疗补助' },
|
||||
{ value: 360, label: '老红军医疗保障' },
|
||||
{ value: 370, label: '企业补充医疗保险' },
|
||||
{ value: 380, label: '新型农村合作医疗' },
|
||||
{ value: 391, label: '城镇居民基本医疗保险' },
|
||||
{ value: 392, label: '城乡居民大病医疗保险' },
|
||||
];
|
||||
}
|
||||
|
||||
function handleSelectionChangeReturn(selection) {
|
||||
idsReturn.value = selection.map((item) => item.id);
|
||||
singleReturn.value = selection.length != 1;
|
||||
multipleReturn.value = !selection.length;
|
||||
}
|
||||
|
||||
function getList() {
|
||||
applyFinancialClearingList(queryParams.value).then((res) => {
|
||||
// console.log(res,"res----------------")
|
||||
// loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records ? res.data.records : res.data;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
function handleApplyForLiquidation() {
|
||||
let params = {};
|
||||
params.clrType = queryParams.value.clrType ? queryParams.value.clrType : '';
|
||||
params.setlOptins = queryParams.value.setlOptins ? queryParams.value.setlOptins : '';
|
||||
params.stmtBegnDate = queryParams.value.stmtBegnDate ? queryParams.value.stmtBegnDate : '';
|
||||
params.stmtEndDate = queryParams.value.stmtEndDate ? queryParams.value.stmtEndDate : '';
|
||||
autoApplyFinancialClearing(params).then((res) => {
|
||||
console.log(res.data, 'res----------------');
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
function isAllSelected() {
|
||||
return selectedRow.value.length === purchaseinventoryList.value.length;
|
||||
}
|
||||
|
||||
function revokedSelectedRows(row) {
|
||||
let queryParamsss = {
|
||||
clrAppyEvtId: row.outResult,
|
||||
clroptins: queryParams.value.setlOptins ? queryParams.value.setlOptins : '',
|
||||
};
|
||||
applyUnClearing(queryParamsss)
|
||||
.then((res) => {
|
||||
proxy.$message.success('撤销成功');
|
||||
getList();
|
||||
})
|
||||
.catch((err) => {
|
||||
proxy.$message.error('撤销失败');
|
||||
});
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
selectedRow.value = selection;
|
||||
console.log(selectedRow.value, 'selectedRow.value');
|
||||
ids.value = selection.map((item) => item.setlId);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
function handOperatedApply() {
|
||||
const params = { ...totalPrice };
|
||||
params.clrOptins = totalPrice.setlOptins ? totalPrice.setlOptins : '';
|
||||
params.begndate = occurrenceTime.value[0] ? occurrenceTime.value[0] + ' 00:00:00' : '';
|
||||
params.enddate = occurrenceTime.value[1] ? occurrenceTime.value[1] + ' 23:59:59' : '';
|
||||
params.clrType = queryParams.value.clrType ? queryParams.value.clrType : '';
|
||||
handOperatedApplyFinancialClearing(params)
|
||||
.then((res) => {
|
||||
reconciliation.value = res.data;
|
||||
})
|
||||
.catch((err) => {
|
||||
proxy.$message.error('申请失败');
|
||||
});
|
||||
}
|
||||
|
||||
function hendleTabChange() {
|
||||
totalPrice.medfeeSumamt = 0;
|
||||
totalPrice.fundAppySum = 0;
|
||||
totalPrice.acctPay = 0;
|
||||
totalPrice.cashPayamt = 0;
|
||||
totalPrice.counts = 0;
|
||||
totalPrice.setlCnt = 0;
|
||||
totalPrice.medSumfee = 0.0;
|
||||
occurrenceTime.value = [
|
||||
formatDateStr(getFirstDayOfMonth(new Date()), 'YYYY-MM-DD'), // 当前月份的第一天
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'), // 当天
|
||||
];
|
||||
purchaseinventoryList.value = [];
|
||||
queryParams.value = {
|
||||
setlOptins: undefined,
|
||||
filePath: undefined,
|
||||
orgId: undefined,
|
||||
clrType: undefined,
|
||||
fileQuryNo: undefined,
|
||||
stmtBegnDate: undefined,
|
||||
stmtEndDate: undefined,
|
||||
};
|
||||
reconciliation.value = '';
|
||||
}
|
||||
|
||||
function handOperatedReconcileAccounts() {
|
||||
const params = { ...totalPrice };
|
||||
params.clrOptins = totalPrice.setlOptins ? totalPrice.setlOptins : '';
|
||||
params.begndate = occurrenceTime.value[0] ? occurrenceTime.value[0] + ' 00:00:00' : '';
|
||||
params.enddate = occurrenceTime.value[1] ? occurrenceTime.value[1] + ' 23:59:59' : '';
|
||||
params.clrType = queryParams.value.clrType ? queryParams.value.clrType : '';
|
||||
params.insutype = queryParams.value.insutype ? queryParams.value.insutype : '';
|
||||
handOperatedApplyReconcileAccounts(params)
|
||||
.then((res) => {
|
||||
reconciliation.value = res.data;
|
||||
})
|
||||
.catch((err) => {
|
||||
proxy.$message.error('对账失败');
|
||||
});
|
||||
}
|
||||
//点击列表当前行
|
||||
function handleRowClick(row) {
|
||||
// editRowTK.value = row
|
||||
console.log(row, 'row');
|
||||
// if(row.returnStatus==1){
|
||||
// loadingReturn.value = true
|
||||
// generatedReturnDetail(row.supplyBusNo).then((response) => {
|
||||
// purchaseinventoryReturnList.value = response.data
|
||||
// purchaseinventoryReturnList.value.map(k=>{
|
||||
// // k.returnStatus_text = k.returnStatus==1?'已退库':''
|
||||
// k.originalSupplyBusNo = k.originalSupplyBusNo?k.originalSupplyBusNo:row.supplyBusNo
|
||||
// })
|
||||
|
||||
// })
|
||||
// loadingReturn.value = false
|
||||
// }
|
||||
}
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,365 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="项目名称:" prop="searchKey" label-width="120px">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="编码/项目名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="编码:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="编码:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="项目名称:"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="项目类型:" prop="categoryCode">
|
||||
<el-select
|
||||
v-model="queryParams.categoryCode"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in item_category_code"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="报损日期:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="handleQuery"
|
||||
|
||||
>查询</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
|
||||
>重置</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusno"
|
||||
prop="supplyBusno"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="类型"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="仓库"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="货位"
|
||||
align="center"
|
||||
key="locationStoreName"
|
||||
prop="locationStoreName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购单价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="报损数量"
|
||||
align="center"
|
||||
key="itemQuantity"
|
||||
prop="itemQuantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="报损金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
key="supplier"
|
||||
prop="supplier"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审核人"
|
||||
align="center"
|
||||
key="approverId_dictText"
|
||||
prop="approverId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单日期"
|
||||
align="center"
|
||||
key="occurrenceTime"
|
||||
prop="occurrenceTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审批日期"
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</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"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="lossReportingDetails">
|
||||
import {getInit, getPharmacyCabinetList, getReportLossPage,} from "./statisticalManagent";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const chrgitmLv_enumTextOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
approvalTimeSTime:undefined,
|
||||
approvalTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
// 监听路由变化
|
||||
watch(
|
||||
() => route.query,
|
||||
(newQuery) => {
|
||||
// 如果路由中包含指定参数,则使用这些参数进行查询
|
||||
if (newQuery.purposeLocationId || newQuery.occurrenceTimeSTime || newQuery.occurrenceTimeETime) {
|
||||
// 设置查询参数
|
||||
if (newQuery.purposeLocationId) {
|
||||
queryParams.value.purposeLocationId = newQuery.purposeLocationId;
|
||||
}
|
||||
if (newQuery.occurrenceTimeSTime) {
|
||||
queryParams.value.occurrenceTimeSTime = newQuery.occurrenceTimeSTime + ' 00:00:00';
|
||||
}
|
||||
if (newQuery.occurrenceTimeETime) {
|
||||
queryParams.value.occurrenceTimeETime = newQuery.occurrenceTimeETime + ' 23:59:59';
|
||||
}
|
||||
|
||||
// 执行查询
|
||||
getList();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data
|
||||
});
|
||||
getInit().then((response) => {
|
||||
chrgitmLv_enumTextOptions.value = response.data.chrgitmLvOptions
|
||||
})
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportLossPage(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.approvalTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.approvalTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.approvalTimeSTime = ""
|
||||
queryParams.value.approvalTimeETime = ""
|
||||
occurrenceTime.value = ""
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet("report-manage/loss/excel-out", {
|
||||
...queryParams.value
|
||||
}, `dict_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,222 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<el-form-item label="产品名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="编码/机构名称/产品名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="medicationInboundList"
|
||||
@selection-change="handleSelectionChange"
|
||||
height="calc(100vh - 300px)"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="医疗机构代码"
|
||||
align="center"
|
||||
key="medinsCode"
|
||||
prop="medinsCode"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="组织机构名称"
|
||||
align="center"
|
||||
key="orgCode"
|
||||
prop="orgCode"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="国家药品编码(YPID)"
|
||||
align="center"
|
||||
key="ypNo"
|
||||
prop="ypNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="院内药品唯一码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="省级药品集中采购平台药品编码"
|
||||
align="center"
|
||||
key="itemTableText"
|
||||
prop="itemTableText"
|
||||
width="250"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="产品名称"
|
||||
align="center"
|
||||
key="productNmae"
|
||||
prop="productNmae"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="入库总金额(元)"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="入库数量(最小销售包装单位)"
|
||||
align="center"
|
||||
key="minUnitSale"
|
||||
prop="minUnitSale"
|
||||
width="250"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="入库数量(最小制剂单位)"
|
||||
align="center"
|
||||
key="minDoseQuantity"
|
||||
prop="minDoseQuantity"
|
||||
width="250"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="medicationInboundDetails">
|
||||
import {getMedicationInboundDetails,} from './statisticalManagent';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
|
||||
const medicationInboundList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const approvalTime = ref([]);
|
||||
const supplierListOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
busNo: undefined,
|
||||
name: undefined,
|
||||
medicationDefId: undefined,
|
||||
department: undefined,
|
||||
purposeLocationId: undefined,
|
||||
categoryType: undefined,
|
||||
supplierId: undefined,
|
||||
occurrenceTimeSTime: undefined,
|
||||
occurrenceTimeETime: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data;
|
||||
});
|
||||
getInboundInit().then((response) => {
|
||||
supplierListOptions.value = response.data.supplierListOptions;
|
||||
});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet(
|
||||
'report-manage/inbound/excel-out',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`dict_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getMedicationInboundDetails(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
medicationInboundList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.occurrenceTimeSTime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[0] + ' 00:00:00' : '';
|
||||
queryParams.value.occurrenceTimeETime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[1] + ' 23:59:59' : '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.occurrenceTimeSTime = '';
|
||||
queryParams.value.occurrenceTimeETime = '';
|
||||
approvalTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,272 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<el-form-item label="药品名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="编码/序号/药品名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商:" prop="supplierId">
|
||||
<el-select v-model="queryParams.supplierId" placeholder="" clearable style="width: 150px">
|
||||
<el-option
|
||||
v-for="supplierList in supplierListOptions"
|
||||
:key="supplierList.value"
|
||||
:label="supplierList.label"
|
||||
:value="supplierList.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="medicationSaleList"
|
||||
@selection-change="handleSelectionChange"
|
||||
height="calc(100vh - 300px)"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="定点编码"
|
||||
align="center"
|
||||
key="fixmedinsCode"
|
||||
prop="fixmedinsCode"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="定点名称"
|
||||
align="center"
|
||||
key="fixmedinsName"
|
||||
prop="fixmedinsName"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医疗目录编码"
|
||||
align="center"
|
||||
key="ybOrgNo"
|
||||
prop="ybOrgNo"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品通用名称"
|
||||
align="center"
|
||||
key="ypName"
|
||||
prop="ypName"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品69码"
|
||||
align="center"
|
||||
key="ybNo"
|
||||
prop="ybNo"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品类型"
|
||||
align="center"
|
||||
key="categoryCode"
|
||||
prop="categoryCode"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品剂型"
|
||||
align="center"
|
||||
key="doseFromCode"
|
||||
prop="doseFromCode"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小包装数量"
|
||||
align="center"
|
||||
key="minUnitSum"
|
||||
prop="minUnitSum"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小包装单位"
|
||||
align="center"
|
||||
key="minUnitCode"
|
||||
prop="minUnitCode"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产企业"
|
||||
align="center"
|
||||
key="supplyName"
|
||||
prop="supplyName"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="批准文号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="年度销售量(盒/瓶/支)"
|
||||
align="center"
|
||||
key="annualSales"
|
||||
prop="annualSales"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="medicationSaleDetails">
|
||||
import {getMedicationSaleDetails,} from './statisticalManagent';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
|
||||
const medicationSaleList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const approvalTime = ref([]);
|
||||
const supplierListOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
busNo: undefined,
|
||||
name: undefined,
|
||||
medicationDefId: undefined,
|
||||
department: undefined,
|
||||
purposeLocationId: undefined,
|
||||
categoryType: undefined,
|
||||
supplierId: undefined,
|
||||
occurrenceTimeSTime: undefined,
|
||||
occurrenceTimeETime: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data;
|
||||
});
|
||||
getInboundInit().then((response) => {
|
||||
supplierListOptions.value = response.data.supplierListOptions;
|
||||
});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet(
|
||||
'report-manage/inbound/excel-out',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`dict_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getMedicationSaleDetails(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
medicationSaleList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.occurrenceTimeSTime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[0] + ' 00:00:00' : '';
|
||||
queryParams.value.occurrenceTimeETime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[1] + ' 23:59:59' : '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.occurrenceTimeSTime = '';
|
||||
queryParams.value.occurrenceTimeETime = '';
|
||||
approvalTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,240 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<el-form-item label="源仓库:" prop="sourceLocationId" label-width="80px">
|
||||
<el-select
|
||||
v-model="queryParams.sourceLocationId"
|
||||
placeholder="请选择源仓库"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in locationIdList"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="目的仓库:" prop="purposeLocationId" label-width="100px">
|
||||
<el-select
|
||||
v-model="queryParams.purposeLocationId"
|
||||
placeholder="请选择目的仓库"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in locationIdList"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="制单日期:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row
|
||||
:gutter="10"
|
||||
style="margin-left: 20px; margin-right: 0px; margin-bottom: 5px"
|
||||
>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="medicationStockOutDetailsList"
|
||||
@selection-change="handleSelectionChange"
|
||||
height="calc(100vh - 300px)"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="医疗机构代码"
|
||||
align="center"
|
||||
key="medinsCode"
|
||||
prop="medinsCode"
|
||||
width="220"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- itemTable -->
|
||||
<el-table-column
|
||||
label="组织机构名称"
|
||||
align="center"
|
||||
key="orgCode"
|
||||
prop="orgCode"
|
||||
width="220"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="国家药品编码(YPID)"
|
||||
align="center"
|
||||
key="nationalMedicineCode"
|
||||
prop="nationalMedicineCode"
|
||||
width="220"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="院内药品唯一码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="220"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="省级药品集中采购平台药品编码"
|
||||
align="center"
|
||||
key="provincialMedicineConcentratedCode"
|
||||
prop="provincialMedicineConcentratedCode"
|
||||
width="220"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="产品名称"
|
||||
align="center"
|
||||
key="productName"
|
||||
prop="productName"
|
||||
width="220"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="出库数量"
|
||||
align="center"
|
||||
key="totalQuantity"
|
||||
prop="totalQuantity"
|
||||
:show-overflow-tooltip="true"
|
||||
width="220"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单位"
|
||||
align="center"
|
||||
key="minUnit"
|
||||
prop="minUnit"
|
||||
:show-overflow-tooltip="true"
|
||||
width="220"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="medicationStockOutDetails">
|
||||
import {getPharmacyCabinetList, getReportMedicationStockOutDetails,} from './statisticalManagent';
|
||||
import {ElMessage} from 'element-plus';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const medicationStockOutDetailsList = ref([]);
|
||||
const loading = ref(false);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const approvalTime = ref([]);
|
||||
const supplierListOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
const occurrenceTime = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
sourceLocationId:undefined,
|
||||
purposeLocationId:undefined,
|
||||
occurrenceTimeSTime: undefined,
|
||||
occurrenceTimeETime: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function getList() {
|
||||
if(queryParams.value.sourceLocationId==null||
|
||||
queryParams.value.purposeLocationId==null||
|
||||
queryParams.value.occurrenceTimeSTime==null||
|
||||
queryParams.value.occurrenceTimeETime==null){
|
||||
ElMessage.warning("请构建完整的查询条件");
|
||||
}else{
|
||||
loading.value = true;
|
||||
getReportMedicationStockOutDetails(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
medicationStockOutDetailsList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});}
|
||||
}
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data
|
||||
});
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.occurrenceTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0]
|
||||
: "";
|
||||
queryParams.value.occurrenceTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1]
|
||||
: "";
|
||||
getList();
|
||||
}
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
occurrenceTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
medicationStockOutDetailsList.value = [];
|
||||
total.value = 0;
|
||||
}
|
||||
// 导出
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'/report-manage/report/excel-out/2',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`药品调拨详情_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
|
||||
// getList();
|
||||
getPharmacyCabinetLists();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,207 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索区域 -->
|
||||
<div class="search-form mb-4">
|
||||
<el-form :model="queryParams" inline @submit.prevent>
|
||||
<el-form-item label="搜索关键词">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入药品名称/编码等关键词"
|
||||
clearable
|
||||
@keyup.enter="getList"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始时间">
|
||||
<el-date-picker
|
||||
v-model="queryParams.startTime"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
clearable
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 180px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间">
|
||||
<el-date-picker
|
||||
v-model="queryParams.endTime"
|
||||
type="datetime"
|
||||
placeholder="选择结束日期"
|
||||
clearable
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 180px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<!-- 数据表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="medicationUsageList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="医疗机构代码"
|
||||
align="center"
|
||||
key="orgId"
|
||||
prop="orgId"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="组织机构名称"
|
||||
align="center"
|
||||
key="orgName"
|
||||
prop="orgName"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="国家药品编码(YPID)"
|
||||
align="center"
|
||||
key="nationalDrugCode"
|
||||
prop="nationalDrugCode"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="院内药品唯一码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="省级药品集中采购平台药品编码"
|
||||
align="center"
|
||||
key="provincialDrugCode"
|
||||
prop="provincialDrugCode"
|
||||
width="220"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="产品名称"
|
||||
align="center"
|
||||
key="itemName"
|
||||
prop="itemName"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="销售总金额(元)"
|
||||
align="center"
|
||||
key="totalSalesPrice"
|
||||
prop="totalSalesPrice"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="销售数量(最小销售包装单位)"
|
||||
align="center"
|
||||
key="packageSalesQuantity"
|
||||
prop="packageSalesQuantity"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="销售数量(最小制剂单位)"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="medicationUsageDetails">
|
||||
import {onMounted, ref} from 'vue';
|
||||
import {getReportMedicationUsage} from './statisticalManagent';
|
||||
|
||||
// 表格数据
|
||||
const medicationUsageList = ref([]);
|
||||
// 加载状态
|
||||
const loading = ref(true);
|
||||
// 选中的ID列表
|
||||
const ids = ref([]);
|
||||
// 总条数
|
||||
const total = ref(0);
|
||||
// 单选/多选状态(原代码遗漏,补充)
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
|
||||
// 查询参数(新增searchKey、startTime、endTime)
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: '', // 搜索关键词
|
||||
startTime: '', // 开始时间
|
||||
endTime: '', // 结束时间
|
||||
});
|
||||
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportMedicationUsage(queryParams.value).then((res) => {
|
||||
medicationUsageList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length !== 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 重置查询条件 */
|
||||
function resetQuery() {
|
||||
queryParams.value = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
};
|
||||
getList(); // 重置后重新查询
|
||||
}
|
||||
|
||||
// 页面加载时获取数据
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 搜索表单间距 */
|
||||
.search-form {
|
||||
padding: 10px;
|
||||
background: #f5f5f5;
|
||||
border-radius: 4px;
|
||||
}
|
||||
/* 表格与搜索框间距 */
|
||||
.mb-4 {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,183 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="nonWinQtyRatinoList"
|
||||
@selection-change="handleSelectionChange"
|
||||
height="calc(100vh - 300px)"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
key="itemName"
|
||||
prop="itemName"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110px"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医疗机构名称"
|
||||
align="center"
|
||||
key="orgName"
|
||||
prop="orgName"
|
||||
width="200px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- itemTable -->
|
||||
<el-table-column
|
||||
label="药品通用名"
|
||||
align="center"
|
||||
key="medName"
|
||||
prop="medName"
|
||||
width="140px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="非中选产品采购数量(片袋支)"
|
||||
align="center"
|
||||
key="nonWinQty"
|
||||
prop="nonWinQty"
|
||||
width="250px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="通用名药品采购数量(片袋支)"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
width="250px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="非中选产品采购金额(元)"
|
||||
align="center"
|
||||
key="nonWinAmt"
|
||||
prop="nonWinAmt"
|
||||
width="250px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="通用名药品采购金额(元)"
|
||||
align="center"
|
||||
key="amount"
|
||||
prop="amount"
|
||||
width="250px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="nonWinQtyRatio">
|
||||
import {getReportNonWinQtyRatio,} from './statisticalManagent';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
|
||||
const nonWinQtyRatioList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const approvalTime = ref([]);
|
||||
const supplierListOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
occurrenceTimeSTime: undefined,
|
||||
occurrenceTimeETime: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet(
|
||||
'report-manage/inbound/excel-out',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`dict_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportNonWinQtyRatio(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
nonWinQtyRatioList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.occurrenceTimeSTime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[0] + ' 00:00:00' : '';
|
||||
queryParams.value.occurrenceTimeETime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[1] + ' 23:59:59' : '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.occurrenceTimeSTime = '';
|
||||
queryParams.value.occurrenceTimeETime = '';
|
||||
approvalTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
getList();
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,299 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="年份:" prop="visitsYear">
|
||||
<el-date-picker
|
||||
v-model="visitsYear"
|
||||
type="year"
|
||||
placeholder="请选择年份"
|
||||
format="YYYY"
|
||||
value-format="YYYY"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间类型:" prop="dateType">
|
||||
<el-select
|
||||
v-model="queryParams.dateType"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@change="dateTypeChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="dateType in dateTypeOptions"
|
||||
:key="dateType.value"
|
||||
:label="dateType.label"
|
||||
:value="dateType.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="就诊时间" prop="visitTime1" v-if="queryParams.dateType=='1'">
|
||||
<el-date-picker
|
||||
|
||||
v-model="queryParams.visitTime1"
|
||||
type="datetime"
|
||||
placeholder="请选择就诊时间"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="就诊时间" prop="visitTime2" v-if="queryParams.dateType=='2'">
|
||||
<el-date-picker
|
||||
|
||||
@change="visitTimeChange"
|
||||
v-model="queryParams.visitTime2"
|
||||
type="week"
|
||||
format="[Week] ww"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
placeholder="请选择就诊时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="就诊时间" prop="visitTime3" v-if="queryParams.dateType=='3'">
|
||||
<el-date-picker
|
||||
|
||||
v-model="queryParams.visitTime3"
|
||||
type="month"
|
||||
placeholder="请选择就诊时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="报损日期:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="handleQuery"
|
||||
|
||||
>查询</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
|
||||
>重置</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
|
||||
<el-table-column
|
||||
label="就诊人数"
|
||||
align="center"
|
||||
key="itemQuantity"
|
||||
prop="itemQuantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="发热人数"
|
||||
align="center"
|
||||
key="itemQuantity"
|
||||
prop="itemQuantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="腹泻人数"
|
||||
align="center"
|
||||
key="itemQuantity"
|
||||
prop="itemQuantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="报损日期"
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</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"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="numberOfVisits">
|
||||
import {getReportLossPage,} from "./statisticalManagent";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const dateTypeOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
const visitsYear = formatDate(new Date(),1)
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
dateType:"1",
|
||||
visitTime1: formatDate(new Date(),2),
|
||||
visitTime2: formatDate(new Date(),3),
|
||||
visitTime3: formatDate(new Date(),4),
|
||||
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
function visitTimeChange(val){
|
||||
getWeekDataList(val)
|
||||
}
|
||||
function getWeek(){
|
||||
if(new Date().getDay()==1){ //当前是星期一
|
||||
let weekTime = formatDate(new Date(),5,1)
|
||||
return weekTime
|
||||
}else if(new Date().getDay()==2){ //当前是星期二
|
||||
let weekTime = formatDate(new Date(),5,2)
|
||||
return weekTime
|
||||
}else if(new Date().getDay()==3){ //当前是星期三
|
||||
let weekTime = formatDate(new Date(),5,3)
|
||||
return weekTime
|
||||
}else if(new Date().getDay()==4){ //当前是星期四
|
||||
let weekTime = formatDate(new Date(),5,4)
|
||||
return weekTime
|
||||
}else if(new Date().getDay()==5){ //当前是星期五
|
||||
let weekTime = formatDate(new Date(),5,5)
|
||||
return weekTime
|
||||
}else if(new Date().getDay()==6){ //当前是星期六
|
||||
let weekTime = formatDate(new Date(),5,6)
|
||||
return weekTime
|
||||
}else if(new Date().getDay()==7){ //当前是星期日
|
||||
let weekTime = formatDate(new Date(),5,7)
|
||||
return weekTime
|
||||
}
|
||||
}
|
||||
|
||||
function getWeekDataList(val) {
|
||||
let oneDayTime = 1000 * 60 * 60 * 24
|
||||
let today =val?new Date(val):new Date(getWeek())
|
||||
let todayDay = today.getDay() || 7
|
||||
let startDate =new Date(today.getTime() + oneDayTime * (todayDay - 1))
|
||||
let dateList = []
|
||||
for (let i = 0; i < 7; i++) {
|
||||
let temp =new Date(startDate.getTime() - i * oneDayTime)
|
||||
let year = temp.getFullYear()
|
||||
let month = temp.getMonth() + 1 < 10 ? '0' + (temp.getMonth() + 1) : temp.getMonth() + 1
|
||||
let day = temp.getDate() < 10 ? '0' + temp.getDate() : temp.getDate()
|
||||
dateList[i] = `${year}-${month}-${day}`
|
||||
}
|
||||
console.log(dateList,"选中周的时间")
|
||||
return dateList
|
||||
}
|
||||
function getPharmacyCabinetLists() {
|
||||
dateTypeOptions.value = [{value:"1",label:"每天"},{value:"2",label:"每周"},{value:"3",label:"每月"}]
|
||||
queryParams.value.dateType = "1"
|
||||
// getInit().then((response) => {
|
||||
// chrgitmLv_enumTextOptions.value = response.data.chrgitmLvOptions
|
||||
// })
|
||||
}
|
||||
function dateTypeChange(val){
|
||||
console.log(val,queryParams.value.visitTime2,"!@1")
|
||||
if(val == "2"){ //每周
|
||||
getWeekDataList()
|
||||
}
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportLossPage(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
function formatDate(cellValue,yearType,value) {
|
||||
if (cellValue == null || cellValue == "") return "";
|
||||
var date = new Date(cellValue)
|
||||
var year = date.getFullYear()
|
||||
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
|
||||
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
|
||||
var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
|
||||
var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
|
||||
var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
|
||||
// var nowDayOfWeek = date.getDay(); // 今天本周的第几天
|
||||
// var nowDay = nowDayOfWeek || 7;
|
||||
// var startWeek = new Date(year, month, day + 1 - nowDay)
|
||||
// console.log(startWeek,"startWeek")
|
||||
if(yearType==2||yearType==1||yearType==3){
|
||||
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
|
||||
}else if(yearType==5){
|
||||
day = date.getDate() < 10 ? '0' + date.getDate()-value : date.getDate()-value
|
||||
console.log(day,"day")
|
||||
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
|
||||
}else{
|
||||
return year + '-' + month
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -1,102 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="offlinePurchaseRatioList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
key="itemName"
|
||||
prop="itemName"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医疗机构名称"
|
||||
align="center"
|
||||
key="orgName"
|
||||
prop="orgName"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="实际药品采购金额(元)"
|
||||
align="center"
|
||||
key="actualDrugPurchasePrice"
|
||||
prop="actualDrugPurchasePrice"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="平台采购金额(元)"
|
||||
align="center"
|
||||
key="platformPurchasePrice"
|
||||
prop="platformPurchasePrice"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="offlinePurchaseRatioDetails">
|
||||
import {getReportOfflinePurchaseRatio} from './statisticalManagent';
|
||||
|
||||
const offlinePurchaseRatioList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const total = ref(0);
|
||||
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
occurrenceTimeSTime: undefined,
|
||||
occurrenceTimeETime: undefined,
|
||||
});
|
||||
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportOfflinePurchaseRatio(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
offlinePurchaseRatioList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
})
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
// 页面加载时获取数据
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,451 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<el-form-item label="统计时间:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD" />
|
||||
</el-form-item>
|
||||
<el-form-item label="统计类型:" prop="statisticsType">
|
||||
<el-select
|
||||
v-model="queryParams.statisticsType"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option label="门诊收入分类" value="outpatientIncome" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="医院:" prop="hospital">
|
||||
<el-select
|
||||
v-model="queryParams.hospital"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px">
|
||||
<el-option :label="userStore.hospitalName" value="sameHospital" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="科室:" prop="department">
|
||||
<el-select
|
||||
v-model="queryParams.department"
|
||||
placeholder="请选择科室"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@change="handleDepartmentChange"
|
||||
>
|
||||
<el-option label="全部" value="all" />
|
||||
<el-option
|
||||
v-for="dept in departmentOptions"
|
||||
:key="dept.value"
|
||||
:label="dept.label"
|
||||
:value="dept.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目类型:" prop="itemType">
|
||||
<el-select
|
||||
v-model="queryParams.itemType"
|
||||
placeholder="请选择项目类型"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
:disabled="!queryParams.department || queryParams.department === 'all'"
|
||||
>
|
||||
<el-option label="全部" value="all" />
|
||||
<el-option
|
||||
v-for="item in filteredItemTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="processedTableData" @selection-change="handleSelectionChange"
|
||||
:span-method="spanMethod" height="calc(100vh - 300px)" border>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="科室" align="center" key="department" prop="department" width="120"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="类别" align="center" key="category" prop="category" width="120" />
|
||||
<el-table-column label="金额" align="center" key="amount" prop="amount" width="120">
|
||||
<template #default="scope">
|
||||
<span :class="{
|
||||
'subtotal-text': scope.row.rowType === 'subtotal',
|
||||
'drug-text': scope.row.rowType === 'drug',
|
||||
'total-text': scope.row.rowType === 'total'
|
||||
}">
|
||||
{{ formatDisplayValue(scope.row.amount, scope.row.rowType) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="药品成本" align="center" prop="drugCost" width="120">
|
||||
<template #default="scope">
|
||||
<span :class="{
|
||||
'subtotal-text': scope.row.rowType === 'subtotal',
|
||||
'drug-text': scope.row.rowType === 'drug',
|
||||
'total-text': scope.row.rowType === 'total'
|
||||
}">
|
||||
{{ formatDrugCostDisplay(scope.row.drugCost, scope.row.rowType) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="净收入" align="center" prop="netIncome" width="120">
|
||||
<template #default="scope">
|
||||
<span :class="{
|
||||
'subtotal-text': scope.row.rowType === 'subtotal',
|
||||
'drug-text': scope.row.rowType === 'drug',
|
||||
'total-text': scope.row.rowType === 'total'
|
||||
}">
|
||||
{{ formatDisplayValue(scope.row.netIncome, scope.row.rowType) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="OutpatientDepartmentMetrics">
|
||||
import {getOutpatientDepartmentMetrics} from './statisticalManagent';
|
||||
import {computed, reactive, ref, toRefs} from 'vue';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
const userStore = useUserStore();
|
||||
const loading = ref(true);
|
||||
const total = ref(0);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
statisticsType: undefined,
|
||||
hospital: undefined,
|
||||
department: undefined,
|
||||
itemType: undefined
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
const { queryParams } = toRefs(data);
|
||||
|
||||
// 原始数据
|
||||
const originalData = ref([
|
||||
{ department: '内科门诊', category: '西药', amount: 115.64, drugCost: 100.56, netIncome: 15.084 },
|
||||
{ department: '内科门诊', category: '医用耗材', amount: 6.00, drugCost: 0, netIncome: 6 },
|
||||
{ department: '内科门诊', category: '护理', amount: 30.00, drugCost: 0, netIncome: 30 },
|
||||
{ department: '妇科', category: '西药', amount: 148.70, drugCost: 112.44, netIncome: 36.255 },
|
||||
{ department: '妇科', category: '治疗', amount: 18.00, drugCost: 0, netIncome: 18 },
|
||||
]);
|
||||
|
||||
// 动态生成科室选项
|
||||
const departmentOptions = computed(() => {
|
||||
const departments = [...new Set(originalData.value.map(item => item.department))];
|
||||
return departments.map(dept => ({
|
||||
label: dept,
|
||||
value: dept
|
||||
}));
|
||||
});
|
||||
|
||||
// 所有项目类型选项
|
||||
const allItemTypeOptions = computed(() => {
|
||||
const categories = [...new Set(originalData.value.map(item => item.category))];
|
||||
return categories.map(category => ({
|
||||
label: category,
|
||||
value: category
|
||||
}));
|
||||
});
|
||||
|
||||
// 根据选择的科室过滤项目类型选项
|
||||
const filteredItemTypeOptions = computed(() => {
|
||||
if (!queryParams.value.department || queryParams.value.department === 'all') {
|
||||
return allItemTypeOptions.value;
|
||||
}
|
||||
|
||||
// 获取该科室下的所有项目类型
|
||||
const deptCategories = [...new Set(
|
||||
originalData.value
|
||||
.filter(item => item.department === queryParams.value.department)
|
||||
.map(item => item.category)
|
||||
)];
|
||||
|
||||
return allItemTypeOptions.value.filter(item =>
|
||||
deptCategories.includes(item.value)
|
||||
);
|
||||
});
|
||||
|
||||
// 科室变化时的处理
|
||||
const handleDepartmentChange = (value) => {
|
||||
// 如果选择了具体科室,重置项目类型为"全部"
|
||||
if (value && value !== 'all') {
|
||||
queryParams.value.itemType = 'all';
|
||||
}
|
||||
};
|
||||
|
||||
// 过滤后的数据(根据查询条件)
|
||||
const filteredData = computed(() => {
|
||||
let data = [...originalData.value];
|
||||
|
||||
// 科室筛选
|
||||
if (queryParams.value.department && queryParams.value.department !== 'all') {
|
||||
data = data.filter(item => item.department === queryParams.value.department);
|
||||
}
|
||||
|
||||
// 项目类型筛选
|
||||
if (queryParams.value.itemType && queryParams.value.itemType !== 'all') {
|
||||
data = data.filter(item => item.category === queryParams.value.itemType);
|
||||
}
|
||||
|
||||
return data;
|
||||
});
|
||||
|
||||
const formatCurrency = (value) => {
|
||||
return value ? value.toFixed(2) : '0.00';
|
||||
}
|
||||
|
||||
const formatDisplayValue = (value, rowType) => {
|
||||
if (rowType === 'drug' && typeof value === 'string') {
|
||||
return value; // 药品占比行显示百分比字符串
|
||||
}
|
||||
return formatCurrency(value);
|
||||
}
|
||||
|
||||
const formatDrugCostDisplay = (value, rowType) => {
|
||||
if (rowType === 'drug') {
|
||||
return '药品占比'; // 药品占比行显示文字"药品占比"
|
||||
}
|
||||
return formatCurrency(value);
|
||||
}
|
||||
|
||||
// 动态获取所有科室(基于过滤后的数据)
|
||||
const departments = computed(() => {
|
||||
return [...new Set(filteredData.value.map(item => item.department))];
|
||||
})
|
||||
|
||||
// 构建完整的表格数据(包含小计、药品金额和占比、总计)
|
||||
const processedTableData = computed(() => {
|
||||
const data = [];
|
||||
|
||||
// 处理每个科室
|
||||
departments.value.forEach(dept => {
|
||||
const deptData = filteredData.value.filter(item => item.department === dept);
|
||||
|
||||
// 添加详细数据
|
||||
data.push(...deptData.map(item => ({
|
||||
...item,
|
||||
rowType: 'detail'
|
||||
})));
|
||||
|
||||
// 计算小计
|
||||
const subtotal = deptData.reduce((sum, item) => ({
|
||||
amount: sum.amount + item.amount,
|
||||
drugCost: sum.drugCost + item.drugCost,
|
||||
netIncome: sum.netIncome + item.netIncome
|
||||
}), { amount: 0, drugCost: 0, netIncome: 0 });
|
||||
|
||||
// 添加小计行
|
||||
data.push({
|
||||
department: dept,
|
||||
category: '小计',
|
||||
amount: Number(subtotal.amount.toFixed(2)),
|
||||
drugCost: Number(subtotal.drugCost.toFixed(2)),
|
||||
netIncome: Number(subtotal.netIncome.toFixed(2)),
|
||||
rowType: 'subtotal'
|
||||
});
|
||||
|
||||
// 计算药品金额和占比
|
||||
const drugAmount = deptData
|
||||
.filter(item => item.category.includes('药'))
|
||||
.reduce((sum, item) => sum + item.amount, 0);
|
||||
|
||||
const totalAmount = subtotal.amount;
|
||||
const drugRatio = totalAmount > 0 ? ((drugAmount / totalAmount) * 100).toFixed(2) + '%' : '0.00%';
|
||||
|
||||
// 添加药品金额和占比行
|
||||
data.push({
|
||||
department: dept,
|
||||
category: '药品金额',
|
||||
amount: Number(drugAmount.toFixed(2)), // 在金额列显示药品金额
|
||||
drugCost: '药品占比', // 在药品成本列显示文字"药品占比"
|
||||
netIncome: drugRatio, // 在净收入列显示占比值
|
||||
rowType: 'drug'
|
||||
});
|
||||
});
|
||||
|
||||
// 计算合计
|
||||
const totalData = filteredData.value.reduce((sum, item) => ({
|
||||
amount: sum.amount + item.amount,
|
||||
drugCost: sum.drugCost + item.drugCost,
|
||||
netIncome: sum.netIncome + item.netIncome
|
||||
}), { amount: 0, drugCost: 0, netIncome: 0 });
|
||||
|
||||
|
||||
// 计算合计的药品金额和占比
|
||||
const totalDrugAmount = filteredData.value.filter(item => item.category.includes('药')).reduce((sum, item) => sum + item.amount, 0);
|
||||
const totalDrugRatio = totalData.amount > 0 ?
|
||||
((totalDrugAmount / totalData.amount) * 100).toFixed(2) + '%' : '0.00%';
|
||||
|
||||
// 添加合计行
|
||||
data.push({
|
||||
department: '合计',
|
||||
category: '合计',
|
||||
amount: Number(totalData.amount.toFixed(2)),
|
||||
drugCost: Number(totalData.drugCost.toFixed(2)),
|
||||
netIncome: Number(totalData.netIncome.toFixed(2)),
|
||||
rowType: 'total'
|
||||
});
|
||||
|
||||
// 添加总计的药品占比行
|
||||
data.push({
|
||||
department: '药品金额',
|
||||
category: '药品金额',
|
||||
amount: Number(totalDrugAmount.toFixed(2)),
|
||||
drugCost: '药品占比',
|
||||
netIncome: totalDrugRatio,
|
||||
rowType: 'drug'
|
||||
});
|
||||
|
||||
return data;
|
||||
});
|
||||
|
||||
// 预计算合并信息
|
||||
const spanInfo = computed(() => {
|
||||
const info = [];
|
||||
let currentDept = null;
|
||||
let startIndex = 0;
|
||||
let rowCount = 0;
|
||||
|
||||
for (let i = 0; i < processedTableData.value.length; i++) {
|
||||
const row = processedTableData.value[i];
|
||||
|
||||
if (row.department !== currentDept) {
|
||||
if (currentDept !== null) {
|
||||
info.push({ startIndex: startIndex, rowCount: rowCount });
|
||||
}
|
||||
currentDept = row.department;
|
||||
startIndex = i;
|
||||
rowCount = 1;
|
||||
} else {
|
||||
rowCount++;
|
||||
}
|
||||
|
||||
// 最后一个元素
|
||||
if (i === processedTableData.value.length - 1) {
|
||||
info.push({ startIndex: startIndex, rowCount: rowCount });
|
||||
}
|
||||
}
|
||||
|
||||
return info;
|
||||
});
|
||||
|
||||
const spanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
||||
// 合并科室列(第一列)
|
||||
if (columnIndex === 1) {
|
||||
for (const info of spanInfo.value) {
|
||||
if (rowIndex >= info.startIndex && rowIndex < info.startIndex + info.rowCount) {
|
||||
if (rowIndex === info.startIndex) {
|
||||
// 该科室的第一行,合并所有行
|
||||
return { rowspan: info.rowCount, colspan: 1 };
|
||||
} else {
|
||||
// 该科室的其他行隐藏
|
||||
return { rowspan: 0, colspan: 0 };
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return { rowspan: 1, colspan: 1 };
|
||||
}
|
||||
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getOutpatientDepartmentMetrics(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
// 这里将接口返回的数据赋值给 originalData
|
||||
if (res.data && res.data.records) {
|
||||
originalData.value = res.data.records;
|
||||
}
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function handleClear() {
|
||||
// 重置查询参数
|
||||
queryParams.value = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
statisticsType: undefined,
|
||||
hospital: undefined,
|
||||
department: undefined,
|
||||
itemType: undefined
|
||||
};
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 多选框选中数据 */
|
||||
function handleSelectionChange(selection) {
|
||||
// 处理选中数据
|
||||
console.log('选中数据:', selection);
|
||||
}
|
||||
|
||||
// 初始化加载
|
||||
getList();
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.subtotal-text {
|
||||
font-weight: bold;
|
||||
color: #409EFF;
|
||||
}
|
||||
|
||||
.drug-text {
|
||||
font-weight: bold;
|
||||
color: #67C23A;
|
||||
}
|
||||
|
||||
.total-text {
|
||||
font-weight: bold;
|
||||
color: #F56C6C;
|
||||
}
|
||||
|
||||
/* 行样式 */
|
||||
:deep(.el-table .el-table__row) {
|
||||
&[data-row-type="subtotal"] td {
|
||||
background-color: #f0f9ff;
|
||||
}
|
||||
&[data-row-type="drug"] td {
|
||||
background-color: #f0f9ff;
|
||||
}
|
||||
&[data-row-type="total"] td {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
}
|
||||
|
||||
/* 禁用状态样式 */
|
||||
:deep(.el-select .el-input.is-disabled .el-input__inner) {
|
||||
background-color: #f5f7fa;
|
||||
border-color: #e4e7ed;
|
||||
color: #c0c4cc;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
</style>
|
||||
@@ -1,258 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<el-form-item label="搜索条件" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="门诊号/药品名/生产企业"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="药品医保编码" prop="medYbNo">
|
||||
<el-input
|
||||
v-model="queryParams.medYbNo"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="药品类型:" prop="categoryCode">
|
||||
<el-select
|
||||
v-model="queryParams.categoryCode"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in med_category_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="patientDetailsList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="门诊住院号"
|
||||
align="center"
|
||||
key="encounterBusNo"
|
||||
prop="encounterBusNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品通用名"
|
||||
align="center"
|
||||
key="medName"
|
||||
prop="medName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品医保编码"
|
||||
align="center"
|
||||
key="medYbNo"
|
||||
prop="medYbNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品类别"
|
||||
align="center"
|
||||
key="categoryCode_dictText"
|
||||
prop="categoryCode_dictText"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="剂型"
|
||||
align="center"
|
||||
key="doseFormCode_dictText"
|
||||
prop="doseFormCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装"
|
||||
align="center"
|
||||
key="packageUnit_dictText"
|
||||
prop="packageUnit_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="计价单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="是否中选产品"
|
||||
align="center"
|
||||
key="isSelected"
|
||||
prop="isSelected"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产企业"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
width="240"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单价(元)"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="使用数量(片袋支)"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="使用总金额(元)"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="patientDetails">
|
||||
import {getCurrentInstance, onMounted, ref} from 'vue';
|
||||
import {getReportPatientDetails} from './statisticalManagent';
|
||||
|
||||
// 获取当前实例的proxy
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const patientDetailsList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const total = ref(0);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const queryRef = ref();
|
||||
|
||||
// 字典数据
|
||||
const { med_category_code } = proxy.useDict("med_category_code");
|
||||
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
categoryCode: undefined, // 添加缺失的categoryCode属性
|
||||
encounterBusNo: undefined,
|
||||
medName: undefined,
|
||||
medYbNo: undefined,
|
||||
manufacturerText: undefined,
|
||||
});
|
||||
|
||||
/** 查询患者明细列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportPatientDetails(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
patientDetailsList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
}).catch(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
proxy.resetForm('queryRef');
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length !== 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet(
|
||||
'report-manage/inbound/excel-out',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`patient_details_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
|
||||
// 页面加载时获取数据
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.mb8 {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,187 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="patientMasterList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="门诊住院号"
|
||||
align="center"
|
||||
key="encounterBusNo"
|
||||
prop="encounterBusNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="患者姓名"
|
||||
align="center"
|
||||
key="patientName"
|
||||
prop="patientName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="身份证号"
|
||||
align="center"
|
||||
key="idCard"
|
||||
prop="idCard"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="人员编码"
|
||||
align="center"
|
||||
key="psnNo"
|
||||
prop="psnNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="参保地区"
|
||||
align="center"
|
||||
key="insuPlcNo"
|
||||
prop="insuPlcNo"
|
||||
width="140px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="参保类型"
|
||||
align="center"
|
||||
key="ybType"
|
||||
prop="ybType"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="入院时间"
|
||||
align="center"
|
||||
key="encounterStartTime"
|
||||
prop="encounterStartTime"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.occurrenceTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="出院时间"
|
||||
align="center"
|
||||
key="encounterEndTime"
|
||||
prop="encounterEndTime"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="处方日期"
|
||||
align="center"
|
||||
key="issueTime"
|
||||
prop="issueTime"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="出院诊断"
|
||||
align="center"
|
||||
key="outDiagnoseName"
|
||||
prop="outDiagnoseName"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="总费用(元)"
|
||||
align="center"
|
||||
key="feeAmount"
|
||||
prop="feeAmount"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="政策范围内"
|
||||
align="center"
|
||||
key="inscpScpAmt"
|
||||
prop="inscpScpAmt"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="基本医保统筹支付金额(元)"
|
||||
align="center"
|
||||
key="tcPayAmount"
|
||||
prop="tcPayAmount"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="patientMasterDetails">
|
||||
import {getReportPatientMasterDetail} from './statisticalManagent';
|
||||
|
||||
|
||||
const patientMasterList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const total = ref(0);
|
||||
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
encounterBusNo: undefined,
|
||||
patientName: undefined,
|
||||
});
|
||||
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportPatientMasterDetail(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
patientMasterList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
})
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
// 页面加载时获取数据
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,349 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<div class="left-container">
|
||||
<el-form
|
||||
style="margin-top:20px;margin-left:20px;"
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="开始时间:">
|
||||
<el-date-picker
|
||||
v-model="queryParams.dispenseDateSTime"
|
||||
type="datetime"
|
||||
placeholder="请选择开始时间"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 200px;"
|
||||
:clearable="false"
|
||||
@change="handleTimeChange('start')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间:">
|
||||
<el-date-picker
|
||||
v-model="queryParams.dispenseDateETime"
|
||||
type="datetime"
|
||||
placeholder="请选择结束时间"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 200px;"
|
||||
:clearable="false"
|
||||
@change="handleTimeChange('end')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="Search"
|
||||
@click="handleQuery"
|
||||
>查询</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
>重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
style="padding:0 20px;width:100%;margin-top:20px;"
|
||||
v-loading="leftLoading"
|
||||
:data="leftTableData"
|
||||
@row-click="handleRowClick"
|
||||
>
|
||||
<el-table-column label="科室名" prop="orgName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="耗材和药品总金额" prop="totalMoney" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<span class="link" @click.stop="handleRowClick(scope.row)">{{ scope.row.totalMoney }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<div class="right-container">
|
||||
<el-form
|
||||
style="margin-top:20px;margin-left:20px;"
|
||||
:model="rightQueryParams"
|
||||
:inline="true"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-form-item label="项目名:">
|
||||
<el-input
|
||||
v-model="rightQueryParams.name"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleRightQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="Search"
|
||||
@click="handleRightQuery"
|
||||
>查询</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
:disabled="!rightQueryParams.orgId"
|
||||
>导出Excel</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
style="padding:0 20px;margin-top:20px;"
|
||||
v-loading="rightLoading"
|
||||
:data="rightTableData"
|
||||
>
|
||||
<el-table-column label="项目名" prop="name" width="180" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格" prop="totalVolume" width="150" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="产品型号" prop="lotNumber" width="150" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="生产厂家" prop="manufacturerText" width="500" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="数量" prop="totalQuantity" width="100" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="单位" prop="unitCode_dictText" width="100" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="单价" prop="unitPrice" width="100" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="项目总价" prop="totalMoney" width="120" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="所属科室" prop="orgId_dictText" width="150" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="发放时间" prop="dispenseTime" width="240" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<span>{{ formatIsoDate(scope.row.dispenseTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 添加右侧分页组件 -->
|
||||
<div class="pagination-container">
|
||||
<el-pagination
|
||||
v-model:current-page="rightQueryParams.pageNo"
|
||||
v-model:page-size="rightQueryParams.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="rightTotal"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="pharmacyStatisticsDetails">
|
||||
import {onMounted, reactive, ref, toRefs} from 'vue';
|
||||
import {useRouter} from 'vue-router';
|
||||
import {getMedDevAll, getMedDevInfo} from './statisticalManagent';
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
// 左侧列表数据
|
||||
const leftTableData = ref([]);
|
||||
const leftLoading = ref(false);
|
||||
const selectedRow = ref(null);
|
||||
|
||||
// 右侧列表数据
|
||||
const rightTableData = ref([]);
|
||||
const rightLoading = ref(false);
|
||||
// 添加右侧总条数
|
||||
const rightTotal = ref(0);
|
||||
|
||||
// 查询参数
|
||||
// 初始化时就设置默认时间,防止被清空
|
||||
const today = new Date();
|
||||
const lastMonth = new Date();
|
||||
lastMonth.setMonth(lastMonth.getMonth() - 1);
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
dispenseDateSTime: formatDate(lastMonth),
|
||||
dispenseDateETime: formatDate(today),
|
||||
},
|
||||
rightQueryParams: {
|
||||
name: '',
|
||||
orgId: '',
|
||||
dispenseDateSTime: '',
|
||||
dispenseDateETime: '',
|
||||
// 添加分页参数
|
||||
pageNo: 1,
|
||||
pageSize: 20
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, rightQueryParams } = toRefs(data);
|
||||
|
||||
// 添加时间变化处理函数
|
||||
function handleTimeChange(type) {
|
||||
if (type === 'start' && !queryParams.value.dispenseDateSTime) {
|
||||
queryParams.value.dispenseDateSTime = formatDate(lastMonth);
|
||||
} else if (type === 'end' && !queryParams.value.dispenseDateETime) {
|
||||
queryParams.value.dispenseDateETime = formatDate(today);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取左侧统计数据
|
||||
function getLeftList() {
|
||||
leftLoading.value = true;
|
||||
getMedDevAll(queryParams.value).then((res) => {
|
||||
leftTableData.value = res.data.data || [];
|
||||
leftLoading.value = false;
|
||||
}).catch(() => {
|
||||
leftLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 获取右侧详情数据
|
||||
function getRightList() {
|
||||
rightLoading.value = true;
|
||||
getMedDevInfo(rightQueryParams.value).then((res) => {
|
||||
console.log(res)
|
||||
rightTableData.value = res.data.records || [];
|
||||
// 设置总条数
|
||||
rightTotal.value = res.data.total || 0;
|
||||
rightLoading.value = false;
|
||||
}).catch(() => {
|
||||
rightLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 左侧列表查询
|
||||
function handleQuery() {
|
||||
getLeftList();
|
||||
}
|
||||
|
||||
// 左侧列表清空 - 修改为不清空时间
|
||||
function handleClear() {
|
||||
// 不再清空时间字段
|
||||
proxy.resetForm("queryRef", ['dispenseDateSTime', 'dispenseDateETime']);
|
||||
getLeftList();
|
||||
}
|
||||
|
||||
// 点击左侧行
|
||||
function handleRowClick(row) {
|
||||
selectedRow.value = row;
|
||||
// 设置右侧查询参数
|
||||
rightQueryParams.value.orgId = row.orgId;
|
||||
rightQueryParams.value.dispenseDateSTime = queryParams.value.dispenseDateSTime;
|
||||
rightQueryParams.value.dispenseDateETime = queryParams.value.dispenseDateETime;
|
||||
// 重置页码
|
||||
rightQueryParams.value.pageNo = 1;
|
||||
// 查询右侧数据
|
||||
getRightList();
|
||||
}
|
||||
|
||||
// 右侧列表查询
|
||||
function handleRightQuery() {
|
||||
getRightList();
|
||||
}
|
||||
|
||||
// 初始加载
|
||||
onMounted(() => {
|
||||
// 设置默认时间为近一个月
|
||||
const endDate = new Date();
|
||||
const startDate = new Date();
|
||||
startDate.setMonth(startDate.getMonth() - 1);
|
||||
queryParams.value.dispenseDateSTime = formatDate(startDate);
|
||||
queryParams.value.dispenseDateETime = formatDate(endDate);
|
||||
getLeftList();
|
||||
});
|
||||
|
||||
// 格式化日期为YYYY-MM-DD HH:mm:ss
|
||||
function formatDate(date) {
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
const hours = String(date.getHours()).padStart(2, '0');
|
||||
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||
const seconds = String(date.getSeconds()).padStart(2, '0');
|
||||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||
}
|
||||
|
||||
// 格式化ISO日期字符串为YYYY-MM-DD HH:mm:ss
|
||||
function formatIsoDate(isoString) {
|
||||
if (!isoString) return '';
|
||||
try {
|
||||
const date = new Date(isoString);
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
const hours = String(date.getHours()).padStart(2, '0');
|
||||
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||
const seconds = String(date.getSeconds()).padStart(2, '0');
|
||||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||
} catch (error) {
|
||||
console.error('Invalid ISO date string:', isoString);
|
||||
return isoString;
|
||||
}
|
||||
}
|
||||
|
||||
// 分页处理函数
|
||||
function handleSizeChange(val) {
|
||||
rightQueryParams.value.pageSize = val;
|
||||
getRightList();
|
||||
}
|
||||
|
||||
function handleCurrentChange(val) {
|
||||
rightQueryParams.value.pageNo = val;
|
||||
getRightList();
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet("/report-manage/medication-device/excel-out", {
|
||||
...rightQueryParams.value,
|
||||
}, `config_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.app-container {
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.left-container {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.left-container .el-table {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden; /* 添加这行来隐藏水平滚动条 */
|
||||
margin-top: 20px;
|
||||
width: 100%; /* 确保表格宽度适应容器 */
|
||||
}
|
||||
|
||||
.right-container {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.right-container .el-table {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.link {
|
||||
color: #409eff;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.pagination-container {
|
||||
margin-top: 15px;
|
||||
text-align: right;
|
||||
margin-right: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,157 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="statistics-portal">
|
||||
<h2 class="portal-title">药物统计管理门户</h2>
|
||||
<p class="portal-description">选择您想要查看的统计报告类型</p>
|
||||
|
||||
<div class="statistics-grid">
|
||||
<!-- 库存统计 -->
|
||||
<el-card class="statistic-card" @click="goToPage('/medicationmanagement/statisticalManagement')">
|
||||
<div class="card-content">
|
||||
<div class="card-icon">
|
||||
<i class="el-icon-data-analysis" style="font-size: 36px; color: #409EFF;"></i>
|
||||
</div>
|
||||
<div class="card-text">
|
||||
<h3>库存统计</h3>
|
||||
<p>查看药品库存情况</p>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<!-- 效期预警 -->
|
||||
<el-card class="statistic-card" @click="goToPage('/medicationmanagement/statisticalManagement/earlyWarning')">
|
||||
<div class="card-content">
|
||||
<div class="card-icon">
|
||||
<i class="el-icon-warning-outline" style="font-size: 36px; color: #E6A23C;"></i>
|
||||
</div>
|
||||
<div class="card-text">
|
||||
<h3>效期预警</h3>
|
||||
<p>查看即将过期的药品</p>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<!-- 药品使用情况 -->
|
||||
<el-card class="statistic-card" @click="goToPage('/medicationmanagement/statisticalManagement/medicationUsageDetails')">
|
||||
<div class="card-content">
|
||||
<div class="card-icon">
|
||||
<i class="el-icon-trend-charts" style="font-size: 36px; color: #67C23A;"></i>
|
||||
</div>
|
||||
<div class="card-text">
|
||||
<h3>药品使用情况</h3>
|
||||
<p>查看药品使用统计</p>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<!-- 药品销售情况 -->
|
||||
<el-card class="statistic-card" @click="goToPage('/medicationmanagement/statisticalManagement/medicationSaleDetails')">
|
||||
<div class="card-content">
|
||||
<div class="card-icon">
|
||||
<i class="el-icon-sell" style="font-size: 36px; color: #F56C6C;"></i>
|
||||
</div>
|
||||
<div class="card-text">
|
||||
<h3>药品销售情况</h3>
|
||||
<p>查看药品销售统计</p>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<!-- 采购入库明细 -->
|
||||
<el-card class="statistic-card" @click="goToPage('/medicationmanagement/statisticalManagement/medicationInboundDetails')">
|
||||
<div class="card-content">
|
||||
<div class="card-icon">
|
||||
<i class="el-icon-shopping-cart-full" style="font-size: 36px; color: #909399;"></i>
|
||||
</div>
|
||||
<div class="card-text">
|
||||
<h3>采购入库明细</h3>
|
||||
<p>查看采购入库统计</p>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<!-- 出库明细 -->
|
||||
<el-card class="statistic-card" @click="goToPage('/medicationmanagement/statisticalManagement/stockOutDetail')">
|
||||
<div class="card-content">
|
||||
<div class="card-icon">
|
||||
<i class="el-icon-shopping-cart-1" style="font-size: 36px; color: #409EFF;"></i>
|
||||
</div>
|
||||
<div class="card-text">
|
||||
<h3>出库明细</h3>
|
||||
<p>查看药品出库统计</p>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const goToPage = (path) => {
|
||||
router.push(path);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.statistics-portal {
|
||||
padding: 20px;
|
||||
|
||||
.portal-title {
|
||||
text-align: center;
|
||||
margin-bottom: 10px;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.portal-description {
|
||||
text-align: center;
|
||||
color: #909399;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.statistics-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.statistic-card {
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.card-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.card-icon {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.card-text {
|
||||
flex: 1;
|
||||
|
||||
h3 {
|
||||
margin: 0 0 5px 0;
|
||||
font-size: 16px;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
color: #909399;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,226 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="productUsageDetailsList"
|
||||
@selection-change="handleSelectionChange"
|
||||
height="calc(100vh - 300px)"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品通用名"
|
||||
align="center"
|
||||
key="medName"
|
||||
prop="medName"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- itemTable -->
|
||||
<el-table-column
|
||||
label="产品名称"
|
||||
align="center"
|
||||
key="productName"
|
||||
prop="productName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="剂型"
|
||||
align="center"
|
||||
key="doseFormCode_dictText"
|
||||
prop="doseFormCode_dictText"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装"
|
||||
align="center"
|
||||
key="packageUnit"
|
||||
prop="packageUnit"
|
||||
width="140px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="计价单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产企业"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="价格(每盒瓶/元)"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="是否医保患者使用"
|
||||
align="center"
|
||||
key="isUsed"
|
||||
prop="isUsed"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="患者参保地"
|
||||
align="center"
|
||||
key="insuplcName"
|
||||
prop="insuplcName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="参保类型"
|
||||
align="center"
|
||||
key="ybType"
|
||||
prop="ybType"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="使用数量(片袋支)"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="使用金额(片袋支)"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="productUsageDetails">
|
||||
import {getReportProductUsageDetails,} from './statisticalManagent';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
|
||||
const productUsageDetailsList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const approvalTime = ref([]);
|
||||
const supplierListOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
occurrenceTimeSTime: undefined,
|
||||
occurrenceTimeETime: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询产品使用情况项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportProductUsageDetails(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
productUsageDetailsList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.occurrenceTimeSTime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[0] + ' 00:00:00' : '';
|
||||
queryParams.value.occurrenceTimeETime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[1] + ' 23:59:59' : '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.occurrenceTimeSTime = '';
|
||||
queryParams.value.occurrenceTimeETime = '';
|
||||
approvalTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,506 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<el-form-item label="药品名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="编码/单据号/药品名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="单据号:" prop="busNo">
|
||||
<el-input
|
||||
v-model="queryParams.busNo"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="药品名称:" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="项目编号/项目品名"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="编码:" prop="medicationDefId">
|
||||
<el-input
|
||||
v-model="queryParams.medicationDefId"
|
||||
placeholder="编码:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="审核日期:">
|
||||
<el-date-picker
|
||||
v-model="approvalTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="科室:" prop="department">
|
||||
<el-select
|
||||
v-model="queryParams.department"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="chrgitmLv_enumText in chrgitmLv_enumTextOptions"
|
||||
:key="chrgitmLv_enumText.value"
|
||||
:label="chrgitmLv_enumText.info"
|
||||
:value="chrgitmLv_enumText.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="存放仓库:" prop="purposeLocationId">
|
||||
<el-select
|
||||
v-model="queryParams.purposeLocationId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in locationIdList"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="项目类型:" prop="categoryType">
|
||||
<el-select
|
||||
v-model="queryParams.categoryType"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in item_category_code"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="供应商:" prop="supplierId">
|
||||
<el-select v-model="queryParams.supplierId" placeholder="" clearable style="width: 150px">
|
||||
<el-option
|
||||
v-for="supplierList in supplierListOptions"
|
||||
:key="supplierList.value"
|
||||
:label="supplierList.label"
|
||||
:value="supplierList.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
height="calc(100vh - 300px)"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusno"
|
||||
prop="supplyBusno"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link @click="showDetail(scope.row.supplyBusno)">
|
||||
{{ scope.row.supplyBusno }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- itemTable -->
|
||||
<el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="药品类型"
|
||||
align="center"
|
||||
key="itemTableText"
|
||||
prop="itemTableText"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="140px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="存放仓库"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="货位"
|
||||
align="center"
|
||||
key="locationStoreName"
|
||||
prop="locationStoreName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="计量单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购数量"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购单价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="售价"
|
||||
align="center"
|
||||
key="salePrice"
|
||||
prop="salePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="售价金额"
|
||||
align="center"
|
||||
key="totalSalePrice"
|
||||
prop="totalSalePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="采购科室"
|
||||
align="center"
|
||||
key="department"
|
||||
prop="department"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
key="supplier"
|
||||
prop="supplier"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审核人"
|
||||
align="center"
|
||||
key="approverId_dictText"
|
||||
prop="approverId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单日期"
|
||||
align="center"
|
||||
key="occurrenceTime"
|
||||
prop="occurrenceTime"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.occurrenceTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="审核日期"
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</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-dialog v-model="dialogVisible" title="单据详情" width="1700px" destroy-on-close>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-descriptions :column="4">
|
||||
<el-descriptions-item label="单据编号:">
|
||||
{{ documentDetails[0].busNo }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="制单日期:">
|
||||
{{ documentDetails[0].applyTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="供应商:">
|
||||
{{ documentDetails[0].supplierName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="制单人:">
|
||||
{{ documentDetails[0].practitionerName }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :data="documentDetails" border max-height="600">
|
||||
<el-table-column label="序号" align="center" type="index" width="60" />
|
||||
<el-table-column label="项目名" align="center" prop="itemName" />
|
||||
<el-table-column label="规格" align="center" prop="totalVolume" />
|
||||
<el-table-column label="厂家/产地" align="center" prop="manufacturerText" width="240" />
|
||||
<el-table-column label="仓库" align="center" prop="purposeLocationName" />
|
||||
<el-table-column label="采购数量" align="right" prop="totalQuantity" header-align="center">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.totalQuantity + scope.row.unitCode_dictText }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" align="right" prop="price" header-align="center">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.price.toFixed(2) + ' 元' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合计金额" align="right" prop="totalPrice" header-align="center">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.totalPrice.toFixed(2) + ' 元' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批号" align="center" prop="lotNumber" />
|
||||
<el-table-column label="生产日期" align="center" prop="startTime" width="130">
|
||||
<template #default="scope">
|
||||
<span>{{ formatDateStr(scope.row.startTime, 'YYYY-MM-DD') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="有效期至" align="center" prop="endTime" width="130">
|
||||
<template #default="scope">
|
||||
<span>{{ formatDateStr(scope.row.endTime, 'YYYY-MM-DD') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">关 闭</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="PurchaseDocumentDetsils">
|
||||
import {
|
||||
getDocumentDetails,
|
||||
getInboundInit,
|
||||
getPharmacyCabinetList,
|
||||
getReportInboundPCage,
|
||||
} from './statisticalManagent';
|
||||
import {formatDateStr} from '@/utils/index';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const dialogVisible = ref(false);
|
||||
const total = ref(0);
|
||||
const approvalTime = ref([]);
|
||||
const supplierListOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
const documentDetails = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
busNo: undefined,
|
||||
name: undefined,
|
||||
medicationDefId: undefined,
|
||||
// approvalTime:undefined,
|
||||
department: undefined,
|
||||
purposeLocationId: undefined,
|
||||
categoryType: undefined,
|
||||
supplierId: undefined,
|
||||
occurrenceTimeSTime: undefined,
|
||||
occurrenceTimeETime: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data;
|
||||
});
|
||||
getInboundInit().then((response) => {
|
||||
supplierListOptions.value = response.data.supplierListOptions;
|
||||
});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet(
|
||||
'report-manage/inbound/excel-out',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`dict_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportInboundPCage(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
// 查看单据详情
|
||||
function showDetail(busNo) {
|
||||
getDocumentDetails({ busNo: busNo }).then((res) => {
|
||||
dialogVisible.value = true;
|
||||
documentDetails.value = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
// 监听路由变化
|
||||
watch(
|
||||
() => route.query,
|
||||
(newQuery) => {
|
||||
// 如果路由中包含指定参数,则使用这些参数进行查询
|
||||
if (
|
||||
newQuery.purposeLocationId ||
|
||||
newQuery.occurrenceTimeSTime ||
|
||||
newQuery.occurrenceTimeETime
|
||||
) {
|
||||
// 设置查询参数
|
||||
if (newQuery.purposeLocationId) {
|
||||
queryParams.value.purposeLocationId = newQuery.purposeLocationId;
|
||||
}
|
||||
if (newQuery.occurrenceTimeSTime) {
|
||||
queryParams.value.occurrenceTimeSTime = newQuery.occurrenceTimeSTime + ' 00:00:00';
|
||||
}
|
||||
if (newQuery.occurrenceTimeETime) {
|
||||
queryParams.value.occurrenceTimeETime = newQuery.occurrenceTimeETime + ' 23:59:59';
|
||||
}
|
||||
|
||||
// 执行查询
|
||||
getList();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.occurrenceTimeSTime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[0] + ' 00:00:00' : '';
|
||||
queryParams.value.occurrenceTimeETime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[1] + ' 23:59:59' : '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.occurrenceTimeSTime = '';
|
||||
queryParams.value.occurrenceTimeETime = '';
|
||||
approvalTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,473 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="药品名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="编码/单据号/药品名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="单据号:" prop="busNo">
|
||||
<el-input
|
||||
v-model="queryParams.busNo"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="药品名称:" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="项目编号/项目品名"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="编码:" prop="medicationDefId">
|
||||
<el-input
|
||||
v-model="queryParams.medicationDefId"
|
||||
placeholder="编码:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="审核日期:">
|
||||
<el-date-picker
|
||||
v-model="approvalTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="科室:" prop="department">
|
||||
<el-select
|
||||
v-model="queryParams.department"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="chrgitmLv_enumText in chrgitmLv_enumTextOptions"
|
||||
:key="chrgitmLv_enumText.value"
|
||||
:label="chrgitmLv_enumText.info"
|
||||
:value="chrgitmLv_enumText.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="存放仓库:" prop="purposeLocationId" >
|
||||
<el-select
|
||||
v-model="queryParams.purposeLocationId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in locationIdList"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="项目类型:" prop="categoryType">
|
||||
<el-select
|
||||
v-model="queryParams.categoryType"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in item_category_code"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="供应商:" prop="supplierId">
|
||||
<el-select
|
||||
v-model="queryParams.supplierId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplierList in supplierListOptions"
|
||||
:key="supplierList.value"
|
||||
:label="supplierList.label"
|
||||
:value="supplierList.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="handleQuery"
|
||||
|
||||
>查询</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
|
||||
>重置</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusno"
|
||||
prop="supplyBusno"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- itemTable -->
|
||||
<el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购单据号"
|
||||
align="center"
|
||||
key="originalBusNo"
|
||||
prop="originalBusNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="药品类型"
|
||||
align="center"
|
||||
key="itemTableText"
|
||||
prop="itemTableText"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="140px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="存放仓库"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="货位"
|
||||
align="center"
|
||||
key="locationStoreName"
|
||||
prop="locationStoreName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="计量单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退货数量"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购单价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退货单价"
|
||||
align="center"
|
||||
key="returnPrice"
|
||||
prop="returnPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退货金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="售价"
|
||||
align="center"
|
||||
key="salePrice"
|
||||
prop="salePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="售价金额"
|
||||
align="center"
|
||||
key="totalSalePrice"
|
||||
prop="totalSalePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<!-- <el-table-column
|
||||
label="采购科室"
|
||||
align="center"
|
||||
key="department"
|
||||
prop="department"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
key="supplier"
|
||||
prop="supplier"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审核人"
|
||||
align="center"
|
||||
key="approverId_dictText"
|
||||
prop="approverId_dictText"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单日期"
|
||||
align="center"
|
||||
key="occurrenceTime"
|
||||
prop="occurrenceTime"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.occurrenceTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="审核日期"
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</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"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="PurchaseReturnDetsils">
|
||||
import {getPharmacyCabinetList, getPurchaseReturnInit, getReportPurchaseReturn} from "./statisticalManagent";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
// const {
|
||||
// item_category_code
|
||||
// } = proxy.useDict(
|
||||
// "item_category_code"
|
||||
// );
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const approvalTime = ref([]);
|
||||
const supplierListOptions = ref([]);
|
||||
// const chrgitmLv_enumTextOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
busNo: undefined,
|
||||
name:undefined,
|
||||
medicationDefId: undefined,
|
||||
// approvalTime:undefined,
|
||||
department:undefined,
|
||||
purposeLocationId: undefined,
|
||||
categoryType: undefined,
|
||||
supplierId: undefined,
|
||||
occurrenceTimeSTime:undefined,
|
||||
occurrenceTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
// 监听路由变化
|
||||
watch(
|
||||
() => route.query,
|
||||
(newQuery) => {
|
||||
// 如果路由中包含指定参数,则使用这些参数进行查询
|
||||
if (newQuery.purposeLocationId || newQuery.occurrenceTimeSTime || newQuery.occurrenceTimeETime) {
|
||||
// 设置查询参数
|
||||
if (newQuery.purposeLocationId) {
|
||||
queryParams.value.purposeLocationId = newQuery.purposeLocationId;
|
||||
}
|
||||
if (newQuery.occurrenceTimeSTime) {
|
||||
queryParams.value.occurrenceTimeSTime = newQuery.occurrenceTimeSTime + ' 00:00:00';
|
||||
}
|
||||
if (newQuery.occurrenceTimeETime) {
|
||||
queryParams.value.occurrenceTimeETime = newQuery.occurrenceTimeETime + ' 23:59:59';
|
||||
}
|
||||
|
||||
// 执行查询
|
||||
getList();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data
|
||||
});
|
||||
getPurchaseReturnInit().then((response) => {
|
||||
supplierListOptions.value = response.data.supplierListOptions
|
||||
})
|
||||
}
|
||||
/** 查询列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportPurchaseReturn(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.occurrenceTimeSTime =
|
||||
approvalTime.value && approvalTime.value.length == 2
|
||||
? approvalTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.occurrenceTimeETime =
|
||||
approvalTime.value && approvalTime.value.length == 2
|
||||
? approvalTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.occurrenceTimeSTime = ""
|
||||
queryParams.value.occurrenceTimeETime = ""
|
||||
approvalTime.value = ""
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet("report-manage/purchase-return/excel-out", {
|
||||
...queryParams.value
|
||||
}, `dict_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,324 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<el-form-item label="结算日期:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
@change="handleQuery"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="清算类型:" prop="clrType">
|
||||
<el-select
|
||||
v-model="queryParams.clrType"
|
||||
placeholder="请选择清算类型"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in clrTypeOptions"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="险种类型:" prop="insuType">
|
||||
<el-select
|
||||
v-model="queryParams.insuType"
|
||||
placeholder="请选择险种类型"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="insuType in insutype"
|
||||
:key="insuType.value"
|
||||
:label="insuType.label"
|
||||
:value="insuType.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同:" prop="contractNo">
|
||||
<el-select
|
||||
v-model="queryParams.contractNo"
|
||||
placeholder="请选择合同"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="insuType in contractNoOptions"
|
||||
:key="insuType.busNo"
|
||||
:label="insuType.contractName"
|
||||
:value="insuType.busNo"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-button type="primary" plain icon="Edit" @click="handleQuery">获取医保交易数据</el-button>
|
||||
<!-- <el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Edit"
|
||||
@click="handleReconciliation"
|
||||
:disabled="ids.length == 0"
|
||||
>
|
||||
医保对总账
|
||||
</el-button> -->
|
||||
<!-- <el-button type="primary" plain icon="Edit" @click="handleGetClroptins">
|
||||
清算机构查询
|
||||
</el-button> -->
|
||||
<!-- </el-col> -->
|
||||
</el-row>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
border
|
||||
@select="clickRow"
|
||||
ref="refTables"
|
||||
>
|
||||
<!-- <el-table-column type="selection" width="50" align="center" /> -->
|
||||
<el-table-column label="清算类别" align="center" prop="contractNo_dictText" />
|
||||
<el-table-column label="险种" align="center" prop="insutype_dictText" />
|
||||
<el-table-column label="是否异地" align="center" key="locationName" prop="locationName" />
|
||||
<el-table-column label="医疗费用总额" align="right" prop="medFeeSumAmt" header-align="center">
|
||||
<template #default="scope">
|
||||
{{ formatNumber(scope.row.medFeeSumAmt) + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="基金支付金额"
|
||||
align="right"
|
||||
prop="fundPaySumAmt"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ formatNumber(scope.row.fundPaySumAmt) + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="个人账户支付总额" align="right" prop="acctPay" header-align="center">
|
||||
<template #default="scope">
|
||||
{{ formatNumber(scope.row.acctPay) + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="账户共济总额" align="right" prop="acctGjPay" header-align="center">
|
||||
<template #default="scope">
|
||||
{{ formatNumber(scope.row.acctGjPay) + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结算笔数" align="center" prop="fixMedInsSetlCnt">
|
||||
<template #default="scope">
|
||||
{{ scope.row.fixMedInsSetlCnt + ' 笔' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link @click="handleReconciliation(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-form :inline="true" label-width="90px" style="width: 100%; margin-top: 30px">
|
||||
<el-form-item label="对账结果:" style="width: 100%">
|
||||
<div
|
||||
style="
|
||||
background: #f5f7fa;
|
||||
border: solid 1px;
|
||||
border-color: #e4e7ed;
|
||||
width: 50%;
|
||||
height: 100px;
|
||||
"
|
||||
>
|
||||
<span>{{ reconciliation }}</span>
|
||||
<el-button
|
||||
v-if="reconciliation && reconciliation != 'OK'"
|
||||
type="primary"
|
||||
link
|
||||
@click="toReconcileRecord"
|
||||
>
|
||||
手动对账
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Reconciliation">
|
||||
import {getClroptins, getContractList, getReconcileList, ybRequestReconcile,} from './statisticalManagent';
|
||||
import {formatDateStr} from '@/utils/index';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { insutype } = proxy.useDict('insutype');
|
||||
// 险种类型
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(false);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
]);
|
||||
const contractNoOptions = ref([]);
|
||||
const clrTypeOptions = ref([]);
|
||||
('');
|
||||
const selectedRow = ref(null);
|
||||
const currentRow = ref({});
|
||||
const reconciliation = ref('');
|
||||
const counts = ref(0);
|
||||
const totalPrice1 = ref(0);
|
||||
const totalPrice2 = ref(0);
|
||||
const totalPrice3 = ref(0);
|
||||
const totalPrice4 = ref(0);
|
||||
const totalPrice5 = ref(0);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
// pageNo: 1,
|
||||
// pageSize: 10,
|
||||
// searchKey: undefined,
|
||||
insuType: undefined, // 险种
|
||||
clrType: 11, //住院或门诊
|
||||
contractNo: undefined,
|
||||
orgId: undefined,
|
||||
stmtBegnDate: undefined,
|
||||
stmtEndDate: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function clickRow(row) {
|
||||
if (row.length > 1) {
|
||||
let del_row = row.shift(); // 删除选中的第一项
|
||||
proxy.$refs['refTables'].toggleRowSelection(del_row, false); //改变table勾选状态
|
||||
}
|
||||
}
|
||||
function getContractLists() {
|
||||
getContractList().then((response) => {
|
||||
contractNoOptions.value = response.data;
|
||||
});
|
||||
clrTypeOptions.value = [
|
||||
{ value: 11, label: '门诊' },
|
||||
{ value: 21, label: '住院' },
|
||||
];
|
||||
// insuTypeOptions.value = [
|
||||
// { value: 310, label: '职工基本医疗保险' },
|
||||
// { value: 390, label: '城乡居民基本医疗保险' },
|
||||
// { value: 391, label: '城镇居民基本医疗保险' },
|
||||
// { value: 399, label: '其他特殊人员医疗保障' },
|
||||
// ];
|
||||
}
|
||||
/** 查询列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReconcileList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.record ? res.data.record : res.data;
|
||||
// [{insutype:"410",clrType: 11,contractNo:"229900"},{insutype:"410",clrType: 21,contractNo:"229900"}]
|
||||
counts.value = res.data.fixMedInsSetlCnt | 0;
|
||||
totalPrice1.value = res.data.medFeeSumAmt | 0;
|
||||
totalPrice2.value = res.data.fundPaySumAmt | 0;
|
||||
totalPrice3.value = res.data.acctPay | 0;
|
||||
totalPrice4.value = res.data.acctGjPay | 0;
|
||||
totalPrice5.value =
|
||||
totalPrice1.value + totalPrice2.value + totalPrice3.value + totalPrice4.value;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
function formatNumber(value) {
|
||||
return value ? value.toFixed(2) : '0.00';
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.stmtBegnDate =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + ' 00:00:00'
|
||||
: '';
|
||||
queryParams.value.stmtEndDate =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + ' 23:59:59'
|
||||
: '';
|
||||
// queryParams.value.pageNo = 1;
|
||||
reconciliation.value = '';
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 按钮操作 */
|
||||
function handleReconciliation(row) {
|
||||
// 调用接口返回值
|
||||
// loading.value = true;
|
||||
currentRow.value = row;
|
||||
reconciliation.value = '';
|
||||
let queryParams = {
|
||||
insuType: row.insutype.toString(),
|
||||
clrType: row.clrType,
|
||||
contractNo: row.contractNo.toString(),
|
||||
stmtBegnDate:
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + ' 00:00:00'
|
||||
: '',
|
||||
stmtEndDate:
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + ' 23:59:59'
|
||||
: '',
|
||||
};
|
||||
ybRequestReconcile(queryParams).then((res) => {
|
||||
// loading.value = false;
|
||||
reconciliation.value = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
selectedRow.value = selection[selection.length - 1];
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
function toReconcileRecord() {
|
||||
// 跳转到清算记录页面,并携带当前选中行的数据
|
||||
proxy.$router.push({
|
||||
name: 'LiquidationRecords',
|
||||
query: {
|
||||
currentRow: JSON.stringify(currentRow.value),
|
||||
occurrenceTime: occurrenceTime.value,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function handleGetClroptins() {
|
||||
getClroptins({ pageNum: 1, pageSize: 100, fixmedinsCode: 'H22010200672' }).then((res) => {});
|
||||
}
|
||||
|
||||
getList();
|
||||
getContractLists();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
:deep(.el-textarea.is-disabled .el-textarea__inner) {
|
||||
resize: none !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,733 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="85px"
|
||||
>
|
||||
<el-form-item label="结算经办机构:" prop="setlOptins" label-width="110px">
|
||||
<el-input
|
||||
v-model="queryParams.setlOptins"
|
||||
placeholder="请输入结算经办机构"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算日期:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="清算类型:" prop="clrType">
|
||||
<el-select
|
||||
v-model="queryParams.clrType"
|
||||
placeholder="请选择清算类型"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in clrTypeOptions"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="医院:" prop="orgId" label-width="70px">
|
||||
<el-input
|
||||
v-model="queryParams.orgId"
|
||||
placeholder="请输入医院id"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="文件查询号:" prop="fileQuryNo" label-width="100px">
|
||||
<el-input
|
||||
v-model="queryParams.fileQuryNo"
|
||||
placeholder="请输入文件查询号"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="本地文件路径:" prop="filePath" label-width="110px">
|
||||
<el-input
|
||||
v-model="queryParams.filePath"
|
||||
placeholder="请输入本地文件路径"
|
||||
clearable
|
||||
style="width: 566px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-upload
|
||||
multiple
|
||||
:action="uploadFileUrl"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:file-list="fileList"
|
||||
limit=1
|
||||
:on-error="handleUploadError"
|
||||
:on-exceed="handleExceed"
|
||||
:on-success="handleUploadSuccess"
|
||||
:show-file-list="false"
|
||||
:headers="headers"
|
||||
class="upload-file-uploader"
|
||||
ref="fileUpload"
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Edit"
|
||||
|
||||
>上传文件</el-button
|
||||
>
|
||||
</el-upload>
|
||||
<div class="el-upload__tip" v-if="showTip">
|
||||
请上传
|
||||
<template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
|
||||
<template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
|
||||
的文件
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <el-row :gutter="10" class="mb8"> -->
|
||||
<!-- <el-col :span="1.5"> -->
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Edit"
|
||||
@click="handleQuery"
|
||||
>统计</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Edit"
|
||||
@click="handleExport"
|
||||
>生成txt文件</el-button
|
||||
>
|
||||
<!-- </el-col> -->
|
||||
<!-- <el-col :span="1.5"> -->
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Edit"
|
||||
@click="handleReconciliation"
|
||||
>开始明细对账</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="ids.length == 0"
|
||||
@click="handleApplyForLiquidation"
|
||||
>申请清算</el-button
|
||||
>
|
||||
<!-- </el-col> -->
|
||||
</el-row>
|
||||
<div style="margin-bottom:5px">结算笔数:{{counts}}(其中 总费用:{{totalPrice1?totalPrice1.toFixed(2):0}}元, 基金支付金额:{{totalPrice2?totalPrice2.toFixed(2):0}}元, 账户支付金额:{{totalPrice3?totalPrice3.toFixed(2):0}}元,现金支付金额:{{totalPrice4?totalPrice4.toFixed(2):0}}元)</div>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
@row-click="handleRowClick"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="个人编码"
|
||||
align="center"
|
||||
key="psnNo"
|
||||
prop="psnNo"
|
||||
width="190"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="患者姓名"
|
||||
align="center"
|
||||
key="patientName"
|
||||
prop="patientName"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="就诊ID"
|
||||
align="center"
|
||||
key="mdtrtId"
|
||||
prop="mdtrtId"
|
||||
width="270"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="结算ID"
|
||||
align="center"
|
||||
key="setlId"
|
||||
prop="setlId"
|
||||
width="270"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="姓名"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保结算日期"
|
||||
align="center"
|
||||
key="productionDate"
|
||||
prop="productionDate"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.productionDate) }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column
|
||||
label="总费用"
|
||||
align="center"
|
||||
key="medfeeSumamt"
|
||||
prop="medfeeSumamt"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="基金支付金额"
|
||||
align="center"
|
||||
key="fundPaySumamt"
|
||||
prop="fundPaySumamt"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="个人账户金额"
|
||||
align="center"
|
||||
key="acctPay"
|
||||
prop="acctPay"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="现金支付金额"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<!-- <el-table-column
|
||||
label="共计支付金额"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="结算时间"
|
||||
align="center"
|
||||
key="setlTime"
|
||||
prop="setlTime"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.setlTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="是否退费"
|
||||
align="center"
|
||||
key="refdSetlFlag"
|
||||
prop="refdSetlFlag"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.refdSetlFlag==1?'退费':'' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
label="报销类型"
|
||||
align="center"
|
||||
key="minUnitCode_dictText"
|
||||
prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="身份证"
|
||||
align="center"
|
||||
key="minUnitCode_dictText"
|
||||
prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="收据编号"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
</el-table>
|
||||
<el-form :inline="true" label-width="90px" style="width: 100%; margin-top: 30px">
|
||||
<el-form-item label="上传结果:" style="width: 100%">
|
||||
<el-input
|
||||
v-model="reconciliationDetail"
|
||||
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||
type="textarea"
|
||||
disabled
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/> -->
|
||||
<!-- v-if="purchaseinventoryReturnList&&purchaseinventoryReturnList.length>0" -->
|
||||
<!-- <el-table
|
||||
v-if="purchaseinventoryList.length>0"
|
||||
style="height:190px;margin-top:32px;"
|
||||
v-loading="loadingReturn"
|
||||
:data="purchaseinventoryReturnList"
|
||||
@selection-change="handleSelectionChangeReturn"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="人员ID"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="就诊ID"
|
||||
align="center"
|
||||
key="medicineName"
|
||||
prop="medicineName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="结算ID"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="对账结果"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="总费用"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
width="180px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医疗费总额"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="120px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="基金支付总额"
|
||||
align="center"
|
||||
key="quantityUnit"
|
||||
prop="quantityUnit"
|
||||
width="140px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="个人账户支付总额"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="发送方报文ID"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退费结算标志"
|
||||
align="center"
|
||||
key="minUnitCode_dictText"
|
||||
prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="reconciliationDetails">
|
||||
import {
|
||||
applyFinancialClearing,
|
||||
reconcileDetailList,
|
||||
reconcileDetailTxt,
|
||||
reconcileGeneral,
|
||||
ybRequestFileUp
|
||||
} from "./statisticalManagent";
|
||||
import {getToken} from "@/utils/auth";
|
||||
import {formatDate} from '@/utils/index';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(false);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const reconciliationDetail = ref("")
|
||||
const occurrenceTime = ref([formatDate(new Date()),formatDate(new Date())]);
|
||||
const clrTypeOptions = ref([]);
|
||||
const filePath = ref("")
|
||||
const purchaseinventoryReturnList = ref([])
|
||||
const loadingReturn = ref(false)
|
||||
const selectedRow = ref([])
|
||||
const counts = ref(0)
|
||||
const totalPrice1 = ref(0)
|
||||
const totalPrice2 = ref(0)
|
||||
const totalPrice3 = ref(0)
|
||||
const totalPrice4 = ref(0)
|
||||
|
||||
const fileSize = ref(10)
|
||||
const uploadList = ref([]);
|
||||
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
||||
const uploadFileUrl = ref(import.meta.env.VITE_APP_BASE_API + "/yb-request/file-up"); // 上传文件服务器地址
|
||||
const headers = ref({ Authorization: "Bearer " + getToken() });
|
||||
const fileList = ref([]);
|
||||
const fileType = ref(["zip","txt"]);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
// pageNo: 1,
|
||||
// pageSize: 10,
|
||||
setlOptins: '229900',
|
||||
filePath: undefined,
|
||||
orgId:undefined,
|
||||
clrType: undefined,
|
||||
fileQuryNo: undefined,
|
||||
stmtBegnDate:undefined,
|
||||
stmtEndDate:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
watch(
|
||||
() => purchaseinventoryList.value,
|
||||
(newVlaue) => {
|
||||
if(newVlaue&&newVlaue.length>0){
|
||||
handleTotalAmount()
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
function handleBeforeUpload(file) {
|
||||
// 校检文件类型
|
||||
if (fileType.value.length) {
|
||||
const fileName = file.name.split('.');
|
||||
const fileExt = fileName[fileName.length - 1];
|
||||
const isTypeOk = fileType.value.indexOf(fileExt) >= 0;
|
||||
if (!isTypeOk) {
|
||||
proxy.$modal.msgError(`文件格式不正确, 请上传${fileType.value.join("/")}格式文件!`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// 校检文件大小
|
||||
if (fileSize.value) {
|
||||
const isLt = file.size / 1024 / 1024 < fileSize.value;
|
||||
if (!isLt) {
|
||||
proxy.$modal.msgError(`上传文件大小不能超过10MB!`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
const formData = new FormData()
|
||||
formData.append('file', file)
|
||||
formData.append('filename', file.name)
|
||||
ybRequestFileUp(formData).then((res) => {
|
||||
if(res.code==200){
|
||||
proxy.$modal.msgSuccess("上传成功")
|
||||
}
|
||||
|
||||
})
|
||||
// proxy.$modal.loading("正在上传文件,请稍候...");
|
||||
number.value++;
|
||||
return true;
|
||||
}
|
||||
|
||||
// 文件个数超出
|
||||
function handleExceed() {
|
||||
proxy.$modal.msgError(`上传文件数量不能超过 1 个!`);
|
||||
}
|
||||
|
||||
// 上传失败
|
||||
function handleUploadError(err) {
|
||||
proxy.$modal.msgError("上传文件失败");
|
||||
}
|
||||
|
||||
// 上传成功回调
|
||||
function handleUploadSuccess(res, file) {
|
||||
if (res.code === 200) {
|
||||
console.log(res,file,"file")
|
||||
uploadList.value.push({ name: res.fileName, url: res.fileName });
|
||||
uploadedSuccessfully();
|
||||
} else {
|
||||
number.value--;
|
||||
proxy.$modal.closeLoading();
|
||||
proxy.$modal.msgError(res.msg);
|
||||
proxy.$refs.fileUpload.handleRemove(file);
|
||||
uploadedSuccessfully();
|
||||
}
|
||||
}
|
||||
// function submitFileForm() {
|
||||
// proxy.$refs['fileUpload'].submit();
|
||||
// }
|
||||
// 上传结束处理
|
||||
function uploadedSuccessfully() {
|
||||
if (number.value > 0 && uploadList.value.length === number.value) {
|
||||
fileList.value = fileList.value.filter(f => f.url !== undefined).concat(uploadList.value);
|
||||
uploadList.value = [];
|
||||
number.value = 0;
|
||||
// proxy.$refs['fileUpload'].submit();
|
||||
emit("update:modelValue", listToString(fileList.value));
|
||||
proxy.$modal.closeLoading();
|
||||
}
|
||||
}
|
||||
// 删除文件
|
||||
function handleDelete(index) {
|
||||
fileList.value.splice(index, 1);
|
||||
emit("update:modelValue", listToString(fileList.value));
|
||||
}
|
||||
|
||||
// 获取文件名称
|
||||
function getFileName(name) {
|
||||
// 如果是url那么取最后的名字 如果不是直接返回
|
||||
if (name.lastIndexOf("/") > -1) {
|
||||
return name.slice(name.lastIndexOf("/") + 1);
|
||||
} else {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
// 对象转成指定字符串分隔
|
||||
function listToString(list, separator) {
|
||||
let strs = "";
|
||||
separator = separator || ",";
|
||||
for (let i in list) {
|
||||
if (list[i].url) {
|
||||
strs += list[i].url + separator;
|
||||
}
|
||||
}
|
||||
return strs != '' ? strs.substr(0, strs.length - 1) : '';
|
||||
}
|
||||
/**计算合计金额 */
|
||||
function handleTotalAmount() {
|
||||
counts.value = purchaseinventoryList.value.length
|
||||
totalPrice1.value = purchaseinventoryList.value.reduce(
|
||||
(accumulator, currentRow) => {
|
||||
return (accumulator + (Number(currentRow.medfeeSumamt) || 0))
|
||||
},
|
||||
0
|
||||
);
|
||||
totalPrice2.value = purchaseinventoryList.value.reduce(
|
||||
(accumulator, currentRow) => {
|
||||
return (accumulator + (Number(currentRow.fundPaySumamt) || 0))
|
||||
},
|
||||
0
|
||||
);
|
||||
totalPrice3.value = purchaseinventoryList.value.reduce(
|
||||
(accumulator, currentRow) => {
|
||||
return (accumulator + (Number(currentRow.acctPay) || 0))
|
||||
},
|
||||
0
|
||||
);
|
||||
// 现金支付金额
|
||||
// totalPrice4.value = purchaseinventoryList.value.reduce(
|
||||
// (accumulator, currentRow) => {
|
||||
// return (accumulator + (Number(currentRow.profitAmount) || 0))
|
||||
// },
|
||||
// 0
|
||||
// );
|
||||
}
|
||||
function getPharmacyCabinetLists() {
|
||||
clrTypeOptions.value = [
|
||||
{ value: 11, label: '门诊' },
|
||||
{ value: 21, label: '住院' },
|
||||
];
|
||||
}
|
||||
function handleSelectionChangeReturn(selection) {
|
||||
idsReturn.value = selection.map((item) => item.id);
|
||||
singleReturn.value = selection.length != 1;
|
||||
multipleReturn.value = !selection.length;
|
||||
}
|
||||
|
||||
function getList() {
|
||||
reconcileDetailList(queryParams.value).then((res) => {
|
||||
// console.log(res,"res----------------")
|
||||
// loading.value = false;
|
||||
// purchaseinventoryList.value = [{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"4.72",insutype:"410",clrType: 11,contractNo:"229900"},{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"7.43",insutype:"410",clrType: 11,contractNo:"229900"},{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"1",insutype:"410",clrType: 11,contractNo:"229900"},{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"-1",insutype:"410",clrType: 11,contractNo:"229900"}]
|
||||
purchaseinventoryList.value = res.data.record ? res.data.record : res.data;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.stmtBegnDate =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.stmtEndDate =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
// queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 按钮操作 */
|
||||
function handleReconciliation() {
|
||||
// 调用接口返回值
|
||||
if(selectedRow.value.length==0){
|
||||
proxy.$message.error('请选择一行数据开始明细对账');
|
||||
return
|
||||
}
|
||||
loading.value = true;
|
||||
let queryParamsss = {
|
||||
settlementIdList:ids.value,
|
||||
filePath:queryParams.value.filePath?queryParams.value.filePath:"",
|
||||
fileQuryNo:queryParams.value.fileQuryNo?queryParams.value.fileQuryNo:"",
|
||||
setlOptins:queryParams.value.setlOptins?queryParams.value.setlOptins:"",
|
||||
clrType:queryParams.value.clrType?queryParams.value.clrType:""
|
||||
}
|
||||
reconcileGeneral(queryParamsss).then((res) => {
|
||||
console.log(res.data, 'res----------------');
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
function handleApplyForLiquidation () {
|
||||
if (isAllSelected()) {
|
||||
let params = {}
|
||||
params.clrType = queryParams.value.clrType?queryParams.value.clrType:""
|
||||
params.clrOptins = queryParams.value.setlOptins?queryParams.value.setlOptins:""
|
||||
params.stmtBegnDate = occurrenceTime.value[0]
|
||||
params.stmtEndDate = occurrenceTime.value[1]
|
||||
params.settlementIdList = ids.value
|
||||
applyFinancialClearing(params).then((res) => {
|
||||
console.log(res.data,'res----------------');
|
||||
loading.value = false;
|
||||
});
|
||||
} else {
|
||||
proxy.$message.warning('当前未全选');
|
||||
}
|
||||
}
|
||||
function isAllSelected() {
|
||||
return selectedRow.value.length === purchaseinventoryList.value.length;
|
||||
}
|
||||
function handleExport(){
|
||||
if(selectedRow.value.length==0){
|
||||
proxy.$message.error('请选择一行数据进行生成txt文件');
|
||||
return
|
||||
}
|
||||
loading.value = true;
|
||||
reconcileDetailTxt({settlementIdList:ids.value}).then((res) => {
|
||||
console.log(res.data,'res----------------');
|
||||
let fileName = Date.now()+'.txt'; // 默认文件名
|
||||
// 2. 创建Blob对象
|
||||
const blob = new Blob([res], { type: 'application/octet-stream;charset=utf-8' });
|
||||
// 3. 创建临时下载链接
|
||||
const link = document.createElement('a');
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
link.href = url;
|
||||
link.download = fileName; // 设置下载文件名
|
||||
// 4. 触发下载
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
// 5. 清理资源
|
||||
document.body.removeChild(link);
|
||||
window.URL.revokeObjectURL(url);
|
||||
loading.value = false;
|
||||
if(res.data){
|
||||
queryParams.value.filePath = res.data.split("生成txt文件成功,文件路径:")?res.data.split("生成txt文件成功,文件路径:")[1]:""
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
selectedRow.value = selection
|
||||
console.log(selectedRow.value,"selectedRow.value")
|
||||
ids.value = selection.map((item) => item.setlId);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
//点击列表当前行
|
||||
function handleRowClick(row) {
|
||||
// editRowTK.value = row
|
||||
console.log(row,"row")
|
||||
// if(row.returnStatus==1){
|
||||
// loadingReturn.value = true
|
||||
// generatedReturnDetail(row.supplyBusNo).then((response) => {
|
||||
// purchaseinventoryReturnList.value = response.data
|
||||
// purchaseinventoryReturnList.value.map(k=>{
|
||||
// // k.returnStatus_text = k.returnStatus==1?'已退库':''
|
||||
// k.originalSupplyBusNo = k.originalSupplyBusNo?k.originalSupplyBusNo:row.supplyBusNo
|
||||
// })
|
||||
|
||||
// })
|
||||
// loadingReturn.value = false
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,318 +0,0 @@
|
||||
<template>
|
||||
<div busNo="app-container">
|
||||
<el-form
|
||||
style="margin-top:20px;margin-left:20px;"
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="收费时间:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="科室:" prop="departmentId">
|
||||
<el-select
|
||||
v-model="queryParams.departmentId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in getDepartmentOptions"
|
||||
:key="supplyStatus.id"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="医生:" prop="doctorId">
|
||||
<el-select
|
||||
v-model="queryParams.doctorId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in issuerOptions"
|
||||
:key="supplyStatus.id"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" busNo="mb8" style="margin-left:20px;margin-right:0px;margin-bottom:5px">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="handleQuery"
|
||||
|
||||
>查询</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
|
||||
>重置</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
style="padding:0 20px;width:100%"
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
:span-method="arraySpanMethod"
|
||||
|
||||
>
|
||||
<!-- :summary-method="getSummaries"
|
||||
show-summary 每页单独合计-->
|
||||
<el-table-column type="selection" align="center" />
|
||||
<el-table-column
|
||||
label='门诊号'
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="姓名"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="科室"
|
||||
align="center"
|
||||
key="departmentName"
|
||||
prop="departmentName"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目"
|
||||
align="center"
|
||||
key="clinicalName"
|
||||
prop="clinicalName"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="挂号医生"
|
||||
align="center"
|
||||
key="doctorName"
|
||||
prop="doctorName"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="收费人"
|
||||
align="center"
|
||||
key="payeeName"
|
||||
prop="payeeName"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="数量"
|
||||
align="center"
|
||||
key="number"
|
||||
prop="number"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="时间"
|
||||
align="center"
|
||||
key="chargeTime"
|
||||
prop="chargeTime"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.chargeTime) }}</span>
|
||||
</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-row
|
||||
:gutter="10"
|
||||
busNo="mb8"
|
||||
style="
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
margin-left:0px;margin-right:0px;padding:0 20px;
|
||||
"
|
||||
>
|
||||
<el-col :span="3">
|
||||
<span>制单人:{{ userStore.name }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="registrationFeeDetails">
|
||||
import {getDepartmentList, getReportRegisterInit, getReportRegisterPage} from "./statisticalManagent";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const totalAmount = ref(0);
|
||||
// const {
|
||||
// item_category_code,
|
||||
// hosp_lv
|
||||
// } = proxy.useDict(
|
||||
// "item_category_code",
|
||||
// "hosp_lv"
|
||||
// );
|
||||
const purchaseinventoryListAll = ref([])
|
||||
const xiaojiTotal = ref([])
|
||||
|
||||
const currentCategory = ref(null);
|
||||
const rowSpan = ref(1)
|
||||
const issuerOptions = ref([])
|
||||
const payeeOptions = ref([])
|
||||
const inventoryOptions = ref([])
|
||||
const clinicalTypeOptions = ref([]);
|
||||
const purchaseinventoryList = ref([]);
|
||||
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const payeeNameOptions = ref([]);
|
||||
const getDepartmentOptions = ref([])
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
departmentId: undefined,
|
||||
doctorId:undefined,
|
||||
registerTimeSTime:undefined,
|
||||
registerTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getReportRegisterInit().then((response)=>{
|
||||
issuerOptions.value = response.data.doctorOptions
|
||||
})
|
||||
getDepartmentList().then((response) => {
|
||||
getDepartmentOptions.value = response.data // 科室
|
||||
})
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
console.log(queryParams.value,"queryParams.value")
|
||||
getReportRegisterPage(queryParams.value).then((res) => {
|
||||
purchaseinventoryList.value = res.data.records||[]
|
||||
purchaseinventoryList.value.map(k=>{
|
||||
k.number = k.number?(k.number+k.quantityUnit_dictText):0
|
||||
k.price = k.price?k.price.toFixed(2):"0.00"
|
||||
// k.totalPrice = k.totalPrice?("¥"+k.totalPrice.toFixed(2)):"¥0.00"
|
||||
k.totalPrice = k.totalPrice?k.totalPrice.toFixed(2):"0.00"
|
||||
})
|
||||
total.value = res.data.total;
|
||||
loading.value = false
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.chargeTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.chargeTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
occurrenceTime.value = ""
|
||||
queryParams.value.chargeTimeSTime = ""
|
||||
queryParams.value.chargeTimeETime = ""
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.pagination-container{
|
||||
margin-right: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,466 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="90px"
|
||||
>
|
||||
<!-- <el-form-item label="单据号:" prop="busNo">
|
||||
<el-input
|
||||
v-model="queryParams.busNo"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="药品名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="项目编号/项目品名"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="编码:" prop="medicationDefId">
|
||||
<el-input
|
||||
v-model="queryParams.medicationDefId"
|
||||
placeholder="编码:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="项目名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="编码/单据号/药品名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="存放库房:" prop="sourceLocationId">
|
||||
<el-select
|
||||
v-model="queryParams.sourceLocationId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in locationIdList"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核日期:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="领用科室:" prop="purposeLocationId">
|
||||
<el-select
|
||||
v-model="queryParams.purposeLocationId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="issueDepartment in issueDepartmentDto"
|
||||
:key="issueDepartment.id"
|
||||
:label="issueDepartment.name"
|
||||
:value="issueDepartment.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商:" prop="supplierId">
|
||||
<el-select
|
||||
v-model="queryParams.supplierId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplierList in supplierListOptions"
|
||||
:key="supplierList.value"
|
||||
:label="supplierList.label"
|
||||
:value="supplierList.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="handleQuery"
|
||||
|
||||
>查询</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
|
||||
>重置</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusno"
|
||||
prop="supplyBusno"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="出库类型"
|
||||
align="center"
|
||||
key="formEnum_enumText"
|
||||
prop="formEnum_enumText"
|
||||
width="90"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<!-- itemTable -->
|
||||
<el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="药品类型"
|
||||
align="center"
|
||||
key="medicationType"
|
||||
prop="medicationType"
|
||||
width="90"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="140px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="存放库房"
|
||||
align="center"
|
||||
key="sourceLocationName"
|
||||
prop="sourceLocationName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="货位"
|
||||
align="center"
|
||||
key="sourceLocationStoreName"
|
||||
prop="sourceLocationStoreName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="计量单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="出库数量"
|
||||
align="center"
|
||||
key="itemQuantity"
|
||||
prop="itemQuantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购单价"
|
||||
align="center"
|
||||
key="purchasePrice"
|
||||
prop="purchasePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="采购金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="领用单价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="领用科室"
|
||||
align="center"
|
||||
key="purposeLocationName"
|
||||
prop="purposeLocationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
key="supplierId_dictText"
|
||||
prop="supplierId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单日期"
|
||||
align="center"
|
||||
key="occurrenceTime"
|
||||
prop="occurrenceTime"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.occurrenceTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="审核人"
|
||||
align="center"
|
||||
key="approverId_dictText"
|
||||
prop="approverId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审核日期"
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
key="remake"
|
||||
prop="remake"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="requisitionDetails">
|
||||
import {
|
||||
getDepartmentList,
|
||||
getOutboundInit,
|
||||
getPharmacyCabinetList,
|
||||
getRreportOutboundPage
|
||||
} from "./statisticalManagent";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
|
||||
const {
|
||||
item_category_code,
|
||||
} = proxy.useDict(
|
||||
"item_category_code",
|
||||
);
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const supplierListOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
const issueDepartmentDto = ref([])
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
purposeLocationId:undefined,
|
||||
sourceLocationId: undefined,
|
||||
supplierId: undefined,
|
||||
approvalTimeSTime:undefined,
|
||||
approvalTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
// 监听路由变化
|
||||
watch(
|
||||
() => route.query,
|
||||
(newQuery) => {
|
||||
// 如果路由中包含指定参数,则使用这些参数进行查询
|
||||
if (newQuery.purposeLocationId || newQuery.occurrenceTimeSTime || newQuery.occurrenceTimeETime) {
|
||||
// 设置查询参数
|
||||
if (newQuery.purposeLocationId) {
|
||||
queryParams.value.sourceLocationId = newQuery.purposeLocationId;
|
||||
}
|
||||
if (newQuery.occurrenceTimeSTime) {
|
||||
queryParams.value.occurrenceTimeSTime = newQuery.occurrenceTimeSTime + ' 00:00:00';
|
||||
}
|
||||
if (newQuery.occurrenceTimeETime) {
|
||||
queryParams.value.occurrenceTimeETime = newQuery.occurrenceTimeETime + ' 23:59:59';
|
||||
}
|
||||
|
||||
// 执行查询
|
||||
getList();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data
|
||||
});
|
||||
getOutboundInit().then((response) => {
|
||||
supplierListOptions.value = response.data.supplierListOptions
|
||||
})
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
getDepartmentList().then((response) => {
|
||||
issueDepartmentDto.value = response.data
|
||||
})
|
||||
loading.value = true;
|
||||
getRreportOutboundPage(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records
|
||||
// if(purchaseinventoryList.value&& purchaseinventoryList.value.length>0){
|
||||
// purchaseinventoryList.value.map((k,index)=>{
|
||||
// k.inventoryStatusEnum_enumText = k.inventoryStatusEnum==2?'未停供':(k.inventoryStatusEnum==3?'已停供':'')
|
||||
// })
|
||||
// }
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.approvalTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.approvalTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.approvalTimeSTime = ""
|
||||
queryParams.value.approvalTimeETime = ""
|
||||
occurrenceTime.value = ""
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet("report-manage/outbound/excel-out", {
|
||||
...queryParams.value
|
||||
}, `dict_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,492 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="90px"
|
||||
>
|
||||
<!-- <el-form-item label="单据号:" prop="busNo">
|
||||
<el-input
|
||||
v-model="queryParams.busNo"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="药品名称:" prop="medicineName">
|
||||
<el-input
|
||||
v-model="queryParams.medicineName"
|
||||
placeholder="项目编号/项目品名"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="编码:" prop="medicationDefId">
|
||||
<el-input
|
||||
v-model="queryParams.medicationDefId"
|
||||
placeholder="编码:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="项目名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="编码/单据号/药品名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="库房:" prop="purposeLocationId">
|
||||
<el-select
|
||||
v-model="queryParams.purposeLocationId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in purposeLocationIdList"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核日期:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="科室:" prop="sourceLocationId">
|
||||
<el-select
|
||||
v-model="queryParams.sourceLocationId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="issueDepartment in issueDepartmentDto"
|
||||
:key="issueDepartment.id"
|
||||
:label="issueDepartment.name"
|
||||
:value="issueDepartment.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="项目类型:" prop="categoryType">
|
||||
<el-select
|
||||
v-model="queryParams.categoryType"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in item_category_code"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型:" prop="typeEnum">
|
||||
<el-select
|
||||
v-model="queryParams.typeEnum"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in item_category_code"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="供应商:" prop="supplierId">
|
||||
<el-select
|
||||
v-model="queryParams.supplierId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplierList in supplierListOptions"
|
||||
:key="supplierList.value"
|
||||
:label="supplierList.label"
|
||||
:value="supplierList.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- 添加记录 -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openAddaddTransferProductDialog"
|
||||
>备份</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="handleQuery"
|
||||
|
||||
>查询</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
|
||||
>重置</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusno"
|
||||
prop="supplyBusno"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="出库类型"
|
||||
align="center"
|
||||
key="statusEnum"
|
||||
prop="statusEnum"
|
||||
width="90"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<!-- itemTable -->
|
||||
<el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="药品类型"
|
||||
align="center"
|
||||
key="categoryCode_dictText"
|
||||
prop="categoryCode_dictText"
|
||||
width="90"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="120px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="库房"
|
||||
align="center"
|
||||
key="purposeLocationName"
|
||||
prop="purposeLocationName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="货位"
|
||||
align="center"
|
||||
key="purposeLocationStoreName"
|
||||
prop="purposeLocationStoreName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="计量单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退库数量"
|
||||
align="center"
|
||||
key="itemQuantity"
|
||||
prop="itemQuantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购单价"
|
||||
align="center"
|
||||
key="purchasePrice"
|
||||
prop="purchasePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="采购金额"
|
||||
align="center"
|
||||
key="purchasePriceSum"
|
||||
prop="purchasePriceSum"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="退库单价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="科室"
|
||||
align="center"
|
||||
key="sourceLocationName"
|
||||
prop="sourceLocationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
key="supplierId_dictText"
|
||||
prop="supplierId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审核人"
|
||||
align="center"
|
||||
key="approverId_dictText"
|
||||
prop="approverId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审核日期"
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="制单日期"
|
||||
align="center"
|
||||
key="occurrenceTime"
|
||||
prop="occurrenceTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
key="remake"
|
||||
prop="remake"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="returnOrutboundDetails">
|
||||
import {
|
||||
getDepartmentList,
|
||||
getPharmacyCabinetList,
|
||||
getReturnIssueInit,
|
||||
getRreportReturnIssue,
|
||||
} from "./statisticalManagent";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
const purchaseinventoryList = ref([]);
|
||||
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
|
||||
const supplierListOptions = ref(undefined);
|
||||
const issueDepartmentDto = ref([]);
|
||||
const purposeLocationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
purposeLocationId:undefined,
|
||||
sourceLocationId:undefined,
|
||||
supplierId:undefined,
|
||||
approvalTimeSTime:undefined,
|
||||
approvalTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
// 监听路由变化
|
||||
watch(
|
||||
() => route.query,
|
||||
(newQuery) => {
|
||||
// 如果路由中包含指定参数,则使用这些参数进行查询
|
||||
if (newQuery.purposeLocationId || newQuery.occurrenceTimeSTime || newQuery.occurrenceTimeETime) {
|
||||
// 设置查询参数
|
||||
if (newQuery.purposeLocationId) {
|
||||
queryParams.value.purposeLocationId = newQuery.purposeLocationId;
|
||||
}
|
||||
if (newQuery.occurrenceTimeSTime) {
|
||||
queryParams.value.occurrenceTimeSTime = newQuery.occurrenceTimeSTime + ' 00:00:00';
|
||||
}
|
||||
if (newQuery.occurrenceTimeETime) {
|
||||
queryParams.value.occurrenceTimeETime = newQuery.occurrenceTimeETime + ' 23:59:59';
|
||||
}
|
||||
|
||||
// 执行查询
|
||||
getList();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getDepartmentList().then((response) => {
|
||||
issueDepartmentDto.value = response.data
|
||||
})
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
|
||||
purposeLocationIdList.value = response.data
|
||||
});
|
||||
getReturnIssueInit().then((response) => {
|
||||
supplierListOptions.value = response.data.supplierListOptions
|
||||
})
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getRreportReturnIssue(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.approvalTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.approvalTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.approvalTimeSTime = ""
|
||||
queryParams.value.approvalTimeETime = ""
|
||||
occurrenceTime.value = ""
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet("report-manage/return-issue/excel-out", {
|
||||
...queryParams.value
|
||||
}, `dict_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,404 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="90px">
|
||||
<el-form-item label="药品名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="药品编码/药品名称/名称拼音/供应商名"
|
||||
clearable
|
||||
style="width: 250px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="编码:" prop="medicationDefId">
|
||||
<el-input
|
||||
v-model="queryParams.medicationDefId"
|
||||
placeholder="编码:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="剩余过期天数:" prop="remainingDays" label-width="110px">
|
||||
<el-input
|
||||
v-model="queryParams.remainingDays"
|
||||
placeholder="查询 ≤ X 天的记录"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item label="药品类别:" prop="categoryCode">
|
||||
<el-select
|
||||
v-model="queryParams.categoryCode"
|
||||
placeholder="请选择药品类别"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in item_category_code"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="医保等级:" prop="chrgitmLv">
|
||||
<el-select
|
||||
v-model="queryParams.chrgitmLv"
|
||||
placeholder="请选择医保等级"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="chrgitmLv_enumText in chrgitmLv_enumTextOptions"
|
||||
:key="chrgitmLv_enumText.value"
|
||||
:label="chrgitmLv_enumText.info"
|
||||
:value="chrgitmLv_enumText.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库药房:" prop="locationId">
|
||||
<el-select
|
||||
v-model="queryParams.locationId"
|
||||
placeholder="请选择仓库药房"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in locationIdList"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="库存范围:" prop="warehouseScope">
|
||||
<el-select
|
||||
v-model="queryParams.warehouseScope"
|
||||
placeholder="请选择库存范围"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in inventory_range"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="药品类别"
|
||||
align="center"
|
||||
key="categoryCode_dictText"
|
||||
prop="categoryCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="130"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="medicineName"
|
||||
prop="medicineName"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="请领数量(本月药房入库数量)"
|
||||
align="center"
|
||||
key="quantityUnit"
|
||||
prop="quantityUnit"
|
||||
width="190px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="请领进价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="请领零售价"
|
||||
align="center"
|
||||
key="retailPrice"
|
||||
prop="retailPrice"
|
||||
width="89px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="销售数量"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="销售进价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="销售零售价"
|
||||
align="center"
|
||||
key="retailPrice"
|
||||
prop="retailPrice"
|
||||
width="89px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="返库数量(退货数量)"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
width="140px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="返库进价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="返库零价"
|
||||
align="center"
|
||||
key="retailPrice"
|
||||
prop="retailPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="报损数量"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="报损进价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="报损零售价"
|
||||
align="center"
|
||||
key="retailPrice"
|
||||
prop="retailPrice"
|
||||
width="89px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盘点数量"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盘点进价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="本期库存数量"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
width="105px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="库存进价合计"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
width="105"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="库存零价合计"
|
||||
align="center"
|
||||
key="totalSalePrice"
|
||||
prop="totalSalePrice"
|
||||
width="105"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="settlementDoc">
|
||||
import {getInit, getPharmacyCabinetList, getproductReturnPage} from './statisticalManagent';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const {
|
||||
item_category_code,
|
||||
inventory_range,
|
||||
} = proxy.useDict(
|
||||
"item_category_code",
|
||||
"inventory_range",
|
||||
);
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
|
||||
const loading = ref(true);
|
||||
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const supplyTypeOptions = ref(undefined);
|
||||
const supplyStatusOptions = ref(undefined);
|
||||
const chrgitmLv_enumTextOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
remainingDays: undefined,
|
||||
// hospital:undefined,
|
||||
categoryCode: undefined,
|
||||
chrgitmLv: undefined,
|
||||
warehouseScope: undefined,
|
||||
locationId: undefined,
|
||||
// occurrenceTimeSTime:undefined,
|
||||
// occurrenceTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data;
|
||||
});
|
||||
getInit().then((response) => {
|
||||
chrgitmLv_enumTextOptions.value = response.data.chrgitmLvOptions;
|
||||
});
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getproductReturnPage(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records;
|
||||
|
||||
if (purchaseinventoryList.value && purchaseinventoryList.value.length > 0) {
|
||||
purchaseinventoryList.value.map((k, index) => {
|
||||
k.inventoryStatusEnum_enumText =
|
||||
k.inventoryStatusEnum == 2 ? '未停供' : k.inventoryStatusEnum == 3 ? '已停供' : '';
|
||||
k.quantityUnit = k.quantity / k.partPercent;
|
||||
const integerPart1 = Math.floor(k.quantityUnit); // 获取整数部分
|
||||
const decimalPart1 = k.quantityUnit - integerPart1; // 获取小数部分
|
||||
|
||||
if (decimalPart1) {
|
||||
k.quantityUnit =
|
||||
integerPart1 +
|
||||
k.unitCode_dictText +
|
||||
(decimalPart1 * k.partPercent).toFixed(0) +
|
||||
k.minUnitCode_dictText;
|
||||
}
|
||||
k.price = k.price ? k.price.toFixed(2) : 0;
|
||||
k.retailPrice = k.retailPrice ? k.retailPrice.toFixed(2) : 0;
|
||||
k.totalPrice = k.price * (Number(k.quantity) / k.partPercent);
|
||||
k.totalPrice = k.totalPrice ? k.totalPrice.toFixed(2) : 0;
|
||||
k.totalSalePrice = k.retailPrice * (Number(k.quantity) / k.partPercent);
|
||||
k.totalSalePrice = k.totalSalePrice ? k.totalSalePrice.toFixed(2) : 0;
|
||||
});
|
||||
}
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
// queryParams.value.occurrenceTimeSTime =
|
||||
// occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
// ? occurrenceTime.value[0] + " 00:00:00"
|
||||
// : "";
|
||||
// queryParams.value.occurrenceTimeETime =
|
||||
// occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
// ? occurrenceTime.value[1] + " 23:59:59"
|
||||
// : "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -1,611 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询库存明细列表
|
||||
export function getproductReturnPage(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/product/product-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
// 查询备份日期库存明细列表
|
||||
export function getproductReturnBackUpPage(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/product/product-backup-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询单据初始化数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/product/product-init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function getBusNoInit() {
|
||||
//单据号
|
||||
return request({
|
||||
url: '/inventory-manage/product/bus-no-init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getMedicineList(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/inventory-item',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getCount(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/inventory-item-info',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取药房列表
|
||||
export function getPharmacyList() {
|
||||
return request({
|
||||
url: '/app-common/pharmacy-list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// 药房药库列表
|
||||
export function getPharmacyCabinetList() {
|
||||
return request({
|
||||
url: '/app-common/pharmacy-cabinet-list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 获取药库列表
|
||||
export function getDispensaryList() {
|
||||
return request({
|
||||
url: '/app-common/cabinet-list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 停供
|
||||
export function stopSupply(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/product/stop-supply',
|
||||
method: 'put',
|
||||
data: busNo,
|
||||
});
|
||||
}
|
||||
|
||||
// 取消停供
|
||||
export function cancelSupply(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/product/cancel-supply',
|
||||
method: 'put',
|
||||
data: busNo,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询库存商品明细查询报表列表
|
||||
export function getReportProductPage(query) {
|
||||
return request({
|
||||
url: '/report-manage/inventory-product/report-product-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
//查询采购入库明细报表
|
||||
export function getReportInboundPCage(query) {
|
||||
return request({
|
||||
url: '/report-manage/inbound/report-inbound-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//查询调拨入库明细报表
|
||||
export function getReportTransferPage(query) {
|
||||
return request({
|
||||
url: '/report-manage/transfer/report-transfer-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//查询库存盘点明细报表
|
||||
export function getReportStocktakingPage(query) {
|
||||
return request({
|
||||
url: '/report-manage/stocktaking/report-stocktaking-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
//报损明细
|
||||
export function getReportLossPage(query) {
|
||||
return request({
|
||||
url: '/report-manage/loss/report-loss-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
// 医保对账
|
||||
export function ybRequestReconcile(data) {
|
||||
return request({
|
||||
url: '/yb-request/reconcile',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
// 合同
|
||||
export function getContractList() {
|
||||
return request({
|
||||
url: '/app-common/contract-list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// 对账列表 结算
|
||||
export function getReconcileList(params) {
|
||||
return request({
|
||||
url: '/yb-request/reconcile-list',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
//领用出库明细
|
||||
export function getRreportOutboundPage(query) {
|
||||
return request({
|
||||
url: '/report-manage/outbound/report-outbound-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取科室列表
|
||||
export function getDepartmentList() {
|
||||
return request({
|
||||
url: '/app-common/department-list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询领用出库明细初始化数据 供应商
|
||||
export function getOutboundInit() {
|
||||
return request({
|
||||
url: '/report-manage/outbound/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// 查询采购入库明细初始化数据 供应商
|
||||
export function getInboundInit() {
|
||||
return request({
|
||||
url: '/report-manage/inbound/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
//领用退库明细
|
||||
export function getRreportReturnIssue(query) {
|
||||
return request({
|
||||
url: '/report-manage/return-issue/report-return-issue',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
// 查询领用退库明细初始化数据 供应商
|
||||
export function getReturnIssueInit() {
|
||||
return request({
|
||||
url: '/report-manage/return-issue/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
//采购退库明细
|
||||
export function getReportPurchaseReturn(query) {
|
||||
return request({
|
||||
url: '/report-manage/purchase-return/report-purchase-return',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
// 查询采购退库明细初始化数据
|
||||
export function getPurchaseReturnInit() {
|
||||
return request({
|
||||
url: '/report-manage/purchase-return/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
//待发药查询
|
||||
export function getAwaitingPendingMedicationPageList(query) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/pending-medication/pending-medication-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
//发药明细 切换统计类型
|
||||
export function getAmbPractitionerDetail(query) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/medication-details/amb-practitioner-detail',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
// 门诊发药明细流水账接口
|
||||
export function getAmbMedicationDetail(query) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/medication-details/amb-medication-detail',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
// 查询发药明细初始化数据
|
||||
export function getMedicationDetailsInit() {
|
||||
return request({
|
||||
url: '/pharmacy-manage/medication-details/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// 医保对账明细
|
||||
export function reconcileDetailList(data) {
|
||||
return request({
|
||||
url: '/yb-request/reconcile-detail-list',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
// 医保对账明细导出txt
|
||||
export function reconcileDetailTxt(data) {
|
||||
return request({
|
||||
url: '/yb-request/reconcile-detail-txt',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 医保明细对总账
|
||||
export function reconcileGeneral(data) {
|
||||
return request({
|
||||
url: '/yb-request/reconcile-general',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
//查询门诊收费明细
|
||||
export function getReportChargePage(params) {
|
||||
return request({
|
||||
url: '/report-manage/charge/report-charge-page',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
//查询门诊收费明细初始值
|
||||
export function getReportChargeInit() {
|
||||
return request({
|
||||
url: '/report-manage/charge/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
//查询挂号收费明细
|
||||
export function getReportRegisterPage(params) {
|
||||
return request({
|
||||
url: '/report-manage/register/report-register-page',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
//查询挂号收费明细初始值
|
||||
export function getReportRegisterInit() {
|
||||
return request({
|
||||
url: '/report-manage/register/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// 文件上传
|
||||
export function ybRequestFileUp(data) {
|
||||
return request({
|
||||
url: '/yb-request/file-up',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
export function getExpirationWarning(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/product/expiration-warning',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
export function getClroptins(query) {
|
||||
return request({
|
||||
url: '/yb-request/select-clroptins',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function applyFinancialClearing(data) {
|
||||
return request({
|
||||
url: '/yb-request/apply-financial-clearing',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
export function applyFinancialClearingList(query) {
|
||||
return request({
|
||||
url: '/yb-request/apply-financial-clearing-list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function applyUnClearing(query) {
|
||||
return request({
|
||||
url: '/yb-request/apply-un-clearing',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function autoApplyFinancialClearing(data) {
|
||||
return request({
|
||||
url: '/yb-request/auto-apply-financial-clearing',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
export function traceabilityCodeManagementInit(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/traceNo/init',
|
||||
method: 'get',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
export function inventoryReceiptPage(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/traceNo/inventory-receipt-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function handOperatedApplyFinancialClearing(data) {
|
||||
return request({
|
||||
url: '/yb-request/hand-operated-apply-financial-clearing',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
export function handOperatedApplyReconcileAccounts(data) {
|
||||
return request({
|
||||
url: '/yb-request/hand-operated-apply-reconcile-accounts',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
export function productPageTotal(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/product/product-statistics',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
export function productBackupPageTotal(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/product/product-backup-statistics',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function getMedDevInfo(query) {
|
||||
return request({
|
||||
url: '/report-manage/medication-device/med-dev-info',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function getMedDevAll(query) {
|
||||
return request({
|
||||
url: '/report-manage/medication-device/med-dev-all',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function getReportStocktakingPageAuto(query) {
|
||||
return request({
|
||||
url: '/report-manage/stocktaking/report-stocktaking-page-auto',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//报表导出
|
||||
export function exportRecords(params) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/medication-details/excel-out',
|
||||
method: 'get',
|
||||
params: qparamsuery,
|
||||
});
|
||||
}
|
||||
|
||||
//查看单据详情
|
||||
export function getDocumentDetails(params) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
//药剂科报表_常规报表:出库明细表(例子)
|
||||
export function getStockOutDetail(query) {
|
||||
return request({
|
||||
url: '/report-manage/report/stock-out-detail-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//查询患者明细主报表--20251106追加
|
||||
export function getReportPatientMasterDetail(query) {
|
||||
return request({
|
||||
url: '/report-manage/report/patient-master-detail',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//线下采购占比报表--20251106追加
|
||||
export function getReportOfflinePurchaseRatio(query) {
|
||||
return request({
|
||||
url: '/report-manage/report/offline-purchase-ratio',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//药品使用情况报表--20251106追加
|
||||
export function getReportMedicationUsage(query) {
|
||||
return request({
|
||||
url: '/report-manage/report/medication-usage',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//查询患者明细报表--20251106追加
|
||||
export function getReportPatientDetails(query) {
|
||||
return request({
|
||||
url: '/report-manage/report/patient-details',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//药剂科报表:药品费用增长率--20251106追加
|
||||
export function getDrugExpensesGrowthRate(query) {
|
||||
return request({
|
||||
url: '/report-manage/report/drug-expenses-growth-rate',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//药剂科报表:30天回款率--20251106追加
|
||||
export function getThirtyDayCollectionRate(query) {
|
||||
return request({
|
||||
url: '/report-manage/report/thirty-day-collection-rate',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//药剂科报表:基本情况--20251106追加
|
||||
export function getReportBasicInformationDetails(query) {
|
||||
return request({
|
||||
url: '/report-manage/report/basic-information-details',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//药剂科报表:药品出库情况--20251106追加
|
||||
export function getReportMedicationStockOutDetails(query) {
|
||||
return request({
|
||||
url: '/report-manage/report/medication-stock-out-details',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//药剂科报表:产品使用情况--20251106追加
|
||||
export function getReportProductUsageDetails(query) {
|
||||
return request({
|
||||
url: '/report-manage/report/product-usage-details',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//药剂科报表:非中选产品采购量占比--20251106追加
|
||||
export function getReportNonWinQtyRatio(query) {
|
||||
return request({
|
||||
url: '/report-manage/report/non-win-qty-ratio',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//药剂科报表:药品入库情况--20251106追加
|
||||
export function getMedicationInboundDetails(query) {
|
||||
return request({
|
||||
url: '/report-manage/report/medication-inbound-details',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//药剂科报表:红旗药品销售情况--20251106追加
|
||||
export function getMedicationSaleDetails(query) {
|
||||
return request({
|
||||
url: '/report-manage/report/medication-sale-details',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//药剂科报表:疾病统计(健康保健)--20251106追加
|
||||
export function getDiseaseDetails(query) {
|
||||
return request({
|
||||
url: '/report-manage/report/disease-details',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//同一报表:门诊科室工作量统计
|
||||
export function getOutpatientDepartmentMetrics(query) {
|
||||
return request({
|
||||
url: '/report-manage/report/outpatient-department-metrics',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//同一报表:查询门诊收费明细初始值--20251106追加
|
||||
export function getReportPhysicianWorkloadInit() {
|
||||
return request({
|
||||
url: '/report-manage/report/physician-workload-init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
//同一报表:查询门诊收费明细--20251106追加
|
||||
export function getPhysicianWorkloadPage(params) {
|
||||
return request({
|
||||
url: '/report-manage/report/report-physician-workload-page',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询追溯患者列表
|
||||
export function tracePatient(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/traceNo/trace-patient',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
@@ -1,223 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="stockOutDetailList"
|
||||
@selection-change="handleSelectionChange"
|
||||
height="calc(100vh - 300px)"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusno"
|
||||
prop="supplyBusno"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="出库类型"
|
||||
align="center"
|
||||
key="type"
|
||||
prop="type"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="medName"
|
||||
prop="medName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="院内药品唯一码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品类型"
|
||||
align="center"
|
||||
key="itemTableText"
|
||||
prop="itemTableText"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="批次号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="140px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="存放仓库"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="货位"
|
||||
align="center"
|
||||
key="locationStoreName"
|
||||
prop="locationStoreName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="计量单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购数量"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购单价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="售价"
|
||||
align="center"
|
||||
key="salePrice"
|
||||
prop="salePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="售价金额"
|
||||
align="center"
|
||||
key="totalSalePrice"
|
||||
prop="totalSalePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="出库科室"
|
||||
align="center"
|
||||
key="orgId_dictText"
|
||||
prop="orgId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
key="supplier"
|
||||
prop="supplier"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审核人"
|
||||
align="center"
|
||||
key="approverId_dictText"
|
||||
prop="approverId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="审批日期"
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="出库原因"
|
||||
align="center"
|
||||
key="reason"
|
||||
prop="reason"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="getStockOutDetail">
|
||||
import {getStockOutDetail,} from './statisticalManagent';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
|
||||
const stockOutDetailList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const approvalTime = ref([]);
|
||||
const supplierListOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
occurrenceTimeSTime: undefined,
|
||||
occurrenceTimeETime: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 药剂科报表_常规报表:出库明细表的查询 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getStockOutDetail(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
stockOutDetailList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,193 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="150px">
|
||||
<el-form-item label="项目名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="项目名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="医疗机构名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.medinsName"
|
||||
placeholder="医疗机构名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="collectionRateList"
|
||||
@selection-change="handleSelectionChange"
|
||||
height="calc(100vh - 300px)"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医疗机构名称"
|
||||
align="center"
|
||||
key="medinsName"
|
||||
prop="medinsName"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品通用名"
|
||||
align="center"
|
||||
key="drugGenname"
|
||||
prop="drugGenname"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="30天回款率(%)"
|
||||
align="center"
|
||||
key="collectionRate"
|
||||
prop="collectionRate"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="thirtyDayCollectionRate">
|
||||
import {getThirtyDayCollectionRate} from './statisticalManagent';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
const collectionRateList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
name: undefined,
|
||||
medinsName: undefined
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams} = toRefs(data);
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet(
|
||||
'report-manage/inbound/excel-out',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`dict_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getThirtyDayCollectionRate(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
collectionRateList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
// 监听路由变化
|
||||
watch(
|
||||
() => route.query,
|
||||
(newQuery) => {
|
||||
// 如果路由中包含指定参数,则使用这些参数进行查询
|
||||
if (
|
||||
newQuery.name ||
|
||||
newQuery.medinsName
|
||||
) {
|
||||
// 设置查询参数
|
||||
if (newQuery.name) {
|
||||
queryParams.value.name = newQuery.name;
|
||||
}
|
||||
// 设置查询参数
|
||||
if (newQuery.medinsName) {
|
||||
queryParams.value.medinsName = newQuery.medinsName;
|
||||
}
|
||||
// 执行查询
|
||||
getList();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.name = '';
|
||||
queryParams.value.medinsName = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,324 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="earlyWarningRef"
|
||||
:inline="true"
|
||||
:rules="rules"
|
||||
label-width="140px"
|
||||
>
|
||||
<el-form-item label="追溯码:" prop="searchKey" label-width="120px">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入药品名称/追溯码"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="进出时间:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="追溯码状态:" prop="statusEnum" label-width="120px">
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
placeholder="请选择追溯码状态"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="traceNoStatus in traceNoStatusOptions"
|
||||
:key="traceNoStatus.value"
|
||||
:label="traceNoStatus.label"
|
||||
:value="traceNoStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作类型:" prop="operationType" label-width="120px">
|
||||
<el-select
|
||||
v-model="queryParams.operationType"
|
||||
placeholder="请选择操作类型"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="operationType in operationTypeOptions"
|
||||
:key="operationType.value"
|
||||
:label="operationType.label"
|
||||
:value="operationType.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
@cell-click="onClickCell"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="药品名"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药房药库"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="产品批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="追溯码"
|
||||
align="center"
|
||||
key="traceNo"
|
||||
prop="traceNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="追溯码状态"
|
||||
align="center"
|
||||
key="statusEnum_enumText"
|
||||
prop="statusEnum_enumText"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="追溯码单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作类型"
|
||||
align="center"
|
||||
key="operationType_enumText"
|
||||
prop="operationType_enumText"
|
||||
width="165"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目类型"
|
||||
align="center"
|
||||
key="itemType_enumText"
|
||||
prop="itemType_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="进出时间"
|
||||
align="center"
|
||||
key="createTime"
|
||||
prop="createTime"
|
||||
:show-overflow-tooltip="true"
|
||||
width="180"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<el-dialog v-model="dialogVisible" title="追溯详情" width="80%">
|
||||
<traceabilityPersonInfo :infoIdParams="infoIdParams"></traceabilityPersonInfo>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="earlyWarning">
|
||||
import {inventoryReceiptPage, traceabilityCodeManagementInit} from './statisticalManagent';
|
||||
import {nextTick, onMounted} from 'vue';
|
||||
import {formatDateStr} from '@/utils';
|
||||
import traceabilityPersonInfo from './traceabilityPersonInfo.vue';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const { item_category_code } = proxy.useDict('item_category_code');
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const occurrenceTime = ref([]);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const locationIdList = ref(undefined);
|
||||
const traceNoStatusOptions = ref(undefined);
|
||||
const operationTypeOptions = ref(undefined);
|
||||
const itemTypeOptions = ref(undefined);
|
||||
const dialogVisible = ref(false);
|
||||
const infoIdParams = ref();
|
||||
|
||||
const props = defineProps({
|
||||
recordInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
categoryCode: undefined,
|
||||
remainingMonth: undefined,
|
||||
createTimeSTime: undefined,
|
||||
createTimeETime: undefined,
|
||||
},
|
||||
rules: {
|
||||
remainingMonth: [
|
||||
// { required: true, message: '单次最大剂量不能为空', trigger: 'blur' },
|
||||
{ validator: validateMaxUnit, trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
setDefaultDateRange();
|
||||
getList();
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function validateMaxUnit(rule, value, callback) {
|
||||
const numberRegex = /^[0-9]+$/; // 正则表达式,确保输入为数字
|
||||
if (!numberRegex.test(value)) {
|
||||
callback(new Error('请输入有效的数字'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
function setDefaultDateRange() {
|
||||
const today = new Date();
|
||||
const oneMonthAgo = new Date(today);
|
||||
oneMonthAgo.setMonth(today.getMonth() - 1);
|
||||
occurrenceTime.value = [
|
||||
formatDateStr(oneMonthAgo, 'YYYY-MM-DD'),
|
||||
formatDateStr(today, 'YYYY-MM-DD'),
|
||||
];
|
||||
queryParams.value.createTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + ' 00:00:00'
|
||||
: '';
|
||||
queryParams.value.createTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + ' 23:59:59'
|
||||
: '';
|
||||
}
|
||||
function getInit() {
|
||||
traceabilityCodeManagementInit().then((res) => {
|
||||
locationIdList.value = res.data.locationOptions;
|
||||
traceNoStatusOptions.value = res.data.traceNoStatusOptions;
|
||||
operationTypeOptions.value = res.data.operationTypeOptions;
|
||||
itemTypeOptions.value = res.data.itemTypeOptions;
|
||||
});
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
queryParams.value.locationId = props.recordInfo.locationId;
|
||||
queryParams.value.lotNumber = props.recordInfo.lotNumber;
|
||||
queryParams.value.itemTable = props.recordInfo.itemTable;
|
||||
queryParams.value.itemId = props.recordInfo.itemId;
|
||||
inventoryReceiptPage(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
proxy.$refs['earlyWarningRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
queryParams.value.createTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + ' 00:00:00'
|
||||
: '';
|
||||
queryParams.value.createTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + ' 23:59:59'
|
||||
: '';
|
||||
queryParams.value.locationId = props.recordInfo.locationId;
|
||||
queryParams.value.lotNumber = props.recordInfo.lotNumber;
|
||||
queryParams.value.itemTable = props.recordInfo.itemTable;
|
||||
queryParams.value.itemId = props.recordInfo.itemId;
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.createTimeSTime = '';
|
||||
queryParams.value.createTimeETime = '';
|
||||
occurrenceTime.value = '';
|
||||
proxy.resetForm('earlyWarningRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
// 点击当前条数触发
|
||||
const onClickCell = (row) => {
|
||||
// console.log('@@@@@=======>', JSON.stringify(row));
|
||||
dialogVisible.value = true;
|
||||
nextTick(() => {
|
||||
infoIdParams.value = {
|
||||
id: row.id,
|
||||
};
|
||||
});
|
||||
};
|
||||
getInit();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -1,53 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table border :data="tableData" style="width: 100%" class="el-table">
|
||||
<el-table-column prop="name" label="姓名" />
|
||||
<el-table-column prop="genderEnum_enumText" label="性别" />
|
||||
<el-table-column prop="age" label="年龄" show-overflow-tooltip />
|
||||
<el-table-column prop="phone" label="电话" show-overflow-tooltip />
|
||||
<el-table-column label="挂号时间" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ filterDate(scope.row.registerTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {ref, watch} from 'vue';
|
||||
import moment from 'moment';
|
||||
import {tracePatient} from './statisticalManagent';
|
||||
|
||||
const tableData = ref([]);
|
||||
const props = defineProps({
|
||||
infoIdParams: {
|
||||
type: Object,
|
||||
},
|
||||
});
|
||||
// 格式化时间
|
||||
const filterDate = (date) => {
|
||||
return moment(date).format('YYYY - MM- DD HH:mm:ss');
|
||||
};
|
||||
// 查询接口
|
||||
const getList = async () => {
|
||||
try {
|
||||
const res = await tracePatient(props.infoIdParams);
|
||||
tableData.value = res.data;
|
||||
} catch (error) {}
|
||||
};
|
||||
watch(
|
||||
() => props.infoIdParams,
|
||||
(newValue) => {
|
||||
console.log('newValue========>', newValue);
|
||||
getList();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-table {
|
||||
height: calc(100vh - 400px);
|
||||
}
|
||||
</style>
|
||||
@@ -1,380 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="药品名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="编码/项目名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="源仓库:" prop="sourceLocationId" label-width="80px">
|
||||
<el-select
|
||||
v-model="queryParams.sourceLocationId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in locationIdList"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="目的仓库:" prop="purposeLocationId" label-width="100px">
|
||||
<el-select
|
||||
v-model="queryParams.purposeLocationId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in locationIdList"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="制单日期:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="handleQuery"
|
||||
|
||||
>查询</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
|
||||
>重置</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-if="viewStatus == 'view'"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusNo"
|
||||
prop="supplyBusNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="是否调拨"
|
||||
align="center"
|
||||
key="statusEnum_enumText"
|
||||
prop="statusEnum_enumText"
|
||||
width="90"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="120px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="源仓库"
|
||||
align="center"
|
||||
key="sourceLocationName"
|
||||
prop="sourceLocationName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="源货位"
|
||||
align="center"
|
||||
key="sourceLocationStoreName"
|
||||
prop="sourceLocationStoreName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="目的仓库"
|
||||
align="center"
|
||||
key="purposeLocationName"
|
||||
prop="purposeLocationName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="目的货位"
|
||||
align="center"
|
||||
key="purposeLocationStoreName"
|
||||
prop="purposeLocationStoreName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="调拨数量"
|
||||
align="center"
|
||||
key="itemQuantity"
|
||||
prop="itemQuantity"
|
||||
width="80"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="计量单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
width="80"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="合计金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="制单人"
|
||||
align="center"
|
||||
key="applicantId_dictText"
|
||||
prop="applicantId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审核人"
|
||||
align="center"
|
||||
key="approverId_dictText"
|
||||
prop="approverId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="制单日期"
|
||||
align="center"
|
||||
key="occurrenceTime"
|
||||
prop="occurrenceTime"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.occurrenceTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="申请日期"
|
||||
align="center"
|
||||
key="applyTime"
|
||||
prop="applyTime"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.applyTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="调拨日期"
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</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"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="transferManagentDetails">
|
||||
import {getPharmacyCabinetList, getReportTransferPage,} from "./statisticalManagent";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
const route = useRoute();
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
sourceLocationId:undefined,
|
||||
purposeLocationId:undefined,
|
||||
occurrenceTimeSTime:undefined,
|
||||
occurrenceTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
// 监听路由变化
|
||||
watch(
|
||||
() => route.query,
|
||||
(newQuery) => {
|
||||
// 如果路由中包含指定参数,则使用这些参数进行查询
|
||||
if (newQuery.purposeLocationId || newQuery.occurrenceTimeSTime || newQuery.occurrenceTimeETime) {
|
||||
// 设置查询参数
|
||||
if (newQuery.purposeLocationId) {
|
||||
queryParams.value.purposeLocationId = newQuery.purposeLocationId;
|
||||
}
|
||||
if (newQuery.sourceLocationId) {
|
||||
queryParams.value.sourceLocationId = newQuery.sourceLocationId;
|
||||
}
|
||||
if (newQuery.occurrenceTimeSTime) {
|
||||
queryParams.value.occurrenceTimeSTime = newQuery.occurrenceTimeSTime + ' 00:00:00';
|
||||
}
|
||||
if (newQuery.occurrenceTimeETime) {
|
||||
queryParams.value.occurrenceTimeETime = newQuery.occurrenceTimeETime + ' 23:59:59';
|
||||
}
|
||||
|
||||
// 执行查询
|
||||
getList();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data
|
||||
});
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportTransferPage(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records
|
||||
|
||||
if(purchaseinventoryList.value&& purchaseinventoryList.value.length>0){
|
||||
purchaseinventoryList.value.map((k,index)=>{
|
||||
k.statusEnum_enumText = k.statusEnum_enumText=='同意'?'已调拨':''
|
||||
})
|
||||
}
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.occurrenceTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.occurrenceTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.occurrenceTimeSTime = ""
|
||||
queryParams.value.occurrenceTimeETime = ""
|
||||
occurrenceTime.value = ""
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet("report-manage/transfer/excel-out", {
|
||||
...queryParams.value
|
||||
}, `dict_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user