refactor(04): show total price checkbox
This commit is contained in:
parent
cc2e49f735
commit
5a3ae092c8
3 changed files with 15 additions and 3 deletions
|
|
@ -28,7 +28,7 @@ function addWork() {
|
|||
workItems.value.push({
|
||||
id: '',
|
||||
name: '',
|
||||
attributes: { additional: [] },
|
||||
attributes: { additional: [], showTotalPrice: false },
|
||||
product: [],
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -209,7 +209,18 @@ defineEmits<{
|
|||
class="q-py-xs text-weight-medium row justify-between items-center q-px-md"
|
||||
style="background-color: hsla(var(--info-bg) / 0.1)"
|
||||
>
|
||||
<span>{{ $t('productInWork') }} {{ workIndex + 1 }}</span>
|
||||
<span>
|
||||
{{ $t('productInWork') }} {{ workIndex + 1 }}
|
||||
|
||||
<q-checkbox
|
||||
size="xs"
|
||||
class="q-pl-lg"
|
||||
v-model="attributes.showTotalPrice"
|
||||
:label="$t('service.showTotalPrice')"
|
||||
style="color: hsl(var(--text-mute-2))"
|
||||
:disable="readonly"
|
||||
/>
|
||||
</span>
|
||||
<q-btn
|
||||
v-if="!readonly"
|
||||
id="btn-add-work-product"
|
||||
|
|
@ -271,7 +282,7 @@ defineEmits<{
|
|||
<div class="row no-wrap">
|
||||
<div class="bordered q-mx-md col-3 image-box">
|
||||
<q-img
|
||||
:src="`${baseUrl}/product/${product?.id}/image?ts=${Date.now()}`"
|
||||
:src="`${baseUrl}/product/${product?.id}/image`"
|
||||
style="object-fit: cover; width: 100%; height: 100%"
|
||||
>
|
||||
<template #error>
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ export interface ServiceCreate {
|
|||
}
|
||||
|
||||
export interface Attributes {
|
||||
showTotalPrice?: boolean;
|
||||
additional: (PropString | PropNumber | PropDate | PropOptions)[];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue