feat: customer branch management

This commit is contained in:
Methapon2001 2024-08-08 13:32:46 +07:00
parent 0f9c752e04
commit ee4c202088
4 changed files with 72 additions and 8 deletions

View file

@ -80,6 +80,7 @@ watch(
/>
<span>{{ $t('customer.form.group.basicInfo') }}</span>
<EditButton
icon-only
v-if="readonly && !create"
type="button"
@click="$emit('edit')"
@ -87,18 +88,21 @@ watch(
:disabled="actionDisabled"
/>
<DeleteButton
icon-only
v-if="readonly && !create"
@click="$emit('delete')"
type="button"
:disabled="actionDisabled"
/>
<SaveButton
icon-only
v-if="!readonly"
@click="$emit('save')"
class="q-ml-auto"
:disabled="actionDisabled"
/>
<CancelButton
icon-only
v-if="!readonly && !create"
type="button"
:disabled="actionDisabled"

View file

@ -12,10 +12,7 @@ import CancelButton from 'src/components/button/CancelButton.vue';
const item = defineModel<NonNullable<CustomerCreate['customerBranch']>[number]>(
'customerBranch',
{
required: true,
default: [],
},
{ required: true },
);
const tab = ref('main');
@ -43,6 +40,7 @@ defineProps<{
{{ $t('customer.form.branch.title', { name: item.branchNo || 0 }) }}
<EditButton
v-if="readonly"
style="width: 5rem"
@click="$emit('edit')"
class="q-ml-auto"
type="button"
@ -50,12 +48,14 @@ defineProps<{
/>
<DeleteButton
v-if="readonly"
style="width: 5rem"
@click="$emit('delete')"
type="button"
:disabled="actionDisabled"
/>
<SaveButton
v-if="!readonly"
style="width: 5rem"
@click="$emit('save')"
class="q-ml-auto"
type="submit"
@ -63,6 +63,7 @@ defineProps<{
/>
<CancelButton
v-if="!readonly"
style="width: 5rem"
@click="$emit('cancel')"
type="button"
:disabled="actionDisabled"

View file

@ -3,7 +3,7 @@ defineProps<{
readonly?: boolean;
prefixId?: string;
}>();
const mail = defineModel<string>('mail');
const mail = defineModel<string>('email');
const telephone = defineModel<string>('telephone');
</script>