feat(web-admin): add qc material month import template UI
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
e4dcb43d77
commit
6957952b4c
4 files changed
+764
-1
No files matched your search
@@ -0,0 +1,83 @@
|
||||
import request from '@/utils/http'
|
||||
|
||||
export interface QcMonthTemplateRow {
|
||||
id: string
|
||||
materialId?: string
|
||||
materialCode: string
|
||||
materialName: string
|
||||
specModel?: string
|
||||
unit?: string
|
||||
catalogNo: string
|
||||
batchNo: string
|
||||
manufacturer: string
|
||||
unitPrice: number
|
||||
amount: number
|
||||
inQty: number
|
||||
expireDate: string
|
||||
orderNum?: number
|
||||
remark?: string
|
||||
}
|
||||
|
||||
export interface QcMonthImportPreviewLine {
|
||||
templateId?: string
|
||||
materialId?: string
|
||||
materialCode: string
|
||||
materialName: string
|
||||
specModel?: string
|
||||
unit?: string
|
||||
stockInNo: string
|
||||
stockInDate: string
|
||||
expireDate: string
|
||||
catalogNo: string
|
||||
batchNo: string
|
||||
manufacturer: string
|
||||
unitPrice: number
|
||||
amount: number
|
||||
qty: number
|
||||
remark?: string
|
||||
}
|
||||
|
||||
export function fetchQcMonthTemplateList() {
|
||||
return request.get<QcMonthTemplateRow[]>({
|
||||
url: '/web/admin/qc-material-month-templates'
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchCreateQcMonthTemplate(data: Record<string, any>) {
|
||||
return request.post<QcMonthTemplateRow>({
|
||||
url: '/web/admin/qc-material-month-templates',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchUpdateQcMonthTemplate(id: string, data: Record<string, any>) {
|
||||
return request.put<QcMonthTemplateRow>({
|
||||
url: `/web/admin/qc-material-month-templates/${id}`,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchDeleteQcMonthTemplate(id: string) {
|
||||
return request.delete<void>({
|
||||
url: `/web/admin/qc-material-month-templates/${id}`
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchPreviewQcMonthImport(stockInDate: string) {
|
||||
return request.post<QcMonthImportPreviewLine[]>({
|
||||
url: '/web/admin/qc-material-month-templates/preview',
|
||||
data: { stockInDate }
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchConfirmQcMonthImport(data: {
|
||||
stockInDate: string
|
||||
items: QcMonthImportPreviewLine[]
|
||||
remark?: string
|
||||
stockInTime?: string
|
||||
}) {
|
||||
return request.post<{ count: number }>({
|
||||
url: '/web/admin/qc-material-month-templates/confirm',
|
||||
data
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user