调整业务模块

This commit is contained in:
2026-09-07 10:05:32 +08:00
parent 6a6d10dc79
commit 0d070d4b34
16 changed files with 264 additions and 157 deletions
@@ -1,10 +1,12 @@
<template>
<el-dialog
<component
:is="standalone ? 'div' : 'el-dialog'"
v-model="visible"
title="导入运单"
width="90%"
append-to-body
destroy-on-close
:class="{ 'waybill-import-page': standalone }"
@closed="handleClosed"
>
<div class="waybill-import-toolbar">
@@ -96,7 +98,7 @@
@current-change="loadBatches"
@size-change="loadBatches"
/>
</el-dialog>
</component>
<el-dialog v-model="detailVisible" title="导入运单详情" width="90%" append-to-body>
<el-form :inline="true" :model="detailQuery"
@@ -423,7 +425,7 @@
</template>
<script setup>
import { computed, reactive, ref } from 'vue';
import { computed, onMounted, reactive, ref, watch } from 'vue';
import { ElMessage, ElMessageBox } from 'element-plus';
import { getList as getCargoTypeList } from '@/api/base/cargo-type';
import { getList as getCommonCargoList } from '@/api/business/common-cargo';
@@ -434,7 +436,7 @@ import { getDictionary } from '@/api/system/dictbiz';
import * as api from '@/api/business/waybill-manage';
import { downloadXls } from '@/utils/util';
const props = defineProps({ modelValue: Boolean });
const props = defineProps({ modelValue: Boolean, standalone: Boolean });
const emit = defineEmits(['update:modelValue', 'closed']);
const visible = computed({
get: () => props.modelValue,
@@ -753,6 +755,15 @@ const loadBatches = async () => {
batches.value = res.data?.data?.records || [];
page.total = res.data?.data?.total || 0;
};
onMounted(() => {
if (props.standalone) loadBatches();
});
watch(
() => props.modelValue,
value => {
if (value) loadBatches();
}
);
const resetQuery = () => {
Object.assign(query, { batchNo: '', carrierId: '', createUser: '', createTimeRange: [] });
page.current = 1;
@@ -1083,6 +1094,12 @@ const confirmImport = async () => {
}
}
.waybill-import-page {
min-height: calc(100vh - 120px);
padding: 12px 24px 24px;
background: #fff;
}
.waybill-import-create {
&__form-panel,
&__detail-panel {