feat: buy-sale page quatation form
This commit is contained in:
parent
0a10ac94fd
commit
686d88c8d4
5 changed files with 338 additions and 0 deletions
77
src/components/05_buy-sale/MainDialog.vue
Normal file
77
src/components/05_buy-sale/MainDialog.vue
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
<script lang="ts" setup>
|
||||
import AppBox from '../app/AppBox.vue';
|
||||
|
||||
defineProps<{
|
||||
width?: string;
|
||||
maxWidth?: string;
|
||||
close?: (...args: unknown[]) => void;
|
||||
}>();
|
||||
|
||||
const dialogState = defineModel('state', { default: true });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-dialog v-model="dialogState">
|
||||
<AppBox
|
||||
style="
|
||||
padding: 0;
|
||||
border-radius: var(--radius-2);
|
||||
max-height: 100%;
|
||||
flex-wrap: nowrap;
|
||||
"
|
||||
:style="{
|
||||
width: width ?? '100%',
|
||||
maxWidth: maxWidth ?? '98%',
|
||||
}"
|
||||
class="column"
|
||||
>
|
||||
<div class="row items-center q-py-sm q-px-md bordered-b">
|
||||
<div style="flex: 1"><slot name="title" /></div>
|
||||
<div>
|
||||
<q-btn
|
||||
round
|
||||
flat
|
||||
icon="mdi-close"
|
||||
padding="xs"
|
||||
class="close-btn"
|
||||
:class="{ dark: $q.dark.isActive }"
|
||||
v-close-popup
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="dialog-body"
|
||||
style="
|
||||
flex: 1;
|
||||
max-height: calc(100vh - 200px);
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
"
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
<div
|
||||
class="row items-center q-py-sm q-px-md bordered-t"
|
||||
v-if="$slots.footer"
|
||||
>
|
||||
<slot name="footer" />
|
||||
</div>
|
||||
</AppBox>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.close-btn {
|
||||
color: hsl(var(--negative-bg));
|
||||
background-color: hsla(var(--negative-bg) / 0.1);
|
||||
|
||||
&.dark {
|
||||
background-color: transparent;
|
||||
border: 1px solid hsl(var(--negative-bg));
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-body > :deep(*) {
|
||||
max-height: calc(100vh - 200px);
|
||||
}
|
||||
</style>
|
||||
70
src/components/05_buy-sale/WorkerItem.vue
Normal file
70
src/components/05_buy-sale/WorkerItem.vue
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<script lang="ts" setup>
|
||||
defineProps<{
|
||||
data: {
|
||||
no: number;
|
||||
refNo: string;
|
||||
fullName: string;
|
||||
birthDate: string;
|
||||
age: string;
|
||||
nationality: string;
|
||||
docExpireDate: string;
|
||||
};
|
||||
color?: 'male' | 'female' | 'none';
|
||||
}>();
|
||||
</script>
|
||||
<template>
|
||||
<div
|
||||
class="surface-1 rounded row bordered worker-item items-center"
|
||||
:class="{
|
||||
'worker-item__male': color === 'male',
|
||||
'worker-item__female': color === 'female',
|
||||
}"
|
||||
style="padding-block: var(--size-2)"
|
||||
>
|
||||
<div class="col-1 text-center">{{ data.no }}</div>
|
||||
<div class="col-2 text-center">{{ data.refNo }}</div>
|
||||
<div class="col-3">{{ data.fullName }}</div>
|
||||
<div class="col-1">{{ data.birthDate }}</div>
|
||||
<div class="col-1 text-center">{{ data.age }}</div>
|
||||
<div class="col-1 text-center">{{ data.nationality }}</div>
|
||||
<div class="col-2 text-center">{{ data.docExpireDate }}</div>
|
||||
<div class="col-1 text-center">
|
||||
<q-btn
|
||||
id="btn-delete-work"
|
||||
icon="mdi-trash-can-outline"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
size="12px"
|
||||
color="negative"
|
||||
@click="$emit('delete')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.worker-item {
|
||||
--side-color: var(--brand-1);
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
|
||||
&.worker-item__female {
|
||||
--side-color: hsl(var(--gender-female));
|
||||
}
|
||||
|
||||
&.worker-item__male {
|
||||
--side-color: hsl(var(--gender-male));
|
||||
}
|
||||
}
|
||||
|
||||
.worker-item::before {
|
||||
position: absolute;
|
||||
content: ' ';
|
||||
left: 0;
|
||||
width: 7px;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
background: var(--side-color);
|
||||
}
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue