This commit is contained in:
2025-09-18 15:29:52 +08:00
parent 335e21347b
commit e560e90970
26 changed files with 566 additions and 30 deletions

View File

@@ -335,13 +335,17 @@ paths:
$ref: '#/components/schemas/Product'
/api/customers:
get:
summary: 客户搜索(❌ Partially Implemented
description: 前端已接入查询参数 kw/page/size,后端待实现或对齐
summary: 客户搜索(✅ Fully Implemented
description: 支持 kw/page/size/debtOnly返回 {list:[]},含动态计算的 receivable 字段
parameters:
- in: query
name: kw
schema:
type: string
- in: query
name: debtOnly
schema:
type: boolean
- in: query
name: page
schema:
@@ -368,6 +372,17 @@ paths:
type: array
items:
$ref: '#/components/schemas/Customer'
post:
summary: 新建客户(✅ Fully Implemented
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateCustomerRequest'
responses:
'200':
description: 成功
/api/orders:
post:
summary: 新建单据(✅ Fully Implemented
@@ -839,13 +854,27 @@ components:
Customer:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
mobile:
type: string
id: { type: integer, format: int64 }
name: { type: string }
contactName: { type: string }
mobile: { type: string }
phone: { type: string }
level: { type: string }
priceLevel: { type: string, enum: [retail, distribution, wholesale, big_client] }
remark: { type: string }
receivable: { type: number }
CreateCustomerRequest:
type: object
properties:
name: { type: string }
level: { type: string, nullable: true }
priceLevel: { type: string, enum: [retail, distribution, wholesale, big_client] }
contactName: { type: string, nullable: true }
mobile: { type: string, nullable: true }
phone: { type: string, nullable: true }
address: { type: string, nullable: true }
arOpening: { type: number, nullable: true }
remark: { type: string, nullable: true }
CreateOrderRequest:
type: object
properties: