fix: select customer
This commit is contained in:
parent
d89925dee9
commit
c29e1d4ec5
3 changed files with 31 additions and 11 deletions
|
|
@ -30,6 +30,8 @@ export const useCustomerForm = defineStore('form-customer', () => {
|
|||
|
||||
const registerAbleBranchOption = ref<{ id: string; name: string }[]>();
|
||||
|
||||
const currentBranchRootId = ref<string>('');
|
||||
|
||||
const tabFieldRequired = ref<{
|
||||
[key: string]: (keyof CustomerBranchCreate)[];
|
||||
}>({
|
||||
|
|
@ -160,6 +162,7 @@ export const useCustomerForm = defineStore('form-customer', () => {
|
|||
state.value.editCustomerCode = data.code;
|
||||
state.value.customerImageUrl = `${baseUrl}/customer/${id}/image/${data.selectedImage}`;
|
||||
state.value.defaultCustomerImageUrl = `${baseUrl}/customer/${id}/image/${data.selectedImage}`;
|
||||
currentBranchRootId.value = data.branch[0].id || '';
|
||||
|
||||
resetFormData.registeredBranchId = data.registeredBranchId;
|
||||
resetFormData.status = data.status;
|
||||
|
|
@ -500,6 +503,8 @@ export const useCustomerForm = defineStore('form-customer', () => {
|
|||
state,
|
||||
resetFormData,
|
||||
currentFormData,
|
||||
currentBranchRootId,
|
||||
|
||||
isFormDataDifferent,
|
||||
resetForm,
|
||||
assignFormData,
|
||||
|
|
@ -1663,6 +1668,7 @@ export const useEmployeeForm = defineStore('form-employee', () => {
|
|||
state,
|
||||
currentFromDataEmployee,
|
||||
resetEmployeeData,
|
||||
|
||||
addPassport,
|
||||
addVisa,
|
||||
addCheckup,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue