feat: by ค่า
This commit is contained in:
parent
2a684790d2
commit
9c515d10cc
3 changed files with 153 additions and 75 deletions
|
|
@ -2,6 +2,8 @@
|
|||
import { Icon } from '@iconify/vue';
|
||||
import { formatNumberDecimal } from 'src/stores/utils';
|
||||
|
||||
import { ProductList } from 'src/stores/product-service/types';
|
||||
|
||||
defineProps<{
|
||||
workIndex: number;
|
||||
length: number;
|
||||
|
|
@ -9,16 +11,20 @@ defineProps<{
|
|||
}>();
|
||||
|
||||
const workName = defineModel<string>('workName');
|
||||
const productItems = defineModel<
|
||||
const productItems = defineModel<(ProductList & { nameEn: string })[]>(
|
||||
'productItems',
|
||||
{
|
||||
id: string;
|
||||
label: string;
|
||||
labelEn: string;
|
||||
code: string;
|
||||
price: number;
|
||||
time: string;
|
||||
}[]
|
||||
>('productItems', { required: true });
|
||||
required: true,
|
||||
},
|
||||
);
|
||||
|
||||
const testName = [
|
||||
'ทดสอบการขาย 1',
|
||||
'ทดสอบการขาย 2',
|
||||
'ทดสอบการขาย 3',
|
||||
'ทดสอบการขาย 4',
|
||||
'ทดสอบการขาย 5',
|
||||
];
|
||||
|
||||
defineEmits<{
|
||||
(e: 'moveWorkUp'): void;
|
||||
|
|
@ -87,7 +93,9 @@ defineEmits<{
|
|||
</q-btn>
|
||||
<span class="text-body2 q-pl-sm" style="color: var(--foreground)">
|
||||
{{ $t('workNo') }} {{ index + 1 }} :
|
||||
<span class="app-text-muted-2">{{ $t('workName') }}</span>
|
||||
<span class="app-text-muted-2">
|
||||
{{ $t('workName') + ' ' + workName }}
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<q-menu fit anchor="bottom left" self="top left">
|
||||
|
|
@ -109,7 +117,12 @@ defineEmits<{
|
|||
</q-btn>
|
||||
</div>
|
||||
</q-item>
|
||||
<q-item clickable>
|
||||
<q-item
|
||||
@click="workName = item"
|
||||
clickable
|
||||
v-for="item in testName"
|
||||
:key="item"
|
||||
>
|
||||
<div class="full-width flex items-center">
|
||||
<q-icon
|
||||
v-if="false"
|
||||
|
|
@ -125,7 +138,7 @@ defineEmits<{
|
|||
style="color: hsl(var(--text-mute))"
|
||||
class="q-mr-sm"
|
||||
/>
|
||||
{{ 'asd' }}
|
||||
{{ item }}
|
||||
</div>
|
||||
</q-item>
|
||||
</q-menu>
|
||||
|
|
@ -214,15 +227,13 @@ defineEmits<{
|
|||
:style="`max-width: ${$q.screen.gt.sm ? '25vw' : '20vw'}`"
|
||||
>
|
||||
{{
|
||||
$i18n.locale === 'en-US'
|
||||
? product.labelEn
|
||||
: product.label
|
||||
$i18n.locale === 'en-US' ? product.nameEn : product.name
|
||||
}}
|
||||
<q-tooltip>
|
||||
{{
|
||||
$i18n.locale === 'en-US'
|
||||
? product.labelEn
|
||||
: product.label
|
||||
? product.nameEn
|
||||
: product.name
|
||||
}}
|
||||
</q-tooltip>
|
||||
</span>
|
||||
|
|
@ -247,7 +258,7 @@ defineEmits<{
|
|||
{{ $t('processTime') }}
|
||||
</span>
|
||||
<span class="col-3 text-caption app-text-muted-2">
|
||||
{{ product.time }} {{ $t('day') }}
|
||||
{{ product.process }} {{ $t('day') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue