refactor: view doc only order
This commit is contained in:
parent
04e745bfe0
commit
835e8a7520
2 changed files with 8 additions and 18 deletions
|
|
@ -582,8 +582,8 @@ watch([currentFormData.value.taskStatus], () => {
|
||||||
fetchStatus();
|
fetchStatus();
|
||||||
});
|
});
|
||||||
|
|
||||||
function viewDocument(id: string) {
|
function viewDocument(id: string, routeName: 'order' | 'receive') {
|
||||||
window.open(`/task-order/${id}/doc-prouct-order`, '_blank');
|
window.open(`/task-order/${id}/doc-prouct-${routeName}`, '_blank');
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -928,7 +928,12 @@ function viewDocument(id: string) {
|
||||||
outlined
|
outlined
|
||||||
icon="mdi-play-box-outline"
|
icon="mdi-play-box-outline"
|
||||||
color="207 96% 32%"
|
color="207 96% 32%"
|
||||||
@click="viewDocument(currentFormData.id)"
|
@click="
|
||||||
|
viewDocument(
|
||||||
|
currentFormData.id,
|
||||||
|
view === TaskOrderStatus.Complete ? 'receive' : 'order',
|
||||||
|
)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
{{ $t('general.view', { msg: $t('general.example') }) }}
|
{{ $t('general.view', { msg: $t('general.example') }) }}
|
||||||
</MainButton>
|
</MainButton>
|
||||||
|
|
|
||||||
|
|
@ -337,10 +337,6 @@ onMounted(async () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function viewDocument(id: string) {
|
|
||||||
window.open(`/task-order/${id}/doc-prouct-receive`, '_blank');
|
|
||||||
}
|
|
||||||
|
|
||||||
watch([currentFormData.value.taskStatus], () => {
|
watch([currentFormData.value.taskStatus], () => {
|
||||||
fetchStatus();
|
fetchStatus();
|
||||||
});
|
});
|
||||||
|
|
@ -697,17 +693,6 @@ watch([currentFormData.value.taskStatus], () => {
|
||||||
class="surface-1 q-pa-md full-width"
|
class="surface-1 q-pa-md full-width"
|
||||||
>
|
>
|
||||||
<nav class="row justify-end">
|
<nav class="row justify-end">
|
||||||
<MainButton
|
|
||||||
class="q-mr-auto"
|
|
||||||
v-if="currentFormData.id"
|
|
||||||
outlined
|
|
||||||
icon="mdi-play-box-outline"
|
|
||||||
color="207 96% 32%"
|
|
||||||
@click="viewDocument(currentFormData.id)"
|
|
||||||
>
|
|
||||||
{{ $t('general.view', { msg: $t('general.example') }) }}
|
|
||||||
</MainButton>
|
|
||||||
|
|
||||||
<SaveButton
|
<SaveButton
|
||||||
:disabled="
|
:disabled="
|
||||||
!fullTaskOrder.taskList.every(
|
!fullTaskOrder.taskList.every(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue