提交merge1.3
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="90px">
|
||||
<el-form-item label="药品名称:" prop="searchKey">
|
||||
<el-form-item label="药品名称" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="药品编码/药品名称/名称拼音"
|
||||
@@ -10,16 +10,8 @@
|
||||
@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-form-item label="剩余过期天数" prop="remainingDays" label-width="110px">
|
||||
<el-input
|
||||
v-model="queryParams.remainingDays"
|
||||
placeholder="查询 ≤ X 天的记录"
|
||||
@@ -28,12 +20,12 @@
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="药品类别:" prop="categoryCode">
|
||||
<el-form-item label="药品类型" prop="medCategoryCodes">
|
||||
<el-select
|
||||
v-model="queryParams.categoryCode"
|
||||
v-model="queryParams.medCategoryCodes"
|
||||
placeholder="请选择药品类别"
|
||||
clearable
|
||||
<<<<<<< HEAD
|
||||
style="width: 150px"
|
||||
@change="handleQuery"
|
||||
>
|
||||
@@ -42,10 +34,45 @@
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
=======
|
||||
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"
|
||||
>>>>>>> v1.3
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="停供状态:" prop="categoryCode">
|
||||
<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="categoryCode">
|
||||
<el-select
|
||||
v-model="queryParams.inventoryStatusEnum"
|
||||
placeholder="请选择药品类别"
|
||||
@@ -57,7 +84,7 @@
|
||||
<el-option label="已停供" :value="3" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="医保等级:" prop="chrgitmLv">
|
||||
<el-form-item label="医保等级" prop="chrgitmLv">
|
||||
<el-select
|
||||
v-model="queryParams.chrgitmLv"
|
||||
placeholder="请选择医保等级"
|
||||
@@ -73,7 +100,11 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<<<<<<< HEAD
|
||||
<el-form-item label="库存范围:" prop="zeroFlag">
|
||||
=======
|
||||
<el-form-item label="库存范围" prop="zeroFlag">
|
||||
>>>>>>> v1.3
|
||||
<el-select
|
||||
v-model="queryParams.zeroFlag"
|
||||
placeholder="请选择库存范围"
|
||||
@@ -89,7 +120,11 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<<<<<<< HEAD
|
||||
<el-form-item label="仓库药房:" prop="locationId">
|
||||
=======
|
||||
<el-form-item label="仓库药房" prop="locationId">
|
||||
>>>>>>> v1.3
|
||||
<el-select
|
||||
v-model="locationId"
|
||||
placeholder="请选择仓库药房"
|
||||
@@ -106,7 +141,11 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<<<<<<< HEAD
|
||||
<el-form-item label="供应商:" prop="supplierId">
|
||||
=======
|
||||
<el-form-item label="供应商" prop="supplierId">
|
||||
>>>>>>> v1.3
|
||||
<el-select
|
||||
v-model="supplierId"
|
||||
placeholder="请选择供应商"
|
||||
@@ -123,6 +162,19 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<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>
|
||||
>>>>>>> v1.3
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
@@ -251,7 +303,11 @@
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<<<<<<< HEAD
|
||||
<span>{{ scope.row.purchasePrice?.toFixed(2) + ' 元' }}</span>
|
||||
=======
|
||||
<span>{{ scope.row.purchasePrice?.toFixed(3) + ' 元' }}</span>
|
||||
>>>>>>> v1.3
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -264,7 +320,11 @@
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<<<<<<< HEAD
|
||||
<span>{{ scope.row.salePrice?.toFixed(2) + ' 元' }}</span>
|
||||
=======
|
||||
<span>{{ scope.row.salePrice?.toFixed(3) + ' 元' }}</span>
|
||||
>>>>>>> v1.3
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -277,7 +337,11 @@
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<<<<<<< HEAD
|
||||
<span>{{ scope.row.totalPurchasePrice?.toFixed(2) + ' 元' }}</span>
|
||||
=======
|
||||
<span>{{ scope.row.totalPurchasePrice?.toFixed(3) + ' 元' }}</span>
|
||||
>>>>>>> v1.3
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -290,7 +354,11 @@
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<<<<<<< HEAD
|
||||
<span>{{ scope.row.totalSalePrice?.toFixed(2) + ' 元' }}</span>
|
||||
=======
|
||||
<span>{{ scope.row.totalSalePrice?.toFixed(3) + ' 元' }}</span>
|
||||
>>>>>>> v1.3
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -385,7 +453,6 @@
|
||||
>
|
||||
<!-- 停供/停用3,取消停供/启用2 -->
|
||||
<template #default="scope">
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@@ -394,7 +461,6 @@
|
||||
v-if="scope.row.inventoryStatusEnum == 2"
|
||||
>停供</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@@ -419,7 +485,7 @@
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
:style="'margin-top: 35px;'"
|
||||
@pagination="getList"
|
||||
@pagination="paginationList"
|
||||
/>
|
||||
<el-dialog
|
||||
title="药品追溯码"
|
||||
@@ -442,20 +508,45 @@ import {
|
||||
cancelSupply,
|
||||
stopSupply,
|
||||
productPageTotal,
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
productBackupPageTotal,
|
||||
getproductReturnBackUpPage,
|
||||
>>>>>>> v1.3
|
||||
} from './statisticalManagent';
|
||||
import traceabilityCodeManagement from './traceabilityCodeManagement.vue';
|
||||
import { formatDateStr } from '@/utils/index';
|
||||
import { getSupplierList } from '@/api/public';
|
||||
import { useStore } from '@/store/store';
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
import { computed, watch } from 'vue';
|
||||
>>>>>>> v1.3
|
||||
const store = useStore();
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
<<<<<<< HEAD
|
||||
const { item_category_code, inventory_range } = proxy.useDict(
|
||||
'item_category_code',
|
||||
'inventory_range'
|
||||
);
|
||||
|
||||
=======
|
||||
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];
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
const purchaseinventoryList = ref([]);
|
||||
const visible = ref(false);
|
||||
const recordInfo = ref({});
|
||||
@@ -469,8 +560,6 @@ const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const salePriceTotal = ref(0);
|
||||
const priceTotal = ref(0);
|
||||
const supplyTypeOptions = ref(undefined);
|
||||
const supplyStatusOptions = ref(undefined);
|
||||
const chrgitmLv_enumTextOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
const supplierList = ref([]);
|
||||
@@ -484,13 +573,13 @@ const data = reactive({
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
remainingDays: undefined,
|
||||
// hospital:undefined,
|
||||
categoryCode: undefined,
|
||||
categoryCode: [],
|
||||
chrgitmLv: undefined,
|
||||
zeroFlag: undefined,
|
||||
locationId: undefined,
|
||||
// occurrenceTimeSTime:undefined,
|
||||
// occurrenceTimeETime:undefined,
|
||||
medCategoryCodes: [],
|
||||
devCategoryCodes: [],
|
||||
backUpDate: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
@@ -508,7 +597,58 @@ watch(
|
||||
},
|
||||
{ immediate: true } // 修正拼写错误
|
||||
);
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
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 || [];
|
||||
}
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data;
|
||||
@@ -520,6 +660,7 @@ function getPharmacyCabinetLists() {
|
||||
chrgitmLv_enumTextOptions.value = response.data.chrgitmLvOptions;
|
||||
});
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
console.log(store.remainingDays, '1');
|
||||
@@ -530,6 +671,31 @@ function getList() {
|
||||
queryParams.value.locationIds = locationId.value.join(',');
|
||||
queryParams.value.supplierIds = supplierId.value.join(',');
|
||||
getproductReturnPage(queryParams.value).then((res) => {
|
||||
=======
|
||||
/** 查询备份日期库存明细列表 */
|
||||
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) => {
|
||||
>>>>>>> v1.3
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records;
|
||||
if (purchaseinventoryList.value && purchaseinventoryList.value.length > 0) {
|
||||
@@ -541,7 +707,46 @@ function getList() {
|
||||
}
|
||||
total.value = res.data.total;
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
productPageTotal(queryParams.value).then((res) => {
|
||||
=======
|
||||
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) => {
|
||||
>>>>>>> v1.3
|
||||
salePriceTotal.value = res.data.purchasePriceStatistics;
|
||||
priceTotal.value = res.data.salePriceStatistics;
|
||||
});
|
||||
@@ -558,7 +763,42 @@ function handleQuery() {
|
||||
// ? occurrenceTime.value[1] + " 23:59:59"
|
||||
// : "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
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 formatQuantity(row) {
|
||||
|
||||
Reference in New Issue
Block a user