🐛 配载候选列表不再按运输方式过滤并订正可配载注释

This commit is contained in:
2026-10-18 15:49:38 +08:00
parent 847f09b14d
commit f7d8fbf16b
3 changed files with 9 additions and 34 deletions
+1 -1
View File
@@ -622,7 +622,7 @@
background: #fff;
}
// 合同管理新增/编辑弹窗(business-crud-page 封装 → avue-crud,弹窗带 avue-crud__dialog class)
// 合同管理新增/编辑弹窗(avue-crud,弹窗带 avue-crud__dialog class)
// 复刻 waybill-manage 方案:接近全屏、压过库内置 .avue-dialog 的 calc(100% - 200px),
// 并解开 body 的 200px 上限、抵消全局 footer 的 -30px 上移
.contract-manage-dialog.el-dialog {
@@ -10403,7 +10403,7 @@ export default {
this.$message.warning('请选择至少一条数据');
return;
}
// 可配载与否只看后端查询结果,前端不自行判状态与配载字段
// 可配载与否只看后端查询结果
let loadableIds;
try {
const res = await getWaybillList(1, selectedIds.length, {
@@ -10419,9 +10419,9 @@ export default {
if (rejectedRows.length) {
const rejectedText = rejectedRows
.map(row => {
const reason = this.roadLoadingRejectReason(row);
const reason = this.roadLoadingRejectReasonText(row);
const no = row.waybillNo || row.id || '';
return reason ? `${no}(${reason})` : `${no}`;
return `${no}(${reason})`;
})
.join('、');
this.$message.warning(`${rejectedText};公路配载仅支持公路、待执行且未配载的运单`);
@@ -10447,12 +10447,12 @@ export default {
},
});
},
// 仅用于给被后端判定为不可配载的运单配一句可读原因,不改判据
roadLoadingRejectReason(row = {}) {
// 只给后端判定为不可配载的运单生成可读原因,本身不参与准入判定
roadLoadingRejectReasonText(row = {}) {
if (!this.waybillIsRoadTransport(row)) return '非公路运输';
if (String(row.businessStatus || '') !== 'pending') return '状态不是待执行';
if (row.loadingNo) return '已关联配载单';
return '';
return '运单数据可能已变化,请刷新后重试';
},
},
};
+2 -27
View File
@@ -1074,25 +1074,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="运输方式">
<el-select
v-model="candidateQuery.transportType"
clearable
filterable
placeholder="请选择"
:disabled="dialogMode === 'add'"
@visible-change="visible => visible && loadTransportTypeOptions()"
>
<el-option
v-for="item in transportTypeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</template>
<el-col
:span="candidateSearchVisible ? 24 : 6"
@@ -1848,7 +1829,6 @@ import { normalizeMapSearchResults, searchAmapPlaceText } from '@/utils/map-sear
import { parseRouteChangeContent } from '@/utils/route-change';
const defaultTransportType = '';
const defaultCandidateTransportType = '';
const AMAP_KEY = '653b7cf105ad7fb8ec9b2f5198ade315';
const AMAP_SECURITY_CODE = '5aab65c632e48ebae0d0e28f5b28e21a';
const loadingCreateWaybillsStorageKey = 'loading-manage-create-waybills';
@@ -1889,7 +1869,6 @@ const createCandidateSearchForm = () => ({
vehicleNo: '',
carrierName: '',
driverName: '',
transportType: defaultCandidateTransportType,
});
const createDialogForm = () => ({
@@ -3022,7 +3001,6 @@ export default {
this.dialogMode = mode;
this.dialogLoading = true;
this.resetDialogData();
if (mode === 'add') this.candidateQuery.transportType = 'road';
try {
if (row?.id) {
const res = await loadingApi.getDetail(row.id);
@@ -3046,7 +3024,6 @@ export default {
} else {
this.dialogForm = createDialogForm();
this.candidateQuery = createCandidateSearchForm();
this.candidateQuery.transportType = 'road';
await this.loadCandidateWaybills();
}
} finally {
@@ -3701,13 +3678,12 @@ export default {
try {
const query = {
...this.buildQueryParams(this.candidateQuery),
// 公路、待执行、未配载、非拒单的判定都在后端开关内,前端不再拼这些条件
// 公路、待执行、未配载的判定都在后端可配载开关内
// 该开关已把候选限定为公路,再按精确运输方式取值筛会漏掉「公路运输」这类历史写法
loadableOnly: 1,
// 仅查当前账户所属组织及子组织下的运单
allDept: 0,
};
// 可配载开关已按公路词表过滤,再带上新增模式筛选框的精确取值会漏掉「公路运输」这类历史写法
if (this.dialogMode === 'add') delete query.transportType;
const res = await getWaybillList(
this.candidatePage.currentPage,
this.candidatePage.pageSize,
@@ -3726,7 +3702,6 @@ export default {
},
handleCandidateReset() {
this.candidateQuery = createCandidateSearchForm();
if (this.dialogMode === 'add') this.candidateQuery.transportType = 'road';
this.candidatePage.currentPage = 1;
this.loadCandidateWaybills();
},