refactor: add closeTab
This commit is contained in:
parent
8f069de610
commit
7a06bfe87e
1 changed files with 26 additions and 18 deletions
|
|
@ -46,6 +46,7 @@ import {
|
|||
EditButton,
|
||||
UndoButton,
|
||||
DeleteButton,
|
||||
CancelButton,
|
||||
} from 'components/button';
|
||||
import ProductServiceForm from './ProductServiceForm.vue';
|
||||
import QuotationFormInfo from './QuotationFormInfo.vue';
|
||||
|
|
@ -210,6 +211,10 @@ const productServiceList = ref<
|
|||
Required<QuotationPayload['productServiceList'][number]>[]
|
||||
>([]);
|
||||
|
||||
function closeTab() {
|
||||
window.close();
|
||||
}
|
||||
|
||||
async function assignToProductServiceList() {
|
||||
const ret = await productServiceStore.fetchProductGroup({
|
||||
page: 1,
|
||||
|
|
@ -873,24 +878,27 @@ async function searchEmployee(text: string) {
|
|||
<q-icon name="mdi-play-box-outline" size="xs" class="q-mr-xs" />
|
||||
{{ $t('general.view', { msg: $t('general.example') }) }}
|
||||
</q-btn>
|
||||
<SaveButton
|
||||
v-if="
|
||||
quotationFormState.mode === 'create' ||
|
||||
quotationFormState.mode === 'edit'
|
||||
"
|
||||
@click="
|
||||
() => {
|
||||
convertDataToFormSubmit();
|
||||
}
|
||||
"
|
||||
solid
|
||||
/>
|
||||
<EditButton
|
||||
v-else
|
||||
class="no-print"
|
||||
@click="quotationFormState.mode = 'edit'"
|
||||
solid
|
||||
/>
|
||||
<div class="row" style="gap: var(--size-2)">
|
||||
<CancelButton solid @click="closeTab()" />
|
||||
<SaveButton
|
||||
v-if="
|
||||
quotationFormState.mode === 'create' ||
|
||||
quotationFormState.mode === 'edit'
|
||||
"
|
||||
@click="
|
||||
() => {
|
||||
convertDataToFormSubmit();
|
||||
}
|
||||
"
|
||||
solid
|
||||
/>
|
||||
<EditButton
|
||||
v-else
|
||||
class="no-print"
|
||||
@click="quotationFormState.mode = 'edit'"
|
||||
solid
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue