✨ 结算付款体验优化与合同/运单导入校验
付款申请汇票筛选与提示去重、结算菜单拆分与金蝶同步弹框、应收应付详情高度、合同计费与半月结调整,以及导入运单批量删除校验。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user