Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: 二次确认弹层交互调整 -story=119817007 #1405

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,21 @@
v-model="formInfo.is_allow_skip">
{{$t(`m['节点处理人为空时,直接跳过且不视为异常']`) }}
</bk-checkbox>
<bk-checkbox
v-model="formInfo.enable_terminate_ticket_when_rejected"
:checked="formInfo.enable_terminate_ticket_when_rejected"
:true-value="true"
:false-value="false"
:before-change="handleTerminateRejectedChange">
{{$t(`m['审批节点最终结果为拒绝时,自动终止单据']`) }}
</bk-checkbox>
<bk-popconfirm
title="确认取消设置?"
content="取消后,当审批人拒绝后,单据继续往下执行,请谨慎操作!"
width="288"
trigger="click"
:disabled="!formInfo.enable_terminate_ticket_when_rejected"
@confirm="formInfo.enable_terminate_ticket_when_rejected = false">
<bk-checkbox
:value="formInfo.enable_terminate_ticket_when_rejected"
:true-value="true"
:false-value="false"
:before-change="handleTerminateRejectedChange">
{{$t(`m['审批节点最终结果为拒绝时,自动终止单据']`) }}
</bk-checkbox>
</bk-popconfirm>
</bk-form-item>
</bk-form>
<field-config
Expand Down Expand Up @@ -592,22 +599,13 @@
this.excludeProcessor = [...['EMPTY', 'API'], ...excludeProcessor];
},
handleTerminateRejectedChange() {
if (this.formInfo.enable_terminate_ticket_when_rejected) {
return new Promise((resolve) => {
this.$bkInfo({
title: '确认取消设置?',
subTitle: '取消后,当审批人拒绝后,单据继续往下执行,请谨慎操作!',
confirmFn: () => {
resolve(true);
},
cancelFn: () => {
resolve(false);
},
});
});
if (!this.formInfo.enable_terminate_ticket_when_rejected) {
setTimeout(() => {
this.formInfo.enable_terminate_ticket_when_rejected = true;
}, 100);
}

return true;
return false;
},
// 确认
async submitNode() {
Expand Down
Loading