refactor:set status dialog of quotation
This commit is contained in:
parent
1d73d8084e
commit
eb944bfafa
1 changed files with 14 additions and 12 deletions
|
|
@ -62,7 +62,10 @@ const flowStore = useFlowStore();
|
||||||
const userBranch = useMyBranch();
|
const userBranch = useMyBranch();
|
||||||
const ocrStore = useOcrStore();
|
const ocrStore = useOcrStore();
|
||||||
|
|
||||||
const { currentFormData: quotationFormData } = storeToRefs(quotationFormStore);
|
const {
|
||||||
|
currentFormData: quotationFormData,
|
||||||
|
currentFormState: quotationFormState,
|
||||||
|
} = storeToRefs(quotationFormStore);
|
||||||
const { state: customerFormState, currentFormData: customerFormData } =
|
const { state: customerFormState, currentFormData: customerFormData } =
|
||||||
storeToRefs(customerFormStore);
|
storeToRefs(customerFormStore);
|
||||||
const { currentMyBranch } = storeToRefs(userBranch);
|
const { currentMyBranch } = storeToRefs(userBranch);
|
||||||
|
|
@ -211,7 +214,7 @@ function triggerAddQuotationDialog() {
|
||||||
// TODO: form and state controll
|
// TODO: form and state controll
|
||||||
}
|
}
|
||||||
|
|
||||||
function triggerQuotationDialog() {
|
function triggerQuotationDialog(statusDialog: 'info' | 'edit' | 'create') {
|
||||||
const url = new URL('/quotation/add-quotation', window.location.origin);
|
const url = new URL('/quotation/add-quotation', window.location.origin);
|
||||||
url.searchParams.set('branchId', branchId.value);
|
url.searchParams.set('branchId', branchId.value);
|
||||||
url.searchParams.set(
|
url.searchParams.set(
|
||||||
|
|
@ -220,6 +223,7 @@ function triggerQuotationDialog() {
|
||||||
);
|
);
|
||||||
url.searchParams.set('agentPrice', agentPrice.value.toString());
|
url.searchParams.set('agentPrice', agentPrice.value.toString());
|
||||||
url.searchParams.set('special', special.value.toString());
|
url.searchParams.set('special', special.value.toString());
|
||||||
|
url.searchParams.set('statusDialog', statusDialog);
|
||||||
|
|
||||||
window.open(url.toString(), '_blank');
|
window.open(url.toString(), '_blank');
|
||||||
}
|
}
|
||||||
|
|
@ -345,7 +349,7 @@ watch(() => pageState.currentTab, fetchQuotationList);
|
||||||
size="sm"
|
size="sm"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
@click="triggerQuotationDialog"
|
@click="triggerQuotationDialog('create')"
|
||||||
:style="pageState.hideStat ? 'rotate: 90deg' : ''"
|
:style="pageState.hideStat ? 'rotate: 90deg' : ''"
|
||||||
style="transition: 0.1s ease-in-out"
|
style="transition: 0.1s ease-in-out"
|
||||||
/>
|
/>
|
||||||
|
|
@ -678,7 +682,12 @@ watch(() => pageState.currentTab, fetchQuotationList);
|
||||||
submit-icon="mdi-check"
|
submit-icon="mdi-check"
|
||||||
height="auto"
|
height="auto"
|
||||||
width="60vw"
|
width="60vw"
|
||||||
:submit="() => triggerQuotationDialog()"
|
:submit="
|
||||||
|
() => {
|
||||||
|
quotationFormState.mode = 'create';
|
||||||
|
triggerQuotationDialog('create');
|
||||||
|
}
|
||||||
|
"
|
||||||
:close="
|
:close="
|
||||||
() => {
|
() => {
|
||||||
branchId = '';
|
branchId = '';
|
||||||
|
|
@ -755,14 +764,7 @@ watch(() => pageState.currentTab, fetchQuotationList);
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<template #top>
|
<template #top>
|
||||||
<AddButton
|
<AddButton icon-only @click="() => {}" />
|
||||||
icon-only
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
triggerCreateEmployee();
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
<template #data="{ item }">
|
<template #data="{ item }">
|
||||||
<PersonCard
|
<PersonCard
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue