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