前端最新版本同步

This commit is contained in:
Zhang.WH
2025-09-25 10:36:07 +08:00
parent a3a06d6f3c
commit 1276dc4adb
117 changed files with 11964 additions and 2466 deletions

View File

@@ -83,6 +83,14 @@
>重置</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
@@ -107,6 +115,14 @@
: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"
@@ -155,6 +171,20 @@
: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"
@@ -171,6 +201,34 @@
: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"
@@ -199,12 +257,13 @@ import {
getReportStocktakingPage,
getInit,
getPharmacyCabinetList,
getReportStocktakingPageAuto,
cancelSupply,
stopSupply,
} from "./statisticalManagent";
const { proxy } = getCurrentInstance();
const route = useRoute();
const purchaseinventoryList = ref([]);
const loading = ref(true);
@@ -234,6 +293,38 @@ const data = reactive({
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
@@ -245,11 +336,13 @@ function getPharmacyCabinetLists() {
/** 查询调拨管理项目列表 */
function getList() {
loading.value = true;
getReportStocktakingPage(queryParams.value).then((res) => {
loading.value = false;
purchaseinventoryList.value = res.data.records
total.value = res.data.total;
});
if(!route.query.sourceLocationId) {
getReportStocktakingPage(queryParams.value).then((res) => {
loading.value = false;
purchaseinventoryList.value = res.data.records
total.value = res.data.total;
});
}
}
/** 搜索按钮操作 */
@@ -283,6 +376,12 @@ function handleSelectionChange(selection) {
multiple.value = !selection.length;
}
/** 导出按钮操作 */
function handleExport() {
proxy.$download.downloadGet("report-manage/stocktaking/excel-out", {
...queryParams.value
}, `dict_${new Date().getTime()}.xlsx`);
}
getList();
getPharmacyCabinetLists()