This commit is contained in:
zlwu committed 2026-07-05 21:31:07 +08:00
1 parent 31be9bfd95
commit 843e13bce3
722 files changed
+288067 -110680

No files matched your search

+74 -11
View File
@@ -6,6 +6,8 @@
<h2 class="title-bar-heading">运输计划列表</h2>
</div>
<PlPlanTypeTabs v-model="activePlanTypeTab" @change="handlePlanTypeTabChange" />
<!-- 筛选区 -->
<div class="filter-block">
<el-form :model="searchForm" class="filter-form" @submit.prevent>
@@ -18,13 +20,6 @@
@keyup.enter="handleSearch"
/>
</el-form-item>
<el-form-item label="单据类型">
<el-select v-model="searchForm.planType" placeholder="全部" clearable>
<el-option label="直销单" value="direct" />
<el-option label="入库单" value="inbound" />
<el-option label="出库单" value="outbound" />
</el-select>
</el-form-item>
<el-form-item label="跟进状态">
<el-select v-model="searchForm.followStatus" placeholder="全部" clearable>
<el-option label="草稿" value="draft" />
@@ -113,7 +108,21 @@
:disabled="selectedRows.length !== 1"
@click="handleToolbarPrintInboundSlip"
>
<el-icon><Printer /></el-icon>入库单打印
<el-icon><Printer /></el-icon>入库单
</el-button>
<el-button
class="btn-ghost"
:disabled="selectedRows.length !== 1"
@click="handleToolbarPrintDeliverySlip"
>
<el-icon><Printer /></el-icon>送(提)货单
</el-button>
<el-button
class="btn-ghost"
:disabled="selectedRows.length !== 1"
@click="handleToolbarPrintSubpackSlip"
>
<el-icon><Printer /></el-icon>分装单
</el-button>
<el-button
v-if="selectedPlan && canVoidPlan(selectedPlan)"
@@ -263,7 +272,11 @@
min-width="180"
show-overflow-tooltip
align="center"
/>
>
<template #default="{ row }">
{{ normalizePlPersonnelSummaryDisplay(row.personnelSummary) }}
</template>
</el-table-column>
<el-table-column
v-if="isColumnVisible('followUserName')"
prop="followUserName"
@@ -318,7 +331,19 @@
class="btn-ghost"
@click="handlePrintInboundSlip(viewingPlan)"
>
<el-icon><Printer /></el-icon>入库单打印
<el-icon><Printer /></el-icon>入库单
</el-button>
<el-button
class="btn-ghost"
@click="handlePrintDeliverySlip(viewingPlan)"
>
<el-icon><Printer /></el-icon>送(提)货单
</el-button>
<el-button
class="btn-ghost"
@click="handlePrintSubpackSlip(viewingPlan)"
>
<el-icon><Printer /></el-icon>分装单
</el-button>
<el-button
v-if="canVoidPlan(viewingPlan)"
@@ -350,6 +375,8 @@
/>
<PlInboundSlipPrintDialog ref="inboundSlipPrintRef" />
<PlDeliverySlipPrintDialog ref="deliverySlipPrintRef" />
<PlSubpackSlipPrintDialog ref="subpackSlipPrintRef" />
</div>
</template>
@@ -366,6 +393,8 @@ import {
} from '@element-plus/icons-vue'
import { planApi, type Plan } from '@/api/pl'
import PlInboundSlipPrintDialog from '@/components/business/pl-inbound-slip-print-dialog/index.vue'
import PlDeliverySlipPrintDialog from '@/components/business/pl-delivery-slip-print-dialog/index.vue'
import PlSubpackSlipPrintDialog from '@/components/business/pl-subpack-slip-print-dialog/index.vue'
import PlPlanArrangeDialog from '@/components/business/pl-plan-arrange-dialog/index.vue'
import PlPlanFormDialog from '@/components/business/pl-plan-form-dialog/index.vue'
import ListQuickSearchInput from '@/components/business/list-quick-search-input/index.vue'
@@ -373,11 +402,17 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
import { usePersistedListColumns } from '@/composables/usePersistedListColumns'
import PlPlanListProductCell from '@/components/business/pl-plan-list-product-cell/index.vue'
import PlPlanViewDialog from '@/components/business/pl-plan-view-dialog/index.vue'
import PlPlanTypeTabs from '@/components/business/pl-plan-type-tabs/index.vue'
import ListToolbarDateShortcuts from '@/components/core/list-toolbar-date-shortcuts/index.vue'
import { useDbInstantSearch } from '@/composables/useDbInstantSearch'
import { useListDateShortcut } from '@/composables/useListDateShortcut'
import { canDeleteByCreator, CREATOR_DELETE_TIP } from '@/utils/creator-delete'
import { formatPlVehiclePlateDisplay } from '@/utils/pl-display'
import {
formatPlVehiclePlateDisplay,
normalizePlPersonnelSummaryDisplay,
plPlanTypeTabToFilter,
type PlPlanTypeTab
} from '@/utils/pl-display'
import { syncViewRowFromFlatList } from '@/utils/view-dialog-refresh'
const route = useRoute()
const router = useRouter()
@@ -393,6 +428,8 @@ const viewDialogRef = ref<InstanceType<typeof PlPlanViewDialog>>()
const arrangeDialogVisible = ref(false)
const arrangePlanId = ref('')
const inboundSlipPrintRef = ref<InstanceType<typeof PlInboundSlipPrintDialog>>()
const deliverySlipPrintRef = ref<InstanceType<typeof PlDeliverySlipPrintDialog>>()
const subpackSlipPrintRef = ref<InstanceType<typeof PlSubpackSlipPrintDialog>>()
const planList = ref<Plan[]>([])
const listColumnDefs = [
@@ -436,6 +473,7 @@ async function handlePlanMutationSuccess() {
const selectedPlan = computed(() => (selectedRows.value.length === 1 ? selectedRows.value[0] : null))
const dateRange = ref<string[]>([])
const quickSearch = ref('')
const activePlanTypeTab = ref<PlPlanTypeTab>('all')
const searchForm = reactive({
planNo: '',
@@ -510,7 +548,14 @@ function handleSearch() {
fetchData()
}
function handlePlanTypeTabChange(tab: PlPlanTypeTab) {
searchForm.planType = plPlanTypeTabToFilter(tab)
pagination.page = 1
fetchData()
}
function handleReset() {
activePlanTypeTab.value = 'all'
searchForm.planNo = ''
searchForm.planType = ''
searchForm.followStatus = ''
@@ -659,11 +704,29 @@ function handlePrintInboundSlip(row: Plan) {
inboundSlipPrintRef.value?.open(row.id)
}
function handlePrintDeliverySlip(row: Plan) {
deliverySlipPrintRef.value?.open(row.id)
}
function handlePrintSubpackSlip(row: Plan) {
subpackSlipPrintRef.value?.open(row.id)
}
function handleToolbarPrintInboundSlip() {
if (selectedRows.value.length !== 1) return
handlePrintInboundSlip(selectedRows.value[0])
}
function handleToolbarPrintDeliverySlip() {
if (selectedRows.value.length !== 1) return
handlePrintDeliverySlip(selectedRows.value[0])
}
function handleToolbarPrintSubpackSlip() {
if (selectedRows.value.length !== 1) return
handlePrintSubpackSlip(selectedRows.value[0])
}
function handleToolbarEdit() {
if (selectedRows.value.length !== 1) return
handleEdit(selectedRows.value[0])