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();
|
||||
});
|
||||
|
||||
function viewDocument(id: string) {
|
||||
window.open(`/task-order/${id}/doc-prouct-order`, '_blank');
|
||||
function viewDocument(id: string, routeName: 'order' | 'receive') {
|
||||
window.open(`/task-order/${id}/doc-prouct-${routeName}`, '_blank');
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
|
|
@ -928,7 +928,12 @@ function viewDocument(id: string) {
|
|||
outlined
|
||||
icon="mdi-play-box-outline"
|
||||
color="207 96% 32%"
|
||||
@click="viewDocument(currentFormData.id)"
|
||||
@click="
|
||||
viewDocument(
|
||||
currentFormData.id,
|
||||
view === TaskOrderStatus.Complete ? 'receive' : 'order',
|
||||
)
|
||||
"
|
||||
>
|
||||
{{ $t('general.view', { msg: $t('general.example') }) }}
|
||||
</MainButton>
|
||||
|
|
|
|||
|
|
@ -337,10 +337,6 @@ onMounted(async () => {
|
|||
}
|
||||
});
|
||||
|
||||
function viewDocument(id: string) {
|
||||
window.open(`/task-order/${id}/doc-prouct-receive`, '_blank');
|
||||
}
|
||||
|
||||
watch([currentFormData.value.taskStatus], () => {
|
||||
fetchStatus();
|
||||
});
|
||||
|
|
@ -697,17 +693,6 @@ watch([currentFormData.value.taskStatus], () => {
|
|||
class="surface-1 q-pa-md full-width"
|
||||
>
|
||||
<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
|
||||
:disabled="
|
||||
!fullTaskOrder.taskList.every(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue