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