✨ 凭证管理关联运单批次弹窗增加项目筛选与项目列
- 搜索表单新增项目下拉筛选,查询参数透传 projectId - 运单批次表格在运单批次号后新增项目列,同一批次跨项目时显示「多个项目」
This commit is contained in:
@@ -389,6 +389,18 @@
|
||||
v-model="batchQuery.batchNo"
|
||||
clearable
|
||||
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-form-item label="创建日期"
|
||||
><el-date-picker
|
||||
@@ -428,6 +440,10 @@
|
||||
prop="batchNo"
|
||||
label="运单批次号"
|
||||
min-width="240" /><el-table-column
|
||||
prop="projectName"
|
||||
label="项目"
|
||||
min-width="180"
|
||||
show-overflow-tooltip /><el-table-column
|
||||
prop="createTime"
|
||||
label="创建时间"
|
||||
min-width="180" /><el-table-column label="运单数" width="120"
|
||||
@@ -694,7 +710,12 @@ const selectedBatches = ref([]),
|
||||
batchRows = ref([]),
|
||||
batchSelection = 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 progressQuery = reactive({ businessId: '', attachmentName: '', status: '' });
|
||||
const progressPage = reactive({ current: 1, size: 10, total: 0 });
|
||||
@@ -1024,6 +1045,7 @@ const openBatchDialog = async row => {
|
||||
batchTarget.value = voucher?.id ? voucher : undefined;
|
||||
batchSelection.value = [];
|
||||
batchVisible.value = true;
|
||||
if (!projectOptions.value.length) await loadProjects();
|
||||
await loadBatches();
|
||||
if (voucher?.waybillBatchNo) {
|
||||
const currentBatch = batchRows.value.find(item => item.batchNo === voucher.waybillBatchNo);
|
||||
@@ -1033,6 +1055,7 @@ const openBatchDialog = async row => {
|
||||
const loadBatches = async () => {
|
||||
const res = await api.getWaybillBatches(batchPage.current, batchPage.size, {
|
||||
batchNo: batchQuery.batchNo,
|
||||
projectId: batchQuery.projectId,
|
||||
createUser: batchQuery.createUser,
|
||||
waybillCount: batchQuery.waybillCount,
|
||||
createTimeStart: batchCreateRange.value?.[0] ? `${batchCreateRange.value[0]} 00:00:00` : '',
|
||||
@@ -1054,7 +1077,12 @@ const handleWaybillCountInput = value => {
|
||||
}
|
||||
};
|
||||
const resetBatchQuery = () => {
|
||||
Object.assign(batchQuery, { batchNo: '', createUser: '', waybillCount: undefined });
|
||||
Object.assign(batchQuery, {
|
||||
batchNo: '',
|
||||
projectId: '',
|
||||
createUser: '',
|
||||
waybillCount: undefined,
|
||||
});
|
||||
batchCreateRange.value = [];
|
||||
batchPage.current = 1;
|
||||
loadBatches();
|
||||
|
||||
Reference in New Issue
Block a user