feat(pl): driver public feedback by product and brand qty
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
0667e8d77b
commit
2a215b2e1f
4 files changed
+436
-72
No files matched your search
@@ -1,12 +1,25 @@
|
||||
import { publicPlGet, publicPlPost, publicPlUpload } from '@/utils/http/public-pl'
|
||||
|
||||
export interface BrandQtyItem {
|
||||
brandId: string
|
||||
brandName?: string
|
||||
qty: number
|
||||
}
|
||||
|
||||
export interface PublicTransportProduct {
|
||||
planProductId: string
|
||||
productName: string
|
||||
model?: string
|
||||
packageSpec?: string
|
||||
unit?: string
|
||||
quantity?: number
|
||||
remark?: string
|
||||
brandMode?: string | null
|
||||
brandId?: string | null
|
||||
brandName?: string | null
|
||||
brandOptions?: { brandId: string; brandName: string }[]
|
||||
actualQty?: number | null
|
||||
brandQtys?: BrandQtyItem[]
|
||||
}
|
||||
|
||||
export interface PublicTransportPersonnel {
|
||||
@@ -51,7 +64,11 @@ export const publicTransportApi = {
|
||||
getPage: (token: string) => publicPlGet<PublicTransportPage>(`/public/pl/transport/${token}`),
|
||||
saveFeedback: (
|
||||
token: string,
|
||||
data: { feedbackImages?: string[]; feedbackRemark?: string; feedbackQty?: number | null }
|
||||
data: {
|
||||
feedbackImages?: string[]
|
||||
feedbackRemark?: string
|
||||
products: { planProductId: string; actualQty: number; brandQtys?: BrandQtyItem[] }[]
|
||||
}
|
||||
) => publicPlPost<{ success: boolean }>(`/public/pl/transport/${token}/feedback`, data),
|
||||
uploadAttachment: (token: string, file: File) =>
|
||||
publicPlUpload<PublicUploadResult>(`/public/pl/transport/${token}/attachments`, file)
|
||||
|
||||
Reference in new issue
Block a user