|
@@ -1,5 +1,4 @@
|
|
import request from '@/config/axios'
|
|
import request from '@/config/axios'
|
|
-import {Sku} from "@/api/mall/product/spu";
|
|
|
|
|
|
|
|
// 供应商主数据 VO
|
|
// 供应商主数据 VO
|
|
export interface SupplierVO {
|
|
export interface SupplierVO {
|
|
@@ -22,6 +21,79 @@ export interface SupplierVO {
|
|
remark: string // 备注
|
|
remark: string // 备注
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// 供应商主数据 VO
|
|
|
|
+export interface SupplierApprovalVO {
|
|
|
|
+ id: number // 主键
|
|
|
|
+ code: string // 供应商编号 自动生成
|
|
|
|
+ name: string // 供应商名称
|
|
|
|
+ classification: string // 供应商分类
|
|
|
|
+ type: string // 公司类型
|
|
|
|
+ nature: string // 供应商性质
|
|
|
|
+ creditCode: string // 社会信用代码
|
|
|
|
+ tin: string // 纳税人识别号
|
|
|
|
+ corporation: string // 法人
|
|
|
|
+ incorporationDate: Date // 成立日期
|
|
|
|
+ address: string // 公司地址
|
|
|
|
+ bizScope: string // 经营范围
|
|
|
|
+ registeredCapital: number // 注册资金 单位:万元
|
|
|
|
+ annualTurnove: number // 年营业额 单位:万元
|
|
|
|
+ size: string // 公司规模 数据字典
|
|
|
|
+ status: number // 商品状态: 1 草稿 2活动 3 关闭
|
|
|
|
+ remark: string // 备注
|
|
|
|
+ certificates?: [
|
|
|
|
+ {
|
|
|
|
+ id: number
|
|
|
|
+ supplierId: number
|
|
|
|
+ supplierName: string
|
|
|
|
+ type: string
|
|
|
|
+ name: string
|
|
|
|
+ urls: string
|
|
|
|
+ createTime?: Date
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ contacts?: [
|
|
|
|
+ {
|
|
|
|
+ id: number
|
|
|
|
+ supplierId: number
|
|
|
|
+ supplierName: string
|
|
|
|
+ name: string
|
|
|
|
+ position: string
|
|
|
|
+ telephone: string
|
|
|
|
+ email: string
|
|
|
|
+ productIds: number
|
|
|
|
+ productNames: string
|
|
|
|
+ remark: string
|
|
|
|
+ createTime?: Date
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ coreProducts?: [
|
|
|
|
+ {
|
|
|
|
+ id: number
|
|
|
|
+ supplierId: number
|
|
|
|
+ supplierName: string
|
|
|
|
+ productId: number
|
|
|
|
+ productName: string
|
|
|
|
+ advantage: string
|
|
|
|
+ createTime?: Date
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ connectRecords?: [
|
|
|
|
+ {
|
|
|
|
+ id: number
|
|
|
|
+ supplierId: number
|
|
|
|
+ supplierName: string
|
|
|
|
+ userId: number
|
|
|
|
+ username: string
|
|
|
|
+ contactId: number
|
|
|
|
+ contactName: string
|
|
|
|
+ reason: string
|
|
|
|
+ content: string
|
|
|
|
+ urls: string
|
|
|
|
+ createTime?: Date
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+}
|
|
|
|
+
|
|
export interface Supplier {
|
|
export interface Supplier {
|
|
id?: number // 主键
|
|
id?: number // 主键
|
|
code?: string // 供应商编号 自动生成
|
|
code?: string // 供应商编号 自动生成
|
|
@@ -54,6 +126,11 @@ export const Api = {
|
|
return await request.get({ url: `/supplier/base/get?id=` + id })
|
|
return await request.get({ url: `/supplier/base/get?id=` + id })
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ // 查询供应商主数据及所有子表详情
|
|
|
|
+ allSupplierInfo: async (id: number) => {
|
|
|
|
+ return await request.get({ url: `/supplier/base/allSupplierInfo?id=` + id })
|
|
|
|
+ },
|
|
|
|
+
|
|
// 新增供应商主数据
|
|
// 新增供应商主数据
|
|
create: async (data: SupplierVO) => {
|
|
create: async (data: SupplierVO) => {
|
|
return await request.post({ url: `/supplier/base/create`, data })
|
|
return await request.post({ url: `/supplier/base/create`, data })
|
|
@@ -73,6 +150,12 @@ export const Api = {
|
|
export: async (params) => {
|
|
export: async (params) => {
|
|
return await request.download({ url: `/supplier/base/export-excel`, params })
|
|
return await request.download({ url: `/supplier/base/export-excel`, params })
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ // 提交审核
|
|
|
|
+ submitForApproval: async (id: number) => {
|
|
|
|
+ return await request.put({ url: `/supplier/base/submitForApproval?id=${id}`})
|
|
|
|
+ },
|
|
|
|
+
|
|
getAll: async () =>{
|
|
getAll: async () =>{
|
|
return await request.get({ url: `/supplier/base/all` })
|
|
return await request.get({ url: `/supplier/base/all` })
|
|
}
|
|
}
|