fix/mobileApproval (#1074)

Reviewed-on: daoyoucloud/tachybase#1074
Co-authored-by: wangjiahui <wwwjh0710@163.com>
Co-committed-by: wangjiahui <wwwjh0710@163.com>
This commit is contained in:
wangjiahui 2024-05-30 12:39:01 +08:00 committed by baizixv
parent f988b2ba30
commit 6522373a07

View File

@ -13,7 +13,6 @@ export function useSubmit() {
const form = useForm();
const { id } = useContextApprovalExecution();
const { status } = useContextApprovalAction();
const { setVisible, setSubmitted } = useActionContext() as any;
return {
run: async () => {
try {
@ -23,7 +22,6 @@ export function useSubmit() {
await form.submit();
field.data = field.data ?? {};
field.data.loading = true;
setVisible(false);
const res = await api.resource('approvalRecords').submit({
filterByTk: id,
values: { ...form.values, status },
@ -37,7 +35,6 @@ export function useSubmit() {
setTimeout(() => {
location.reload();
}, 1000);
setSubmitted(true);
} else {
Toast.show({
icon: 'fail',