Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
ujia
/
uj-store
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b6d3c81e
authored
Oct 09, 2026
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat(门店导入): 添加导入校验接口的类型定义
新增门店导入校验接口所需的各类类型定义,包含请求参数、失败明细、预览行与响应结构
1 parent
9879cedd
Pipeline
#308
for
b6d3c81e
failed
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
107 additions
and
0 deletions
src/api/modules/store.ts
src/api/modules/store.ts
View file @
b6d3c81
...
...
@@ -134,6 +134,113 @@ export interface StoreImportCommitDTO {
listingIds
:
number
[];
}
/** 校验失败明细行 */
export
interface
StoreImportFailVO
{
rowIndex
?:
number
;
storeName
:
string
;
merchantNo
:
string
;
productCategory
:
string
;
/** 校验层级编码:L3-单元格级 L4-业务级 L5-重复上架级 */
levelCode
:
string
;
/** 校验层级文案:如「L4 业务级」 */
levelLabel
:
string
;
/** 失败原因 */
reason
:
string
;
}
/** 导入行(产品分类明细) */
export
interface
StoreImportRowDTO
{
/** 门店名称(营业执照全称) */
storeName
:
string
;
merchantNo
:
string
;
/** 业务场景(展示用 label,落库为 baseSceneCode) */
businessScene
:
string
;
/** 业务场景编码(D+ baseSceneCode,如 110102) */
businessSceneCode
:
string
;
/** 产品分类(系统字典标准名,可多级以「-」分隔) */
productCategory
:
string
;
/** 产品分类 ID(D+ dj_car_life_goods_category_configuration.category_type) */
productCategoryId
:
number
;
/** 产品分类层级(D+ dj_car_life_goods_category_configuration.level,1 起) */
productCategoryLevel
:
number
;
marketFee1CalcMode
:
string
;
marketFee1CalcWay
:
string
;
marketFee1Value
:
number
;
/** 数值单位:RATIO-比例 AMOUNT-金额(由计算方式推导) */
marketFee1Unit
:
string
;
marketFee2CalcMode
:
string
;
marketFee2CalcWay
:
string
;
marketFee2Value
:
number
;
marketFee2Unit
:
string
;
/** 一线阳光是否开启线上积分:1-是 0-否 */
sunshine1OnlinePoint
:
number
;
sunshine1CalcMode
:
string
;
sunshine1CalcWay
:
string
;
sunshine1Value
:
number
;
sunshine1Unit
:
string
;
sunshine2OnlinePoint
:
number
;
sunshine2CalcMode
:
string
;
sunshine2CalcWay
:
string
;
sunshine2Value
:
number
;
sunshine2Unit
:
string
;
/** 装修、设备总投入 */
costDecoration
:
number
;
/** 当月产生(房租、水电、耗材等) */
costMonthly
:
number
;
/** 人工成本 */
costLabor
:
number
;
}
/** POST /store/import/check 响应 data */
export
interface
StoreImportCheckVO
{
templateVersion
:
string
;
/** 解析总行数 */
totalRows
:
number
;
/** 校验通过行数 */
passRows
:
number
;
/** 校验失败行数 */
failRows
:
number
;
storeName
:
string
;
merchantNo
:
string
;
/** 所属组织(完整层级路径 label,例如「优加主体 / 线上运营部」) */
orgPath
:
string
;
/** 业务场景(多个以「/」分隔,label,例如「售后会员权益升级 / 售前延保」) */
businessScene
:
string
;
/** 产品分类(去重后的 label,多个以「/」分隔,例如「太阳膜-原厂/车衣-原厂/精品-小桌板」) */
productCategories
:
string
;
/** 校验失败明细 */
failures
:
StoreImportFailVO
[];
/** 导入行(产品分类明细) */
previewRows
:
StoreImportRowDTO
[];
/** 导入失败明细文件下载地址(全部成功时为 null) */
failFileUrl
:
string
|
null
;
/** 下一个待审批角色名称,如「优加商务经理」 */
nextRoleName
:
string
;
/** 去重后的产品分类数,例如 6(2 个业务场景 × 6 个分类 → 6) */
distinctProductCategoryCount
:
number
;
/** 去重后的业务场景数,例如 2 */
distinctBusinessSceneCount
:
number
;
/** 产品分类总行数,例如 12 */
productCategoryRowCount
:
number
;
/** 本次落库 / 提交的上架记录 ID(按业务场景拆分,一条 = 一个场景) */
listingIds
:
number
[];
/** 是否已落库(导入成功为 true;仅校验失败为 false) */
submitted
:
boolean
;
}
/** POST /store/import/check 请求参数(FormData) */
export
interface
StoreImportCheckParams
{
file
:
File
;
/** 备注(可选,≤ 200 字) */
remark
?:
string
;
}
/** POST /store/import/submit 请求体:把草稿记录提交为待审批(不重新解析文件) */
export
interface
StoreImportCommitDTO
{
/** 导入返回的上架记录 ID 列表(同一门店的多个业务场景) */
listingIds
:
number
[];
}
const
APPROVAL_PATHS
:
Record
<
ApproveTab
,
string
>
=
{
todo
:
'/store/approval/pending'
,
done
:
'/store/approval/done'
,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment