解决合并冲突

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

View File

@@ -4,9 +4,9 @@
<el-form-item label="药品名称:" prop="searchKey">
<el-input
v-model="queryParams.searchKey"
placeholder="药品编码/药品名称/名称拼音/供应商名"
placeholder="药品编码/药品名称/名称拼音"
clearable
style="width: 250px"
style="width: 260px"
@keyup.enter="handleQuery"
/>
</el-form-item>
@@ -35,9 +35,10 @@
placeholder="请选择药品类别"
clearable
style="width: 150px"
@change="handleQuery"
>
<el-option
v-for="categoryCode in item_type"
v-for="categoryCode in item_category_code"
:key="categoryCode.value"
:label="categoryCode.label"
:value="categoryCode.value"
@@ -50,6 +51,7 @@
placeholder="请选择药品类别"
clearable
style="width: 150px"
@change="handleQuery"
>
<el-option label="未停供" :value="2" />
<el-option label="已停供" :value="3" />
@@ -61,6 +63,7 @@
placeholder="请选择医保等级"
clearable
style="width: 150px"
@change="handleQuery"
>
<el-option
v-for="chrgitmLv_enumText in chrgitmLv_enumTextOptions"
@@ -70,27 +73,13 @@
/>
</el-select>
</el-form-item>
<el-form-item label="仓库药房" prop="locationId">
<el-form-item label="库存范围" prop="zeroFlag">
<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"
v-model="queryParams.zeroFlag"
placeholder="请选择库存范围"
clearable
style="width: 150px"
@change="handleQuery"
>
<el-option
v-for="supplyStatus in inventory_range"
@@ -100,40 +89,52 @@
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="医院" prop="hospital" label-width="100px">
<el-form-item label="仓库药房" prop="locationId">
<el-select
v-model="queryParams.hospital"
placeholder=""
v-model="locationId"
placeholder="请选择仓库药房"
multiple
clearable
style="width: 150px"
style="width: 260px"
@change="handleQuery"
>
<el-option
v-for="supplyStatus in supplyTypeOptions"
v-for="supplyStatus in locationIdList"
:key="supplyStatus.value"
:label="supplyStatus.label"
:value="supplyStatus.value"
:label="supplyStatus.name"
:value="supplyStatus.id"
/>
</el-select>
</el-form-item> -->
</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>
<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">
<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"
@@ -141,17 +142,9 @@
max-height="600"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="50" align="center" />
<el-table-column type="index" width="50" align="center" />
<el-table-column label="序号" type="index" width="50" align="center" />
<el-table-column
label="药品类别"
align="center"
key="categoryCode_dictText"
prop="categoryCode_dictText"
:show-overflow-tooltip="true"
/>
<el-table-column
label="药品编码"
label="项目编码"
align="center"
key="busNo"
prop="busNo"
@@ -159,13 +152,31 @@
:show-overflow-tooltip="true"
/>
<el-table-column
label="药品名称"
label="项目名称"
align="center"
key="medicineName"
prop="medicineName"
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"
@@ -178,15 +189,9 @@
align="center"
key="totalVolume"
prop="totalVolume"
width="120"
width="150"
:show-overflow-tooltip="true"
/>
<el-table-column
label="医保等级"
align="center"
key="chrgitmLv_enumText"
prop="chrgitmLv_enumText"
/>
<el-table-column
label="厂家/产地"
align="center"
@@ -204,34 +209,31 @@
:show-overflow-tooltip="true"
/>
<el-table-column
label="库存(采购单位)"
align="center"
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="center"
key="unitCode_dictText"
prop="unitCode_dictText"
:show-overflow-tooltip="true"
/>
<el-table-column
label="库存数量"
align="center"
label="库存(最小单位"
align="right"
header-align="center"
key="quantity"
prop="quantity"
width="130px"
:show-overflow-tooltip="true"
/>
<el-table-column
label="库存单位"
align="center"
key="minUnitCode_dictText"
prop="minUnitCode_dictText"
: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"
@@ -241,50 +243,54 @@
/>
<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="totalPrice"
prop="totalPrice"
align="right"
header-align="center"
key="purchasePrice"
prop="purchasePrice"
width="100"
:show-overflow-tooltip="true"
>
<template #default="scope">
<span
:style="
scope.row.totalPrice == scope.row.totalSalePrice ? 'color: black' : 'color: red'
"
>{{ scope.row.totalPrice }}</span
>
<span>{{ scope.row.purchasePrice?.toFixed(2) + ' 元' }}</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>{{ scope.row.salePrice?.toFixed(2) + ' 元' }}</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>{{ scope.row.totalPurchasePrice?.toFixed(2) + ' 元' }}</span>
</template>
</el-table-column>
<el-table-column
label="零售价总额"
align="center"
align="right"
header-align="center"
key="totalSalePrice"
prop="totalSalePrice"
width="100"
:show-overflow-tooltip="true"
>
<template #default="scope">
<span
:style="
scope.row.totalPrice == scope.row.totalSalePrice ? 'color: black' : 'color: red'
"
>{{ scope.row.totalSalePrice }}</span
>
<span>{{ scope.row.totalSalePrice?.toFixed(2) + ' 元' }}</span>
</template>
</el-table-column>
<el-table-column
@@ -293,7 +299,11 @@
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"
@@ -301,25 +311,35 @@
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="supplyName"
prop="supplyName"
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="160"
width="120"
:show-overflow-tooltip="true"
>
<template #default="scope">
<span>{{ parseTime(scope.row.productionDate) }}</span>
<span>{{ formatDateStr(scope.row.productionDate, 'YYYY-MM-DD') }}</span>
</template>
</el-table-column>
<el-table-column
@@ -327,21 +347,13 @@
align="center"
key="expirationDate"
prop="expirationDate"
width="160"
width="120"
:show-overflow-tooltip="true"
>
<template #default="scope">
<span>{{ parseTime(scope.row.expirationDate) }}</span>
<span>{{ formatDateStr(scope.row.expirationDate, 'YYYY-MM-DD') }}</span>
</template>
</el-table-column>
<el-table-column
label="拼音码"
align="center"
key="pyStr"
prop="pyStr"
width="110"
:show-overflow-tooltip="true"
/>
<el-table-column
label="剩余过期天数"
align="center"
@@ -350,21 +362,6 @@
width="110px"
:show-overflow-tooltip="true"
/>
<el-table-column
label="药品追溯码"
align="center"
key="traceNo"
prop="traceNo"
width="120px"
:show-overflow-tooltip="true"
/>
<el-table-column
label="药品停用"
align="center"
key="statusEnum_enumText"
prop="statusEnum_enumText"
:show-overflow-tooltip="true"
/>
<el-table-column
label="货位"
align="center"
@@ -372,13 +369,6 @@
prop="locationStoreName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="仓库类型"
align="center"
key="formEnum_enumText"
prop="formEnum_enumText"
:show-overflow-tooltip="true"
/>
<el-table-column
label="停供状态"
align="center"
@@ -386,22 +376,6 @@
prop="inventoryStatusEnum_enumText"
:show-overflow-tooltip="true"
/>
<el-table-column
label="追溯码入库数"
align="center"
key="inCount"
prop="inCount"
width="120px"
:show-overflow-tooltip="true"
/>
<el-table-column
label="追溯码出库数"
align="center"
key="outCount"
prop="outCount"
width="120px"
:show-overflow-tooltip="true"
/>
<el-table-column
label="操作"
align="center"
@@ -429,19 +403,15 @@
v-if="scope.row.inventoryStatusEnum == 3"
>取消停供</el-button
>
<el-button
link
type="primary"
icon="Edit"
@click="handleOpenPage(scope.row)"
<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(2) }}</span>
<span class="descriptions-item-label">零售价合计金额{{ priceTotal.toFixed(2) }}</span>
<span class="descriptions-item-label"> 进价合计金额{{ salePriceTotal.toFixed(4) }} </span>
<span class="descriptions-item-label"> 零售价合计金额{{ priceTotal.toFixed(4) }} </span>
</div>
<pagination
v-show="total > 0"
@@ -471,18 +441,25 @@ import {
getPharmacyCabinetList,
cancelSupply,
stopSupply,
productPageTotal
productPageTotal,
} from './statisticalManagent';
import Decimal from 'decimal.js';
import traceabilityCodeManagement from './traceabilityCodeManagement.vue';
import { formatDateStr } from '@/utils/index';
import { getSupplierList } from '@/api/public';
import { useStore } from '@/store/store';
const store = useStore();
const { proxy } = getCurrentInstance();
const { item_type, inventory_range } = proxy.useDict('item_type', 'inventory_range');
const { item_category_code, inventory_range } = proxy.useDict(
'item_category_code',
'inventory_range'
);
const purchaseinventoryList = ref([]);
const visible = ref(false);
const recordInfo = ref({});
const route = useRoute();
const loading = ref(true);
@@ -496,6 +473,9 @@ const supplyTypeOptions = ref(undefined);
const supplyStatusOptions = ref(undefined);
const chrgitmLv_enumTextOptions = ref([]);
const locationIdList = ref([]);
const supplierList = ref([]);
const locationId = ref([]);
const supplierId = ref([]);
const data = reactive({
form: {},
@@ -507,7 +487,7 @@ const data = reactive({
// hospital:undefined,
categoryCode: undefined,
chrgitmLv: undefined,
warehouseScope: undefined,
zeroFlag: undefined,
locationId: undefined,
// occurrenceTimeSTime:undefined,
// occurrenceTimeETime:undefined,
@@ -517,19 +497,38 @@ const data = reactive({
const { queryParams, form, rules } = toRefs(data);
watch(
() => store.remainingDays,
(newValue) => {
if (newValue) {
queryParams.value.remainingDays = newValue;
handleQuery(); // 触发查询
store.clearRemainingDays(); // 清除值
}
},
{ immediate: true } // 修正拼写错误
);
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 getList() {
console.log(store.remainingDays, '1');
loading.value = true;
salePriceTotal.value = 0;
priceTotal.value = 0;
queryParams.value.locationIds = locationId.value.join(',');
queryParams.value.supplierIds = supplierId.value.join(',');
getproductReturnPage(queryParams.value).then((res) => {
loading.value = false;
purchaseinventoryList.value = res.data.records;
@@ -538,30 +537,14 @@ function getList() {
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;
});
productPageTotal(queryParams.value).then((res) => {
salePriceTotal.value = res.data.totalPurchasePrice;
priceTotal.value = res.data.totalSalePrice;
})
salePriceTotal.value = res.data.purchasePriceStatistics;
priceTotal.value = res.data.salePriceStatistics;
});
}
/** 搜索按钮操作 */
@@ -578,6 +561,26 @@ function handleQuery() {
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() {
proxy.downloadGet(
'/inventory-manage/product/excel-out',
{
...queryParams.value,
},
`库存明细记录_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
);
}
/** 清空条件按钮操作 */
function handleClear() {
// 清空查询条件
@@ -585,7 +588,7 @@ function handleClear() {
getList();
}
function handleOpenPage (row) {
function handleOpenPage(row) {
recordInfo.value = row;
visible.value = true;
}
@@ -611,14 +614,14 @@ function openAddaddTransferProductDialog() {
// 取消停供 停供
function handlestopcancelSupply(row) {
if (row.inventoryStatusEnum == 2) {
stopSupply(row.id).then((response) => {
stopSupply(row.inventoryId).then((response) => {
proxy.$modal.msgSuccess('停供成功');
open.value = false;
getList();
});
}
if (row.inventoryStatusEnum == 3) {
cancelSupply(row.id).then((response) => {
cancelSupply(row.inventoryId).then((response) => {
proxy.$modal.msgSuccess('取消停供成功');
open.value = false;
getList();
@@ -638,4 +641,4 @@ getPharmacyCabinetLists();
display: flex;
align-items: center;
}
</style>
</style>