refactor: add params for debit note
This commit is contained in:
parent
c6b6f402a2
commit
790c45e532
4 changed files with 9 additions and 1 deletions
|
|
@ -32,6 +32,9 @@ const quotationId = defineModel<string>('quotationId', {
|
||||||
class="col"
|
class="col"
|
||||||
v-model:value="quotationId"
|
v-model:value="quotationId"
|
||||||
:label="$t('general.select', { msg: $t('quotation.title') })"
|
:label="$t('general.select', { msg: $t('quotation.title') })"
|
||||||
|
:params="{
|
||||||
|
hasCancel: true,
|
||||||
|
}"
|
||||||
/>
|
/>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,9 @@ const quotationId = defineModel<string>('quotationId', {
|
||||||
class="col"
|
class="col"
|
||||||
v-model:value="quotationId"
|
v-model:value="quotationId"
|
||||||
:label="$t('general.select', { msg: $t('quotation.title') })"
|
:label="$t('general.select', { msg: $t('quotation.title') })"
|
||||||
|
:params="{
|
||||||
|
forDebitNote: true,
|
||||||
|
}"
|
||||||
/>
|
/>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,6 @@ const { getOptions, setFirstValue, getSelectedOption, filter } =
|
||||||
query,
|
query,
|
||||||
...props.params,
|
...props.params,
|
||||||
pageSize: 30,
|
pageSize: 30,
|
||||||
hasCancel: true,
|
|
||||||
includeRegisteredBranch: true,
|
includeRegisteredBranch: true,
|
||||||
});
|
});
|
||||||
if (ret) return ret.result;
|
if (ret) return ret.result;
|
||||||
|
|
@ -151,6 +150,7 @@ function setDefaultValue() {
|
||||||
class="surface-3 q-ml-sm"
|
class="surface-3 q-ml-sm"
|
||||||
rounded
|
rounded
|
||||||
style="color: var(--foreground)"
|
style="color: var(--foreground)"
|
||||||
|
v-if="props.params?.hasCancel"
|
||||||
>
|
>
|
||||||
{{ scope.opt._count.canceledWork || 0 }}
|
{{ scope.opt._count.canceledWork || 0 }}
|
||||||
</q-badge>
|
</q-badge>
|
||||||
|
|
@ -191,6 +191,7 @@ function setDefaultValue() {
|
||||||
class="surface-3 q-ml-xs"
|
class="surface-3 q-ml-xs"
|
||||||
rounded
|
rounded
|
||||||
style="color: var(--foreground)"
|
style="color: var(--foreground)"
|
||||||
|
v-if="props.params?.hasCancel"
|
||||||
>
|
>
|
||||||
{{ scope.opt._count.canceledWork || 0 }}
|
{{ scope.opt._count.canceledWork || 0 }}
|
||||||
</q-badge>
|
</q-badge>
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@ export const useQuotationStore = defineStore('quotation-store', () => {
|
||||||
query?: string;
|
query?: string;
|
||||||
hasCancel?: boolean;
|
hasCancel?: boolean;
|
||||||
includeRegisteredBranch?: boolean;
|
includeRegisteredBranch?: boolean;
|
||||||
|
forDebitNote?: boolean;
|
||||||
}) {
|
}) {
|
||||||
const res = await api.get<PaginationResult<Quotation>>('/quotation', {
|
const res = await api.get<PaginationResult<Quotation>>('/quotation', {
|
||||||
params,
|
params,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue