feat: ตรวจสอบว่าแก้ไข หรือ ดู
This commit is contained in:
parent
a509215aef
commit
f9d9b83792
7 changed files with 92 additions and 20 deletions
|
|
@ -0,0 +1,7 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import appBox from '../app/AppBox.vue';
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<appBox></appBox>
|
||||||
|
</template>
|
||||||
|
<style scoped></style>
|
||||||
|
|
@ -21,7 +21,9 @@ defineProps<{
|
||||||
<div class="col-9 row q-col-gutter-md">
|
<div class="col-9 row q-col-gutter-md">
|
||||||
<q-input
|
<q-input
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="outlined"
|
:outlined="!readonly"
|
||||||
|
:readonly="readonly"
|
||||||
|
:borderless="readonly"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-5"
|
class="col-5"
|
||||||
:label="$t('formDialogInputEmailHq')"
|
:label="$t('formDialogInputEmailHq')"
|
||||||
|
|
@ -30,7 +32,9 @@ defineProps<{
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="outlined"
|
:outlined="!readonly"
|
||||||
|
:readonly="readonly"
|
||||||
|
:borderless="readonly"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-7"
|
class="col-7"
|
||||||
:label="$t('formDialogInputTelephoneHq')"
|
:label="$t('formDialogInputTelephoneHq')"
|
||||||
|
|
@ -39,7 +43,9 @@ defineProps<{
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="outlined"
|
:outlined="!readonly"
|
||||||
|
:readonly="readonly"
|
||||||
|
:borderless="readonly"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-5"
|
class="col-5"
|
||||||
:label="$t('formDialogInputContactName')"
|
:label="$t('formDialogInputContactName')"
|
||||||
|
|
@ -48,7 +54,9 @@ defineProps<{
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="outlined"
|
:outlined="!readonly"
|
||||||
|
:readonly="readonly"
|
||||||
|
:borderless="readonly"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-7"
|
class="col-7"
|
||||||
:label="$t('formDialogInputTelephoneContact')"
|
:label="$t('formDialogInputTelephoneContact')"
|
||||||
|
|
@ -57,7 +65,9 @@ defineProps<{
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="outlined"
|
:outlined="!readonly"
|
||||||
|
:readonly="readonly"
|
||||||
|
:borderless="readonly"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-5"
|
class="col-5"
|
||||||
label="Line ID"
|
label="Line ID"
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const code = defineModel<string>('code');
|
const code = defineModel<string>('code');
|
||||||
|
const codeSubBranch = defineModel<string>('codeSubBranch');
|
||||||
const taxNo = defineModel<string>('taxNo');
|
const taxNo = defineModel<string>('taxNo');
|
||||||
const name = defineModel<string>('name');
|
const name = defineModel<string>('name');
|
||||||
const nameEN = defineModel<string>('nameEN');
|
const nameEN = defineModel<string>('nameEN');
|
||||||
|
const typeBranch = defineModel<string>('typeBranch');
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
title?: string;
|
title?: string;
|
||||||
|
|
@ -10,6 +12,7 @@ defineProps<{
|
||||||
outlined?: boolean;
|
outlined?: boolean;
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
separator?: boolean;
|
separator?: boolean;
|
||||||
|
view?: boolean;
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -17,42 +20,88 @@ defineProps<{
|
||||||
<div class="col-9 row q-col-gutter-md">
|
<div class="col-9 row q-col-gutter-md">
|
||||||
<q-input
|
<q-input
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="outlined"
|
:outlined="!readonly"
|
||||||
|
:borderless="readonly"
|
||||||
readonly
|
readonly
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-6"
|
:class="{
|
||||||
|
'col-6': typeBranch == 'headOffice',
|
||||||
|
'col-4': typeBranch != 'headOffice',
|
||||||
|
}"
|
||||||
:label="$t('formDialogInputCode')"
|
:label="$t('formDialogInputCode')"
|
||||||
v-model="code"
|
v-model="code"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
v-if="typeBranch !== 'headOffice'"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="outlined"
|
:outlined="!readonly"
|
||||||
:readonly="readonly"
|
:borderless="readonly"
|
||||||
|
readonly
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-6"
|
:class="{
|
||||||
:label="$t('formDialogInputTaxNo')"
|
'col-6': typeBranch == 'headOffice',
|
||||||
v-model="taxNo"
|
'col-4': typeBranch != 'headOffice',
|
||||||
|
}"
|
||||||
|
:label="$t('branchLabelCode')"
|
||||||
|
v-model="codeSubBranch"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="outlined"
|
:outlined="!readonly"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
:borderless="readonly"
|
||||||
|
hide-bottom-space
|
||||||
|
:class="{
|
||||||
|
'col-6': typeBranch === 'headOffice',
|
||||||
|
'col-4': typeBranch !== 'headOffice',
|
||||||
|
}"
|
||||||
|
:label="$t('formDialogInputTaxNo')"
|
||||||
|
v-model="taxNo"
|
||||||
|
lazy-rules
|
||||||
|
:rules="[
|
||||||
|
(val) => (val && val.length > 0) || $t('formDialogInputTaxNoValidate'),
|
||||||
|
]"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<q-input
|
||||||
|
:dense="dense"
|
||||||
|
:outlined="!readonly"
|
||||||
|
:readonly="readonly"
|
||||||
|
:borderless="readonly"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-12"
|
class="col-12"
|
||||||
:label="$t('formDialogInputNameHq')"
|
:label="$t('formDialogInputNameHq')"
|
||||||
v-model="name"
|
v-model="name"
|
||||||
|
lazy-rules
|
||||||
|
:rules="[(val) => val && val.length > 0]"
|
||||||
|
:error-message="
|
||||||
|
typeBranch === 'headOffice'
|
||||||
|
? $t('formDialogInputNameHqValidate')
|
||||||
|
: $t('formDialogInputNameSubBranchValidate')
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="outlined"
|
:outlined="!readonly"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
:borderless="readonly"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-12"
|
class="col-12"
|
||||||
:label="$t('formDialogInputNameHqEn')"
|
|
||||||
v-model="nameEN"
|
v-model="nameEN"
|
||||||
|
:label="
|
||||||
|
typeBranch === 'headOffice'
|
||||||
|
? $t('formDialogInputNameHqEn')
|
||||||
|
: $t('formDialogInputNameSubBranchEn')
|
||||||
|
"
|
||||||
|
:rules="[(val) => val && val.length > 0]"
|
||||||
|
:error-message="
|
||||||
|
typeBranch === 'headOffice'
|
||||||
|
? $t('formDialogInputNameHqEnValidate')
|
||||||
|
: $t('formDialogInputNameSubBranchEnValidate')
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<q-separator
|
<q-separator
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ defineProps<{
|
||||||
title?: string;
|
title?: string;
|
||||||
dense?: boolean;
|
dense?: boolean;
|
||||||
outlined?: boolean;
|
outlined?: boolean;
|
||||||
readonly?: boolean;
|
readonly: boolean;
|
||||||
separator?: boolean;
|
separator?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
@ -25,7 +25,7 @@ defineEmits<{
|
||||||
<div class="col-12 flex flex-center" v-if="image">
|
<div class="col-12 flex flex-center" v-if="image">
|
||||||
<q-img :src="image as string" style="width: 150px; height: 150px" />
|
<q-img :src="image as string" style="width: 150px; height: 150px" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 flex flex-center q-pb-lg">
|
<div class="col-12 flex flex-center q-pb-lg" v-if="!readonly">
|
||||||
<q-btn
|
<q-btn
|
||||||
:text-color="$q.dark.isActive ? 'black' : 'white'"
|
:text-color="$q.dark.isActive ? 'black' : 'white'"
|
||||||
style="background: var(--blue-5); color: var(--blue-0); font-size: 12px"
|
style="background: var(--blue-5); color: var(--blue-0); font-size: 12px"
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ const longitude = defineModel<string>('longitude');
|
||||||
const latitude = defineModel<string>('latitude');
|
const latitude = defineModel<string>('latitude');
|
||||||
|
|
||||||
function getLocation() {
|
function getLocation() {
|
||||||
|
console.log('ddd');
|
||||||
|
|
||||||
navigator.geolocation.getCurrentPosition((position) => {
|
navigator.geolocation.getCurrentPosition((position) => {
|
||||||
longitude.value = position.coords.longitude.toString();
|
longitude.value = position.coords.longitude.toString();
|
||||||
latitude.value = position.coords.latitude.toString();
|
latitude.value = position.coords.latitude.toString();
|
||||||
|
|
@ -13,7 +15,7 @@ defineProps<{
|
||||||
title?: string;
|
title?: string;
|
||||||
dense?: boolean;
|
dense?: boolean;
|
||||||
outlined?: boolean;
|
outlined?: boolean;
|
||||||
readonly?: boolean;
|
readonly: boolean;
|
||||||
separator?: boolean;
|
separator?: boolean;
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -38,7 +40,7 @@ defineProps<{
|
||||||
height: 100px;
|
height: 100px;
|
||||||
background-image: url(/map.png);
|
background-image: url(/map.png);
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
background-size: 980px 400px;
|
background-size: 1500px 850px;
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ defineProps<{
|
||||||
title?: string;
|
title?: string;
|
||||||
dense?: boolean;
|
dense?: boolean;
|
||||||
outlined?: boolean;
|
outlined?: boolean;
|
||||||
readonly?: boolean;
|
readonly: boolean;
|
||||||
separator?: boolean;
|
separator?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
@ -42,6 +42,7 @@ defineEmits<{
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 flex flex-center q-py-md">
|
<div class="col-12 flex flex-center q-py-md">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
v-if="!readonly"
|
||||||
:text-color="$q.dark.isActive ? 'black' : 'white'"
|
:text-color="$q.dark.isActive ? 'black' : 'white'"
|
||||||
style="background: var(--blue-5); color: var(--blue-0); font-size: 12px"
|
style="background: var(--blue-5); color: var(--blue-0); font-size: 12px"
|
||||||
unelevated
|
unelevated
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ defineProps<{
|
||||||
addressTitle?: string;
|
addressTitle?: string;
|
||||||
addressTitleEN?: string;
|
addressTitleEN?: string;
|
||||||
addressSeparator?: boolean;
|
addressSeparator?: boolean;
|
||||||
|
branchStatus?: string;
|
||||||
submit?: (...args: unknown[]) => void;
|
submit?: (...args: unknown[]) => void;
|
||||||
close?: (...args: unknown[]) => void;
|
close?: (...args: unknown[]) => void;
|
||||||
}>();
|
}>();
|
||||||
|
|
@ -37,6 +38,8 @@ const zipCode = defineModel<string>('zipCode', { default: '' });
|
||||||
<div style="width: 31.98px"></div>
|
<div style="width: 31.98px"></div>
|
||||||
<div class="col text-subtitle1 text-weight-bold text-center">
|
<div class="col text-subtitle1 text-weight-bold text-center">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
|
|
||||||
|
<div>{{ branchStatus ? `(${branchStatus})` : '' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<q-btn
|
<q-btn
|
||||||
round
|
round
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue