diff --git a/src/api/order.ts b/src/api/order.ts index 52e70b0..b07a3e4 100644 --- a/src/api/order.ts +++ b/src/api/order.ts @@ -393,3 +393,48 @@ export function sendPrint( options ) } + +/** + * 包材-关键字搜索(setting.packageMaterial.search) + * 按 material_code / material_name 模糊匹配,最多返回 50 条(仅启用中的包材)。 + * @param params.keyword 搜索关键字;为空时返回前 50 条启用中的包材 + * 响应:data[] 包材列表,每项:id(包材ID)、material_code、material_name、material_type、spec、status + */ +export function searchPackageMaterial( + params: { keyword?: string } = {}, + options?: RequestOptions +) { + return request( + 'setting.packageMaterial.search', + { + ...workerPayload, + ...params, + }, + options + ) +} + +/** + * 订单-按运单号绑定包材(order.bindExpressPackageMaterialByWaybill) + * 仅需传运单号与包材ID,系统根据运单号自动反查对应订单运单记录并绑定包材(无需订单ID)。 + * @param params.waybill_code 运单号,必填 + * @param params.package_material_id 包材ID,必填 + * 响应:data { order_id, waybill_code, package_material_id, package_material_name_snapshot, package_material_code } + * 错误:404 运单号不存在 / 400 包材不存在或已禁用 / 500 绑定失败 + */ +export function bindExpressPackageMaterialByWaybill( + params: { + waybill_code: string + package_material_id: number | string + }, + options?: RequestOptions +) { + return request( + 'order.bindExpressPackageMaterialByWaybill', + { + ...workerPayload, + ...params, + }, + options + ) +} diff --git a/src/pages/order/index.vue b/src/pages/order/index.vue index bf04f43..45fbbbb 100644 --- a/src/pages/order/index.vue +++ b/src/pages/order/index.vue @@ -91,6 +91,7 @@ + - + + - - - {{ selectedReviewProcess || '复核流程' }} - - - - - - - - - - {{ selectedWeigh || '是否称重' }} - - - - - - - 拣货人:{{ pickerName || '-' }} 货主:{{ storeRemark || '-' }} 波次:{{ selectedWaveNo || '-' }} @@ -165,6 +129,11 @@