fix: แก้ personName

This commit is contained in:
Net 2024-06-18 10:44:07 +07:00
parent 8013c553ea
commit 0cf2af9754
2 changed files with 13 additions and 0 deletions

View file

@ -74,6 +74,7 @@ const {
const employeeStore = useEmployeeStore();
const formData = ref<CustomerCreate>({
status: 'CREATED',
personName: '',
customerType: 'CORP',
customerName: '',
customerNameEN: '',
@ -440,6 +441,7 @@ function clearForm() {
customerType: 'CORP',
customerName: '',
customerNameEN: '',
personName: '',
taxNo: '',
customerBranch: [
{
@ -725,6 +727,7 @@ async function onSubmitEdit(id: string) {
customerNameEN: formData.value.customerNameEN,
customerBranch: formData.value.customerBranch,
taxNo: formData.value.taxNo,
personName: formData.value.personName,
};
await editById(id, tempValue);
@ -820,6 +823,7 @@ async function assignFormData(data: Customer & { branch: CustomerBranch[] }) {
customerType: data.customerType,
customerName: data.customerName,
customerNameEN: data.customerNameEN,
personName: data.personName,
taxNo: data.taxNo,
customerBranch: [],
image: null,
@ -1651,6 +1655,7 @@ watch(currentStatus, async () => {
:type-customer="customerType"
v-model:customer-name="formData.customerName"
v-model:customer-name-en="formData.customerNameEN"
v-model:person-name="formData.personName"
v-model:tax-no="formData.taxNo"
/>
</template>
@ -1826,6 +1831,7 @@ watch(currentStatus, async () => {
v-model:customer-branch="formDataEmployeeOwner"
v-model:employee-id="currentEmployeeCode"
v-model:nrc-no="formDataEmployee.nrcNo"
v-model:person-name="formData.personName"
@filter-owner-branch="employeeFilterOwnerBranch"
/>
</template>
@ -2235,6 +2241,7 @@ watch(currentStatus, async () => {
:type-customer="customerType"
v-model:customer-name="formData.customerName"
v-model:customer-name-en="formData.customerNameEN"
v-model:person-name="formData.personName"
v-model:tax-no="formData.taxNo"
/>
</template>
@ -2426,6 +2433,7 @@ watch(currentStatus, async () => {
:type-customer="customerType"
v-model:customer-name="formData.customerName"
v-model:customer-name-en="formData.customerNameEN"
v-model:person-name="formData.personName"
v-model:tax-no="formData.taxNo"
/>
</template>
@ -2634,6 +2642,7 @@ watch(currentStatus, async () => {
v-model:customer-branch="formDataEmployeeOwner"
v-model:employee-id="currentEmployeeCode"
v-model:nrc-no="formDataEmployee.nrcNo"
v-model:person-name="formData.personName"
@filter-owner-branch="employeeFilterOwnerBranch"
/>
</template>

View file

@ -16,10 +16,12 @@ export type Customer = {
updateBy: string | null;
updatedAt: string;
taxNo: string;
personName: string;
};
export type CustomerBranch = {
id: string;
branchNo: number;
legalPersonNo: string;
name: string;
@ -97,6 +99,7 @@ export type CustomerCreate = {
customerType: CustomerType;
status?: Status;
image: File | null;
personName: string;
};
export type CustomerUpdate = {
@ -107,6 +110,7 @@ export type CustomerUpdate = {
customerBranch?: (CustomerBranchCreate & { id?: string })[];
taxNo?: string | null;
image?: File;
personName: string;
};
export type BranchAttachmentCreate = {