713 lines
20 KiB
TypeScript
713 lines
20 KiB
TypeScript
import request from '@/utils/request'
|
||
const v = "1.0";
|
||
|
||
/** 查询当前主体可见的货主列表 */
|
||
export function storeList(data: {
|
||
keyword?: string
|
||
page?: number
|
||
page_size?: number
|
||
}) {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.list',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
/** 货主侧查询签约关系列表 */
|
||
export function storeWarehouseList(data: {
|
||
keyword?: string
|
||
page?: number
|
||
page_size?: number
|
||
}) {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.list',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
/** 查询当前主体可见的仓库列表 */
|
||
export function warehouseList(data: {
|
||
keyword?: string
|
||
page?: number
|
||
page_size?: number
|
||
}) {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.warehouse.list',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
/**
|
||
* 发起或确认签约(当前主体始终为 store_id 方/消费方,对方为 warehouse_id 方/提供方)
|
||
* - counterparty_id:对方主体 ID(必传,兼容 warehouse_id / store_id)
|
||
* - temp_code:临时签约码;传入后进入确认或预览流程
|
||
*/
|
||
export function storeWarehouseSign(data: {
|
||
counterparty_id: number
|
||
temp_code?: string
|
||
}) {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.sign',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
/** storeWarehouse.store.confirmSign 响应中的签约关系精简对象 */
|
||
export interface StoreWarehouseConfirmSignContract {
|
||
/** 签约关系主键 ID */
|
||
id: number
|
||
/** 货主方主体 ID */
|
||
store_id: number
|
||
/** 仓库方主体 ID */
|
||
warehouse_id: number
|
||
/** 对方主体名称 */
|
||
counterparty_name: string
|
||
/** 当前主体视角的签约备注名 */
|
||
remask: string
|
||
/** 当前主体启用状态:0=禁用 1=启用 */
|
||
use_status: number
|
||
/** 签约状态:1=申请中 2=已通过 3=已拒绝 4=已解除 5=已过期 */
|
||
auth_status: number
|
||
/** 签约状态中文标签 */
|
||
auth_status_label: string
|
||
/** 授权结束时间 */
|
||
auth_end: string | null
|
||
/** 面单余额数量 */
|
||
print_quantity: number
|
||
/** 是否已配置奇门 */
|
||
has_qimen_config: boolean
|
||
}
|
||
|
||
/** storeWarehouse.store.confirmSign 响应数据 */
|
||
export interface StoreWarehouseConfirmSignData {
|
||
/** 确认模式标识,固定为 confirm */
|
||
mode: string
|
||
/** 签约关系精简对象 */
|
||
contract: StoreWarehouseConfirmSignContract
|
||
}
|
||
|
||
/** storeWarehouse.store.confirmSign 响应(含请求封装层) */
|
||
export interface StoreWarehouseConfirmSignResponse {
|
||
flag?: string
|
||
code?: number
|
||
message?: string
|
||
data?: StoreWarehouseConfirmSignData
|
||
}
|
||
|
||
/** 货主确认签约 */
|
||
export function storeWarehouseConfirmSign(
|
||
data: { id: number }
|
||
): Promise<StoreWarehouseConfirmSignResponse> {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.confirmSign',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
/** 解除或停用签约关系(仓库侧传 warehouse_use_status,货主侧传 store_use_status) */
|
||
export function storeWarehouseUnbind(data: {
|
||
id: number
|
||
warehouse_use_status?: number
|
||
store_use_status?: number
|
||
}) {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.unbind',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
/** 修改签约备注 */
|
||
export function storeWarehouseRename(data: {
|
||
id: number
|
||
remask: string
|
||
}) {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.rename',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
/** 读取签约策略配置 */
|
||
export function storeWarehouseGetPolicyConfig(data: {
|
||
id: number
|
||
}) {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.getPolicyConfig',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
/** storeWarehouse.store.getPolicyConfigFields 字段元信息项(对齐接口文档) */
|
||
export interface StorePolicyConfigFieldMeta {
|
||
key: string
|
||
name?: string
|
||
label?: string
|
||
/** flag=0/1 开关 / integer / number / string / enum / select 等 */
|
||
type?: string
|
||
default?: unknown
|
||
required?: boolean
|
||
description?: string
|
||
min?: number
|
||
max?: number
|
||
step?: number
|
||
precision?: number
|
||
maxLength?: number
|
||
options?: Array<{ label?: string; value?: unknown; [key: string]: unknown } | string | number | boolean>
|
||
}
|
||
|
||
/** storeWarehouse.store.getPolicyConfigFields 响应 */
|
||
export interface StorePolicyConfigFieldsResponse {
|
||
code?: number
|
||
message?: string
|
||
data?: StorePolicyConfigFieldMeta[]
|
||
}
|
||
|
||
/** storeWarehouse.store.savePolicyConfig 请求参数(policy_config 结构与接口文档对齐) */
|
||
export interface StoreSavePolicyConfigParams {
|
||
/** 签约关系ID(兼容 contract_id) */
|
||
id: number
|
||
/** 策略配置对象 */
|
||
policy_config: StorePolicyConfigPayload
|
||
}
|
||
|
||
/** policy_config 可配置字段(与 storeWarehouse.store.savePolicyConfig 文档一致) */
|
||
export interface StorePolicyConfigPayload {
|
||
receive_mode?: 'standard' | 'strict' | 'manual' | string
|
||
auto_allocate_bin?: number
|
||
auto_allocate_express?: number
|
||
auto_allocate_storage?: number
|
||
allow_mix_batch?: number
|
||
allow_temp_storage?: number
|
||
storage_separation?: number
|
||
/** 面单充值元/单,支持 2 位小数 */
|
||
print_recharge_price?: number
|
||
max_daily_inbound?: number
|
||
remark?: string
|
||
/** 面单自定义显示类型:1=隐藏,2=商品名称和数量,3=拣货库位和条码和数量,4=拣货库位和条码后5位和数量,5=拣货库位商品名称条码和数量 */
|
||
waybill_custom_display_type?: number
|
||
/** 是否启用外部快递编码(flag:0=关闭,1=开启;默认 0) */
|
||
enable_external_express_code?: number
|
||
/** 启用截单(flag:0=关闭,1=开启;默认 1) */
|
||
cutoff_order_enabled?: number
|
||
/** 截单时间,格式 HH:mm,默认 18:00,范围 00:00-23:59 */
|
||
cutoff_order_time?: string
|
||
/** 开始自动分配时间,格式 HH:mm,默认 08:00,范围 00:00-23:59 */
|
||
allocate_start_time?: string
|
||
/**
|
||
* 自然日开始时间(业务日分界点),格式 HH:mm,默认 06:00,范围 00:00-23:59。
|
||
* ⚠️ `getPolicyConfigFields` 已返回该字段元信息(本批新增);`savePolicyConfig` 文档未单列,
|
||
* 但 policy_config 为自由对象,按元信息提交即可
|
||
*/
|
||
day_start_time?: string
|
||
[key: string]: unknown
|
||
}
|
||
|
||
/** storeWarehouse.store.savePolicyConfig 响应(返回补齐默认值的 policy_config) */
|
||
export interface StoreSavePolicyConfigResponse {
|
||
code?: number
|
||
message?: string
|
||
data?: {
|
||
contract_id: number
|
||
policy_config: StorePolicyConfigPayload
|
||
}
|
||
}
|
||
|
||
/** 获取签约策略可配置字段元信息列表 */
|
||
export function storeWarehouseGetPolicyConfigFields(): Promise<StorePolicyConfigFieldsResponse> {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.getPolicyConfigFields',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data: {},
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
/** 保存签约策略配置(响应含补齐默认值的 policy_config) */
|
||
export function storeWarehouseSavePolicyConfig(data: StoreSavePolicyConfigParams): Promise<StoreSavePolicyConfigResponse> {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.savePolicyConfig',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
/**
|
||
* 设置签约关系下的面单目标余额(覆盖写入,非增减量)并记录变更日志。
|
||
* 兼容字段名:target_quantity / print_quantity / change_quantity / adjust_quantity,均解释为目标余额。
|
||
*/
|
||
export function storeWarehouseAdjustPrintQuantity(data: {
|
||
id: number
|
||
/** 目标面单余额(覆盖当前余额,非增减量) */
|
||
target_quantity: number
|
||
reason: string
|
||
business_type?: string
|
||
business_id?: number
|
||
}) {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.adjustPrintQuantity',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
/** 按 store_id 分页查询面单余额变更日志 */
|
||
export function storeWarehouseQueryPrintQuantityLogs(data: {
|
||
store_id: number | string
|
||
pagination?: {
|
||
page?: number
|
||
page_size?: number
|
||
}
|
||
where?: Record<string, any>
|
||
}) {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.queryPrintQuantityLogs',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
|
||
/** 查询签约关系下的奇门接口配置列表 */
|
||
export function listApiConfig(data: {
|
||
id: number
|
||
interface_type_id?: number
|
||
}) {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.listApiConfig',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
/** 保存接口配置(新增或更新)
|
||
* - app_name:必传,不再自动生成
|
||
* - QM_WMS 类型:须填写 qimen_app_key(ERP)/ qimen_warehouse_code
|
||
* - OPEN_API 类型:系统自动生成 self_app_key(WMS+32位HEX)和 self_app_secret(64位HEX),无需传入奇门字段
|
||
*/
|
||
export function saveApiConfig(data: {
|
||
id: number
|
||
interface_type_id: number
|
||
/** 应用名称(必传,不再自动生成) */
|
||
app_name: string
|
||
/** ERP AppKey(来自 index.getQimenAppList 下拉选择) */
|
||
qimen_app_key?: string
|
||
qimen_customer_id?: string
|
||
qimen_warehouse_code?: string
|
||
api_version?: string
|
||
contact_person?: string
|
||
contact_phone?: string
|
||
email?: string
|
||
is_enabled?: number
|
||
callback_url?: string
|
||
}) {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.saveApiConfig',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
/** 按 store_id 分页查询面单余额变更日志 */
|
||
export function queryPrintQuantityLogs(data: {
|
||
store_id: number | string
|
||
pagination?: { page?: number; page_size?: number }
|
||
}) {
|
||
const sid = Number(data.store_id)
|
||
if (!Number.isFinite(sid)) {
|
||
return Promise.reject(new Error('storeWarehouse.store.queryPrintQuantityLogs:store_id 无效'))
|
||
}
|
||
const body: Record<string, unknown> = { store_id: sid }
|
||
if (data.pagination && typeof data.pagination === 'object') {
|
||
body.pagination = data.pagination
|
||
}
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.queryPrintQuantityLogs',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data: body,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
/** 删除签约关系上的奇门接口配置 */
|
||
export function storeWarehouseDeleteQimenConfig(data: {
|
||
id: number
|
||
interface_type_id?: number
|
||
}) {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.deleteQimenConfig',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
/** 仓库代货主一键开户:同时完成账号注册、货主创建和仓库-货主签约 */
|
||
export function storeWarehouseOpenAccount(data: {
|
||
username: string
|
||
password?: string
|
||
real_name?: string
|
||
company_name: string
|
||
business_license?: string
|
||
contact_person: string
|
||
contact_phone?: string
|
||
legal_person?: string
|
||
contact_email?: string
|
||
address?: string
|
||
industry?: string
|
||
auth_start?: string
|
||
auth_end?: string
|
||
print_quantity?: number
|
||
apply_reason?: string
|
||
store_remask?: string
|
||
warehouse_remask?: string
|
||
}) {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.openAccount',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
/** storeWarehouse.store.createUser 响应 */
|
||
export type StoreWarehouseCreateUserResponse = {
|
||
/** 账号ID */
|
||
account_id: number
|
||
/** 用户名 */
|
||
username: string
|
||
/** 货主ID */
|
||
store_id: number
|
||
/** 是否本次新建账号;false 表示账号已存在仅完成授权 */
|
||
created: boolean
|
||
/** 仅 created=true 时返回:随机生成的初始明文密码(12 位,随机大小写字母/数字) */
|
||
password?: string
|
||
}
|
||
|
||
/**
|
||
* storeWarehouse.store.createUser:为货主创建用户。
|
||
* 按用户名查询平台账号,不存在则自动注册并随机生成 12 位密码返回;
|
||
* 两种情况统一完成货主工号绑定并授予货主管理员角色(wms_role.id=5),幂等。
|
||
*/
|
||
export function storeWarehouseCreateUser(data: {
|
||
/** 用户名,3-50 位字母、数字或下划线,全局唯一 */
|
||
username: string
|
||
/** 货主ID */
|
||
store_id: number
|
||
}): Promise<StoreWarehouseCreateUserResponse> {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.createUser',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
/** 提交面单余额变更日志导出任务 */
|
||
export function storeWarehouseExportPrintQuantityLogs(data: {
|
||
store_id: number | string
|
||
pagination?: { page?: number; page_size?: number }
|
||
where?: Record<string, any>
|
||
}) {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.exportPrintQuantityLogs',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
/** 查询面单余额变更日志导出任务进度 */
|
||
export function storeWarehouseExportPrintQuantityLogsTaskProgress(data: {
|
||
task_id: string
|
||
}) {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.exportPrintQuantityLogsTaskProgress',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
/** 按条件分页查询面单余额变更日志(货主维度,无需 store_id) */
|
||
export function storeWarehouseQueryStorePrintQuantityLogs(data: {
|
||
where?: Record<string, any>
|
||
pagination?: {
|
||
page?: number
|
||
page_size?: number
|
||
}
|
||
}) {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.queryStorePrintQuantityLogs',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
/** 提交面单余额变更日志导出任务(货主维度) */
|
||
export function storeWarehouseExportStorePrintQuantityLogs(data: {
|
||
where?: Record<string, any>
|
||
}) {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.exportStorePrintQuantityLogs',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
/** 查询面单余额变更日志导出任务进度(货主维度) */
|
||
export function storeWarehouseExportStorePrintQuantityLogsTaskProgress(data: {
|
||
task_id?: string
|
||
taskId?: string
|
||
}) {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.exportStorePrintQuantityLogsTaskProgress',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
// ============ storeWarehouse.store.export ============
|
||
|
||
/** storeWarehouse.store.export 请求参数(筛选条件与 storeWarehouse.store.list 一致;page/page_size 忽略,全量导出) */
|
||
export type StoreWarehouseExportParams = {
|
||
/** 签约备注或主体名称关键字(与 list 一致,模糊匹配 store_remask/warehouse_remask/双方 company_name) */
|
||
keyword?: string
|
||
/** 对方主体ID(兼容 store_id),导出时过滤指定货主 */
|
||
counterparty_id?: number
|
||
/** 货主ID(counterparty_id 的别名,两者传一即可) */
|
||
store_id?: number
|
||
/** 签约状态过滤:1=申请中 2=已通过 3=已拒绝 4=已解除 5=已过期 */
|
||
auth_status?: number
|
||
/** 启用状态过滤:0=禁用 1=启用(兼容 warehouse_use_status) */
|
||
use_status?: number
|
||
/** 仓库侧启用状态过滤(use_status 的别名,两者传一即可) */
|
||
warehouse_use_status?: number
|
||
/**
|
||
* 签约关系ID,兼容 contract_id/relation_id;导出时仅导出该签约关系
|
||
* ⚠️ 文档只声明 `number`(单条);页面「导出选中」多选时会传**数组**(前端扩展,未文档化)→ 待确认后端是否支持数组
|
||
*/
|
||
id?: number
|
||
}
|
||
|
||
/** storeWarehouse.store.export 响应(提交成功即返回任务受理信息) */
|
||
export type StoreWarehouseExportResponse = {
|
||
/** 任务ID(格式 store_relation_list_export_{storeId}_{timestamp}_{random}) */
|
||
task_id: string
|
||
/** 任务状态:submitted/running/success/failed/not_found(提交成功时为 submitted) */
|
||
status: string
|
||
/** 当前进度百分比(0-100),提交时返回 0 */
|
||
progress: number
|
||
/** 任务提示信息 */
|
||
message: string
|
||
/** 任务执行结果(提交时为 null;后台完成后为上传信息对象,含 filename/fileKey/url/cdnUrl/cosUrl/total_count) */
|
||
result: Record<string, unknown> | null
|
||
/** 失败时的错误信息(非失败时为空字符串) */
|
||
error: string
|
||
/** 任务更新时间(Unix 毫秒时间戳) */
|
||
update_time: number
|
||
code?: number
|
||
}
|
||
|
||
/** 提交货主签约列表导出任务(异步,全量导出,返回 task_id) */
|
||
export function storeWarehouseExport(
|
||
data: StoreWarehouseExportParams = {}
|
||
): Promise<StoreWarehouseExportResponse & { code?: number; data?: Partial<StoreWarehouseExportResponse> }> {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.export',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|
||
|
||
// ============ storeWarehouse.store.exportTaskProgress ============
|
||
|
||
/** storeWarehouse.store.exportTaskProgress 请求参数 */
|
||
export type StoreWarehouseExportTaskProgressParams = {
|
||
/** 任务ID(下划线写法,与 taskId 二选一) */
|
||
task_id?: string
|
||
/** 任务ID(驼峰写法,兼容) */
|
||
taskId?: string
|
||
}
|
||
|
||
/** storeWarehouse.store.exportTaskProgress 响应 */
|
||
export type StoreWarehouseExportTaskProgressResponse = {
|
||
/** 任务ID(缺失时为回显空字符串,status=not_found) */
|
||
task_id: string
|
||
/** 任务状态:submitted/running/success/failed/not_found */
|
||
status: string
|
||
/** 进度百分比(0-100) */
|
||
progress: number
|
||
/** 任务提示信息 */
|
||
message: string
|
||
/** 任务执行结果对象(完成后含 filename/fileKey/url/cdnUrl/cosUrl/total_count 等;未完成或 not_found 时为 null) */
|
||
result: Record<string, unknown> | null
|
||
/** 失败时的错误信息(非失败时为空字符串) */
|
||
error: string
|
||
/** 任务完成后下载链接(从 result.url/cdnUrl/cosUrl/fileKey 兜底取);未完成或不存在时为空字符串 */
|
||
download_url: string
|
||
/** 最近一次状态更新时间(Unix 毫秒时间戳) */
|
||
update_time: number
|
||
code?: number
|
||
}
|
||
|
||
/** 按 task_id 查询货主签约列表导出任务进度 */
|
||
export function storeWarehouseExportTaskProgress(
|
||
data: StoreWarehouseExportTaskProgressParams
|
||
): Promise<StoreWarehouseExportTaskProgressResponse & { code?: number; data?: Partial<StoreWarehouseExportTaskProgressResponse> }> {
|
||
return request({
|
||
url: '/system',
|
||
method: 'post',
|
||
params: {
|
||
method: 'storeWarehouse.store.exportTaskProgress',
|
||
v,
|
||
timestamp: new Date().getTime()
|
||
},
|
||
data,
|
||
isSystemApi: true
|
||
} as any)
|
||
}
|