调整预结算、正式结算
This commit is contained in:
@@ -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: '新增配载管理',
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user