From 23a746e26a158ccac4f4bf2580fd00d624ef6047 Mon Sep 17 00:00:00 2001 From: zm2000 <18386612143@163.com> Date: Thu, 3 Sep 2026 17:59:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A2=E5=8D=95=E5=A4=8D?= =?UTF-8?q?=E6=A0=B8=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/order.ts | 45 ++ src/pages/order/index.vue | 889 ++++++++++++++++++++++++++++++++++---- 2 files changed, 846 insertions(+), 88 deletions(-) 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 @@