update workflow
This commit is contained in:
parent
1eead8c579
commit
6bc00f9064
3 changed files with 13 additions and 6 deletions
|
|
@ -16,7 +16,7 @@ const { dialogConfirm, showLoader, hideLoader, messageError } =
|
|||
useCounterMixin();
|
||||
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
const { stateId, fetchData } = defineProps({
|
||||
const props = defineProps({
|
||||
stateId: { type: String, require: true },
|
||||
fetchData: { type: Function, require: true },
|
||||
});
|
||||
|
|
@ -91,14 +91,14 @@ function onSubmit() {
|
|||
showLoader();
|
||||
await http
|
||||
.post(config.API.workflow + `add-step`, {
|
||||
stateId: stateId,
|
||||
stateId: props.stateId,
|
||||
profileId: selected.value[0].id,
|
||||
isAcceptSetting: isAcceptSetting.value,
|
||||
isApproveSetting: isApproveSetting.value,
|
||||
isReasonSetting: isReasonSetting.value,
|
||||
})
|
||||
.then(async () => {
|
||||
await fetchData?.();
|
||||
await props.fetchData?.();
|
||||
onCloseModal();
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,10 @@ async function fetchCheckState() {
|
|||
await fetchData();
|
||||
const data = await res.data.result;
|
||||
stateId.value = data.stateId;
|
||||
state.value = data.stateNo === 4 ? 5 : data.stateNo;
|
||||
state.value =
|
||||
data.stateNo === itemState.value.length
|
||||
? data.stateNo + 1
|
||||
: data.stateNo;
|
||||
permission.value = {
|
||||
isChangeState: data.can_change_state,
|
||||
isOperate: data.can_operate,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue