1、调整合同
2、调整项目 3、调整付款管理
This commit is contained in:
@@ -1056,6 +1056,7 @@ export default {
|
||||
id: row.id || undefined,
|
||||
feeType: row.feeType || '',
|
||||
feeItem: row.feeItem,
|
||||
originalAmount: Number(row.originalAmount || 0),
|
||||
adjustAmount: Number(row.adjustAmount || 0),
|
||||
remark: row.remark,
|
||||
manualFlag: row.manualFlag || 0,
|
||||
|
||||
@@ -141,7 +141,17 @@
|
||||
</section-card>
|
||||
|
||||
<section-card title="附件材料">
|
||||
<el-table :data="attachments" border>
|
||||
<div class="settlement-adjustment-editor__attachment-actions">
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="!attachments.length"
|
||||
@click="batchDownloadAttachments"
|
||||
>
|
||||
批量下载
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="attachments" border @selection-change="selectedAttachments = $event">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column type="index" label="序号" width="64" align="center" />
|
||||
<el-table-column label="文件名" min-width="220" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
@@ -264,6 +274,7 @@ export default {
|
||||
fields: settlementAdjustmentFormFields,
|
||||
details: [],
|
||||
attachments: [],
|
||||
selectedAttachments: [],
|
||||
attachmentFileTypes: [
|
||||
'pdf',
|
||||
'bmp',
|
||||
@@ -320,6 +331,7 @@ export default {
|
||||
this.form = createSettlementAdjustmentForm();
|
||||
this.details = [];
|
||||
this.attachments = [];
|
||||
this.selectedAttachments = [];
|
||||
this.candidates = [];
|
||||
this.feeRows = [];
|
||||
if (!this.recordId) {
|
||||
@@ -347,6 +359,22 @@ export default {
|
||||
this.candidates = data?.data || data || [];
|
||||
},
|
||||
async handleFormalChange(id) {
|
||||
if (!id) {
|
||||
Object.assign(this.form, {
|
||||
formalSettlementId: null,
|
||||
formalSettlementNo: '',
|
||||
settlementType: '',
|
||||
projectName: '',
|
||||
deptName: '',
|
||||
customerName: '',
|
||||
contractNo: '',
|
||||
contractName: '',
|
||||
originalSettlementAmount: 0,
|
||||
});
|
||||
this.details = [];
|
||||
this.recalculate();
|
||||
return;
|
||||
}
|
||||
const item = this.candidates.find(row => String(row.id) === String(id));
|
||||
if (!item) return;
|
||||
const { id: formalSettlementId, ...formalSettlement } = item;
|
||||
@@ -358,6 +386,21 @@ export default {
|
||||
});
|
||||
this.details = [];
|
||||
this.recalculate();
|
||||
this.loading = true;
|
||||
try {
|
||||
const { data } = await api.getFormalDetails(formalSettlementId);
|
||||
if (String(this.form.formalSettlementId) !== String(formalSettlementId)) return;
|
||||
this.details = (data?.data || data || []).map(fee => ({
|
||||
...fee,
|
||||
originalAmountTax: Number(fee.originalAmountTax || 0),
|
||||
adjustmentAmountTax: 0,
|
||||
adjustmentAmountNoTax: null,
|
||||
remark: '',
|
||||
}));
|
||||
this.recalculate();
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
async openFeeDialog() {
|
||||
const { data } = await api.getFormalDetails(this.form.formalSettlementId);
|
||||
@@ -432,6 +475,7 @@ export default {
|
||||
uploadUserName: file.uploadUserName || uploadUserName,
|
||||
uploadTime: file.uploadTime || uploadTime,
|
||||
}));
|
||||
this.selectedAttachments = [];
|
||||
},
|
||||
parseAttachments(value) {
|
||||
if (!value) return [];
|
||||
@@ -467,8 +511,22 @@ export default {
|
||||
}
|
||||
downloadFileByUrl(url, this.attachmentName(file));
|
||||
},
|
||||
batchDownloadAttachments() {
|
||||
const files = this.selectedAttachments.length ? this.selectedAttachments : this.attachments;
|
||||
const downloadableFiles = files.filter(file => this.attachmentUrl(file));
|
||||
if (!downloadableFiles.length) {
|
||||
this.$message.warning(
|
||||
this.selectedAttachments.length ? '所选附件暂无可下载地址' : '暂无可下载附件'
|
||||
);
|
||||
return;
|
||||
}
|
||||
downloadableFiles.forEach((file, index) => {
|
||||
window.setTimeout(() => this.downloadAttachment(file), index * 200);
|
||||
});
|
||||
},
|
||||
removeAttachment(index) {
|
||||
this.attachments.splice(index, 1);
|
||||
const [removed] = this.attachments.splice(index, 1);
|
||||
this.selectedAttachments = this.selectedAttachments.filter(file => file !== removed);
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -484,6 +542,11 @@ export default {
|
||||
padding: 12px 0;
|
||||
text-align: right;
|
||||
}
|
||||
.settlement-adjustment-editor__attachment-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.settlement-adjustment-editor__attachment-upload {
|
||||
padding-top: 12px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user