⚡ 优化区划国家入口、计划-1展示、路线地图点选与对账导出

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-27 23:16:18 +08:00
parent f3a33b1a04
commit b92625528c
7 changed files with 275 additions and 337 deletions
+18 -116
View File
@@ -588,7 +588,12 @@
label="运单号"
min-width="150"
><template #default="{ row }"
><el-link type="primary">{{ row.waybillNo || '-' }}</el-link></template
><el-link
v-if="row.waybillNo"
type="primary"
@click="openWaybillDetail(row)"
>{{ row.waybillNo }}</el-link
><span v-else>-</span></template
></el-table-column
><el-table-column label="配载单号" min-width="150"
><template #default>{{ dialogForm.loadingNo || '-' }}</template></el-table-column
@@ -1522,10 +1527,11 @@
</div>
<div class="loading-route-change-dialog__address-row">
<el-input
v-model="row.departureAddress"
placeholder="请选择或输入地址"
:model-value="row.departureAddress"
readonly
placeholder="请点击地图选点"
:disabled="isWaybillCompleted(row)"
@input="updateRouteChangeNodes"
@click="openRouteChangeMapDialog(row, 'departure')"
><template v-if="!isWaybillCompleted(row)" #suffix
><el-icon
class="loading-route-change-dialog__location"
@@ -1533,13 +1539,6 @@
><Location /></el-icon
></template>
</el-input>
<el-link
v-if="!isWaybillCompleted(row)"
type="primary"
:underline="false"
@click="openCommonAddressDialog(row, 'departure')"
>常用</el-link
>
</div></template
></el-table-column>
<el-table-column label="到货地" min-width="360"
@@ -1549,10 +1548,11 @@
</div>
<div class="loading-route-change-dialog__address-row">
<el-input
v-model="row.arrivalAddress"
placeholder="请选择或输入地址"
:model-value="row.arrivalAddress"
readonly
placeholder="请点击地图选点"
:disabled="isWaybillCompleted(row)"
@input="updateRouteChangeNodes"
@click="openRouteChangeMapDialog(row, 'arrival')"
><template v-if="!isWaybillCompleted(row)" #suffix
><el-icon
class="loading-route-change-dialog__location"
@@ -1560,13 +1560,6 @@
><Location /></el-icon
></template>
</el-input>
<el-link
v-if="!isWaybillCompleted(row)"
type="primary"
:underline="false"
@click="openCommonAddressDialog(row, 'arrival')"
>常用</el-link
>
</div></template
></el-table-column>
</el-table>
@@ -1642,48 +1635,6 @@
></template
>
</el-dialog>
<el-dialog
v-model="commonAddressVisible"
title="选择常用地址"
append-to-body
width="900px"
class="loading-common-address-dialog"
>
<div class="loading-common-address-dialog__toolbar">
<el-input
v-model="commonAddressQuery.addressName"
clearable
placeholder="请输入地址名称"
@keyup.enter="loadCommonAddresses"
/><el-button type="primary" @click="loadCommonAddresses">查询</el-button>
</div>
<el-table
v-loading="commonAddressLoading"
:data="commonAddressRows"
border
@row-dblclick="selectCommonAddress"
><el-table-column prop="addressName" label="地址名称" min-width="180" /><el-table-column
prop="regionName"
label="区域"
min-width="180"
/><el-table-column prop="detailAddress" label="详细地址" min-width="260" /><el-table-column
label="操作"
width="90"
><template #default="{ row }"
><el-link type="primary" @click="selectCommonAddress(row)">选择</el-link></template
></el-table-column
></el-table
>
<template #footer
><el-pagination
v-model:current-page="commonAddressPage.currentPage"
v-model:page-size="commonAddressPage.pageSize"
layout="total, prev, pager, next"
:total="commonAddressPage.total"
@current-change="loadCommonAddresses"
/><el-button @click="commonAddressVisible = false">关闭</el-button></template
>
</el-dialog>
<el-dialog
v-model="routeChangeMapVisible"
title="地图选择地址"
@@ -1765,7 +1716,6 @@ import {
getVoucherImages as getProcessConfigVoucherImages,
} from '@/api/business/process-config';
import VoucherExecutionDetail from './components/voucher-execution-detail.vue';
import { getList as getCommonAddressList } from '@/api/base/common-address';
import {
carrierTypeOptions,
loadingManageConfig,
@@ -2062,12 +2012,6 @@ export default {
routeChangeDragIndex: -1,
routeChangeOriginalAddresses: [],
routeChangeOrderDirty: false,
commonAddressVisible: false,
commonAddressLoading: false,
commonAddressRows: [],
commonAddressQuery: { addressName: '' },
commonAddressPage: { currentPage: 1, pageSize: 10, total: 0 },
commonAddressTarget: null,
routeChangeMapVisible: false,
routeChangeMapLoading: false,
routeChangeMapKeyword: '',
@@ -2630,7 +2574,10 @@ export default {
ElMessage.info('当前子运单暂无详情数据');
return;
}
this.$router.push({ path: '/business/waybill-manage/detail', query: { id } });
this.$router.push({
path: '/business/waybill-manage/detail',
query: { id, name: '运单详情' },
});
},
formatRouteAddress(row, type) {
const prefix =
@@ -3014,7 +2961,6 @@ export default {
// 离开本页(标签缓存/卸载)时收起页内子弹窗,避免 append-to-body 的弹窗 DOM 残留在 body 上
closeInnerDialogs() {
this.routeChangeVisible = false;
this.commonAddressVisible = false;
this.routeChangeMapVisible = false;
this.candidateSearchVisible = false;
},
@@ -3371,14 +3317,6 @@ export default {
return { ...node, locked };
});
},
openCommonAddressDialog(row, field) {
if (this.isWaybillCompleted(row)) return;
this.commonAddressTarget = { row, field };
this.commonAddressQuery = { addressName: '' };
this.commonAddressPage.currentPage = 1;
this.commonAddressVisible = true;
this.loadCommonAddresses();
},
openRouteChangeMapDialog(row, field) {
if (this.isWaybillCompleted(row)) return;
this.routeChangeMapTarget = { row, field };
@@ -3541,34 +3479,6 @@ export default {
this.updateRouteChangeNodes();
this.routeChangeMapVisible = false;
},
async loadCommonAddresses() {
this.commonAddressLoading = true;
try {
const page = unwrapPage(
await getCommonAddressList(
this.commonAddressPage.currentPage,
this.commonAddressPage.pageSize,
{ ...this.commonAddressQuery, allDept: 0 }
)
);
this.commonAddressRows = page.records;
this.commonAddressPage.total = page.total;
} finally {
this.commonAddressLoading = false;
}
},
selectCommonAddress(address) {
const target = this.commonAddressTarget;
if (!target) return;
target.row[`${target.field}Address`] =
[address.regionName, address.detailAddress || address.addressName]
.filter(Boolean)
.join('') ||
address.addressName ||
'';
this.updateRouteChangeNodes();
this.commonAddressVisible = false;
},
async confirmRouteChange() {
const changeRows = this.routeChangeRows.filter(
row =>
@@ -5167,14 +5077,6 @@ export default {
color: #606266;
}
}
.loading-common-address-dialog__toolbar {
display: flex;
gap: 8px;
margin-bottom: 12px;
}
.loading-common-address-dialog__toolbar .el-input {
flex: 1;
}
:global(.loading-manage-form-page) {
width: 100%;
min-height: 100%;