✨ 凭证管理关联运单批次弹窗增加项目筛选与项目列

- 搜索表单新增项目下拉筛选,查询参数透传 projectId
- 运单批次表格在运单批次号后新增项目列,同一批次跨项目时显示「多个项目」
This commit is contained in:
2026-11-06 08:10:31 +08:00
parent 2be6a559e7
commit a6b4a7b2d1
+30 -2
View File
@@ -389,6 +389,18 @@
v-model="batchQuery.batchNo" v-model="batchQuery.batchNo"
clearable clearable
placeholder="请输入" /></el-form-item></el-col placeholder="请输入" /></el-form-item></el-col
><el-col :span="12"
><el-form-item label="项目"
><el-select
v-model="batchQuery.projectId"
filterable
clearable
placeholder="请选择"
><el-option
v-for="item in projectOptions"
:key="item.id"
:label="item.projectName"
:value="item.id" /></el-select></el-form-item></el-col
><el-col :span="12" ><el-col :span="12"
><el-form-item label="创建日期" ><el-form-item label="创建日期"
><el-date-picker ><el-date-picker
@@ -428,6 +440,10 @@
prop="batchNo" prop="batchNo"
label="运单批次号" label="运单批次号"
min-width="240" /><el-table-column min-width="240" /><el-table-column
prop="projectName"
label="项目"
min-width="180"
show-overflow-tooltip /><el-table-column
prop="createTime" prop="createTime"
label="创建时间" label="创建时间"
min-width="180" /><el-table-column label="运单数" width="120" min-width="180" /><el-table-column label="运单数" width="120"
@@ -694,7 +710,12 @@ const selectedBatches = ref([]),
batchRows = ref([]), batchRows = ref([]),
batchSelection = ref([]), batchSelection = ref([]),
batchCreateRange = ref([]); batchCreateRange = ref([]);
const batchQuery = reactive({ batchNo: '', createUser: '', waybillCount: undefined }); const batchQuery = reactive({
batchNo: '',
projectId: '',
createUser: '',
waybillCount: undefined,
});
const batchPage = reactive({ current: 1, size: 10, total: 0 }); const batchPage = reactive({ current: 1, size: 10, total: 0 });
const progressQuery = reactive({ businessId: '', attachmentName: '', status: '' }); const progressQuery = reactive({ businessId: '', attachmentName: '', status: '' });
const progressPage = reactive({ current: 1, size: 10, total: 0 }); const progressPage = reactive({ current: 1, size: 10, total: 0 });
@@ -1024,6 +1045,7 @@ const openBatchDialog = async row => {
batchTarget.value = voucher?.id ? voucher : undefined; batchTarget.value = voucher?.id ? voucher : undefined;
batchSelection.value = []; batchSelection.value = [];
batchVisible.value = true; batchVisible.value = true;
if (!projectOptions.value.length) await loadProjects();
await loadBatches(); await loadBatches();
if (voucher?.waybillBatchNo) { if (voucher?.waybillBatchNo) {
const currentBatch = batchRows.value.find(item => item.batchNo === voucher.waybillBatchNo); const currentBatch = batchRows.value.find(item => item.batchNo === voucher.waybillBatchNo);
@@ -1033,6 +1055,7 @@ const openBatchDialog = async row => {
const loadBatches = async () => { const loadBatches = async () => {
const res = await api.getWaybillBatches(batchPage.current, batchPage.size, { const res = await api.getWaybillBatches(batchPage.current, batchPage.size, {
batchNo: batchQuery.batchNo, batchNo: batchQuery.batchNo,
projectId: batchQuery.projectId,
createUser: batchQuery.createUser, createUser: batchQuery.createUser,
waybillCount: batchQuery.waybillCount, waybillCount: batchQuery.waybillCount,
createTimeStart: batchCreateRange.value?.[0] ? `${batchCreateRange.value[0]} 00:00:00` : '', createTimeStart: batchCreateRange.value?.[0] ? `${batchCreateRange.value[0]} 00:00:00` : '',
@@ -1054,7 +1077,12 @@ const handleWaybillCountInput = value => {
} }
}; };
const resetBatchQuery = () => { const resetBatchQuery = () => {
Object.assign(batchQuery, { batchNo: '', createUser: '', waybillCount: undefined }); Object.assign(batchQuery, {
batchNo: '',
projectId: '',
createUser: '',
waybillCount: undefined,
});
batchCreateRange.value = []; batchCreateRange.value = [];
batchPage.current = 1; batchPage.current = 1;
loadBatches(); loadBatches();