调整预结算、正式结算

This commit is contained in:
2026-08-24 00:59:08 +08:00
parent 44e31fbd22
commit e1bade226f
13 changed files with 1009 additions and 360 deletions
@@ -5158,6 +5158,7 @@ const standaloneBusinessFormPaths = [
...Object.keys(standaloneBusinessFormRoutes),
...Object.values(standaloneBusinessFormRoutes),
];
const loadingCreateWaybillsStorageKey = 'loading-manage-create-waybills';
const attachmentViewerPlugins = [
imagePlugin(),
@@ -12779,28 +12780,41 @@ export default {
this.$message.warning('请选择至少一条数据');
return;
}
const nonRoadWaybills = this.selectionList.filter(row => {
const transportType = String(row.transportType || '').trim();
return transportType !== '公路运输' && transportType.toLowerCase() !== 'road';
});
const nonRoadWaybills = this.selectionList.filter(row => !this.waybillIsRoadTransport(row));
if (nonRoadWaybills.length) {
this.$message.warning('公路配仅支持运输方式为“公路运输”的运单');
this.$message.warning('公路配仅支持运输方式为“公路运输”的运单');
return;
}
if (typeof this.api.roadLoading !== 'function') {
this.$message.warning('公路配载功能暂未配置');
const unavailableWaybills = this.selectionList.filter(
row =>
this.statusValue(row) !== 'pending' ||
row.loadingId ||
row.loadingManageId ||
row.loadingNo
);
if (unavailableWaybills.length) {
this.$message.warning('公路配载仅支持进行中且未配载的运单');
return;
}
this.$confirm('确定对选中的运单进行公路配载?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => this.api.roadLoading(this.ids))
.then(() => {
this.$message.success('公路配载成功');
this.onLoad(this.page, this.query);
});
try {
sessionStorage.setItem(
loadingCreateWaybillsStorageKey,
JSON.stringify({
source: 'waybill-manage',
rows: this.selectionList,
})
);
} catch (error) {
this.$message.error('暂存待配载运单失败,请重试');
return;
}
this.$router.push({
path: '/business/loading-manage/form',
query: {
mode: 'add',
name: '新增配载管理',
},
});
},
},
};