✨ 结算付款体验优化与合同/运单导入校验

付款申请汇票筛选与提示去重、结算菜单拆分与金蝶同步弹框、应收应付详情高度、合同计费与半月结调整,以及导入运单批量删除校验。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-18 05:12:26 +08:00
parent 8db52ef168
commit 6f2383a7e5
36 changed files with 1387 additions and 495 deletions
@@ -5897,7 +5897,7 @@ export default {
'固定金额(整单一口价)': ['固定一口价'],
按数量: ['固定单价', '区间单价', '阶梯单价', '区间阶梯一口价'],
},
settlementTypeOptions: ['月结', '日结', '周结', '半月结', '固定天数周期结算'],
settlementTypeOptions: ['月结', '日结', '周结', '固定天数周期结算'],
billCycleTypeOptions: ['固定截单日', '自然月', '自定义多周期'],
reconciliationModeOptions: ['明细逐行核对', '按账单汇总核对', '跳过自动核对'],
packageOptions,
@@ -1266,9 +1266,27 @@ const fillEditForm = async row => {
if (carrierValue) carrierChange(carrierValue);
await loadBatchRows(snapshot.id);
};
const removeBatches = () =>
api.removeImportBatches(selected.value.map(item => item.id).join(',')).then(loadBatches);
const removeBatch = row => api.removeImportBatches(row.id).then(loadBatches);
/** 与行操作一致:仅草稿可删除 */
const canRemoveBatch = row => String(row?.importStatus || '') === 'draft';
const removeBatches = () => {
if (!selected.value.length) {
ElMessage.warning('请选择至少一条数据');
return;
}
// 选中含不可删条目时整批拦截(含已完成/进行中),不静默跳过
if (selected.value.some(row => !canRemoveBatch(row))) {
ElMessage.warning('已完成运单不可删除');
return;
}
return api.removeImportBatches(selected.value.map(item => item.id).join(',')).then(loadBatches);
};
const removeBatch = row => {
if (!canRemoveBatch(row)) {
ElMessage.warning('已完成运单不可删除');
return;
}
return api.removeImportBatches(row.id).then(loadBatches);
};
const projectChange = async id => {
const requestId = ++projectRequestId;
const item = projects.value.find(row => String(row.id) === String(id));