:feat: 项目立项审批通过展示HCS推送失败原因并增加遮罩
This commit is contained in:
@@ -68,8 +68,13 @@
|
||||
</template>
|
||||
|
||||
<template #hcsSyncStatus="{ row }">
|
||||
<el-tooltip v-if="row.hcsSyncMsg" placement="top" :content="row.hcsSyncMsg">
|
||||
<el-tag :type="hcsSyncTagType(row.hcsSyncStatus)" class="status-text">
|
||||
{{ hcsSyncLabel(row.hcsSyncStatus) }}
|
||||
</el-tag>
|
||||
</el-tooltip>
|
||||
<el-tag
|
||||
v-if="row.hcsSyncStatus"
|
||||
v-else-if="row.hcsSyncStatus"
|
||||
:type="hcsSyncTagType(row.hcsSyncStatus)"
|
||||
class="status-text"
|
||||
>
|
||||
@@ -1857,14 +1862,31 @@ export default {
|
||||
approvalStatus: row.approvalStatus || '',
|
||||
}).then(() => request())
|
||||
: request();
|
||||
afterMk.then(res => {
|
||||
if (res.data?.success === false || res.data?.data === false) {
|
||||
this.$message.error(res.data?.msg || `${operation.label}失败,请联系管理员`);
|
||||
return;
|
||||
}
|
||||
this.$message.success(`${operation.label}成功`);
|
||||
this.onLoad(this.page, this.query);
|
||||
});
|
||||
// 项目通过会同步等待合规推送,加遮罩防重复点击
|
||||
const loading =
|
||||
operation.action === 'approve'
|
||||
? this.$loading({
|
||||
lock: true,
|
||||
text: '正在推送合规,请稍候…',
|
||||
background: 'rgba(255, 255, 255, 0.6)',
|
||||
})
|
||||
: null;
|
||||
afterMk
|
||||
.then(res => {
|
||||
// data=false 表示审批已通过但合规推送失败,msg 带具体原因(照正式结算单审批)
|
||||
if (operation.action === 'approve' && res.data?.data === false) {
|
||||
this.$message.warning(res.data?.msg);
|
||||
this.onLoad(this.page, this.query);
|
||||
return;
|
||||
}
|
||||
if (res.data?.success === false) {
|
||||
this.$message.error(res.data?.msg || `${operation.label}失败,请联系管理员`);
|
||||
return;
|
||||
}
|
||||
this.$message.success(`${operation.label}成功`);
|
||||
this.onLoad(this.page, this.query);
|
||||
})
|
||||
.finally(() => loading && loading.close());
|
||||
};
|
||||
if (operation.prompt) {
|
||||
this.$prompt(operation.prompt, operation.label, {
|
||||
|
||||
Reference in New Issue
Block a user