refactor: store data in field instead of attribute
This commit is contained in:
parent
127d8c0ebc
commit
105e853f01
6 changed files with 47 additions and 27 deletions
|
|
@ -240,8 +240,16 @@ export const useRequestList = defineStore('request-list', () => {
|
|||
const res = await api.put<Step>(
|
||||
`/request-work/${body.requestWorkId}/step-status/${body.step}`,
|
||||
{
|
||||
customerDuty: body.customerDuty,
|
||||
customerDutyCost: body.customerDutyCost,
|
||||
companyDuty: body.customerDuty,
|
||||
companyDutyCost: body.companyDutyCost,
|
||||
individualDuty: body.individualDuty,
|
||||
individualDutyCost: body.individualDutyCost,
|
||||
responsibleUserLocal: body.responsibleUserLocal,
|
||||
responsibleUserId: body.responsibleUserId,
|
||||
attributes: body.attributes,
|
||||
requestWorkStatus: body.workStatus,
|
||||
workStatus: body.workStatus,
|
||||
requestWorkId: undefined,
|
||||
step: undefined,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -72,14 +72,14 @@ export type Attributes = {
|
|||
};
|
||||
|
||||
export type AttributesForm = {
|
||||
customerDuty: boolean;
|
||||
customerDuty?: boolean;
|
||||
customerDutyCost?: number;
|
||||
companyDuty: boolean;
|
||||
companyDuty?: boolean;
|
||||
companyDutyCost?: number;
|
||||
localEmployee: boolean;
|
||||
employeeId?: string;
|
||||
individualDuty: boolean;
|
||||
individualDuty?: boolean;
|
||||
individualDutyCost?: number;
|
||||
responsibleUserLocal?: boolean;
|
||||
responsibleUserId?: string;
|
||||
};
|
||||
|
||||
export type Step = {
|
||||
|
|
@ -87,4 +87,12 @@ export type Step = {
|
|||
requestWorkId: string;
|
||||
workStatus?: RequestWorkStatus;
|
||||
step: number;
|
||||
customerDuty?: boolean;
|
||||
customerDutyCost?: number;
|
||||
companyDuty?: boolean;
|
||||
companyDutyCost?: number;
|
||||
individualDuty?: boolean;
|
||||
individualDutyCost?: number;
|
||||
responsibleUserLocal?: boolean;
|
||||
responsibleUserId?: string;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue