Merge pull request '项目+合同对接合同系统' (#8) from feature/hcs-api-p0-web into master

Reviewed-on: #8
This commit was merged in pull request #8.
This commit is contained in:
2026-10-27 14:47:14 +08:00
26 changed files with 1304 additions and 55 deletions
+27 -12
View File
@@ -140,6 +140,7 @@ export default {
rows: [],
selection: [],
loading: false,
approveLoading: false,
syncLoading: false,
page: { currentPage: 1, pageSize: 10, pageSizes: [10, 20, 50, 100], total: 0 },
editor: { visible: false, id: null, readonly: false },
@@ -371,19 +372,33 @@ export default {
});
},
async handleApprove(row) {
await this.$confirm(
`审核通过后${this.billLabel}生效,金额只能通过结算调整单处理,确认通过?`,
'提示',
{ type: 'warning' }
);
const res = await api.approve({ id: row.id });
// data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因
if (res.data.data === false) {
this.$message.warning(res.data.msg);
} else {
this.$message.success(res.data.msg || '审批通过');
// 防止重复点击:请求进行中忽略后续点击,避免重复审批和重复提示
if (this.approveLoading) return;
this.approveLoading = true;
let loading = null;
try {
await this.$confirm(
`审核通过后${this.billLabel}生效,金额只能通过结算调整单处理,确认通过?`,
'提示',
{ type: 'warning' }
);
loading = this.$loading({
lock: true,
text: '审批处理中,请稍候…',
background: 'rgba(255, 255, 255, 0.6)',
});
const res = await api.approve({ id: row.id });
// data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因
if (res.data.data === false) {
this.$message.warning(res.data.msg);
} else {
this.$message.success(res.data.msg || '审批通过');
}
this.onLoad(this.page);
} finally {
loading?.close();
this.approveLoading = false;
}
this.onLoad(this.page);
},
async handleReturn(row) {
const { value } = await this.$prompt('请输入驳回原因', '审批驳回', {
+19 -4
View File
@@ -334,6 +334,7 @@ export default {
ArrowDown,
ArrowUp,
loading: false,
approveLoading: false,
query: emptyQuery(),
searchFields: preSettlementSearchFields,
searchExpanded: false,
@@ -691,10 +692,24 @@ export default {
});
},
async handleApprove(row) {
await this.$confirm('确认审批通过该预付结算单?', '提示', { type: 'warning' });
await approve({ id: row.id });
this.$message.success('审批通过');
this.loadTable();
// 防止重复点击:请求进行中忽略后续点击,避免重复审批和重复提示
if (this.approveLoading) return;
this.approveLoading = true;
let loading = null;
try {
await this.$confirm('确认审批通过该预付结算单?', '提示', { type: 'warning' });
loading = this.$loading({
lock: true,
text: '审批处理中,请稍候…',
background: 'rgba(255, 255, 255, 0.6)',
});
await approve({ id: row.id });
this.$message.success('审批通过');
this.loadTable();
} finally {
loading?.close();
this.approveLoading = false;
}
},
async handleReturn(row) {
const { value } = await this.$prompt('请输入驳回原因', '审批驳回', {