From 24c51045a6627763e6fef32d7eb40459df9a3218 Mon Sep 17 00:00:00 2001 From: "zangch@mesnac.com" Date: Fri, 5 Sep 2025 09:06:39 +0800 Subject: [PATCH] =?UTF-8?q?feat(wms):=20=E6=96=B0=E5=A2=9E=E8=B0=83?= =?UTF-8?q?=E6=8B=A8=E6=89=93=E5=8D=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加调拨打印相关的 API 接口和方法 - 实现调拨打印列表、详情、新增、修改、删除等功能 - 添加调拨打印相关的数据结构和类型定义 - 优化调拨任务列表的展示和操作 --- src/api/wms/linkage/index.ts | 64 ++++ src/api/wms/wmsAllocateTask/index.ts | 77 +++++ src/api/wms/wmsAllocateTask/types.ts | 256 +++++++++++++++ src/views/wms/wmsAllocateTask/index.vue | 394 ++++++++++++++++++++++++ 4 files changed, 791 insertions(+) create mode 100644 src/api/wms/wmsAllocateTask/index.ts create mode 100644 src/api/wms/wmsAllocateTask/types.ts create mode 100644 src/views/wms/wmsAllocateTask/index.vue diff --git a/src/api/wms/linkage/index.ts b/src/api/wms/linkage/index.ts index 4d23130..cf48c3c 100644 --- a/src/api/wms/linkage/index.ts +++ b/src/api/wms/linkage/index.ts @@ -1,6 +1,7 @@ import request from '@/utils/request'; + export const allocateOrderlList = (query) => { return request({ url: '/wms/allocateOrder/list', @@ -83,3 +84,66 @@ export const delAllocateOrderDetail = (aoDId) => { method: 'delete' }); }; + + +/*以下为新增测试*/ + +// 调拨分包打印 +export const allocatePackagePrint = (data) => { + return request({ + url: '/wms/wmsAllocateTask/packagePrint', + method: 'post', + data + }); +}; + +// 根据调拨明细ID查询任务列表 +export const queryTasksByDetailId = (aoDId) => { + return request({ + url: '/wms/wmsAllocateTask/queryTasksByDetailId/' + aoDId, + method: 'get' + }); +}; + +// 验证是否可打印(基于业务逻辑的前端验证) +export const validatePrintable = (data) => { + return request({ + url: '/wms/wmsAllocateTask/validatePrintable', + method: 'post', + data + }); +}; + +// 触发打印条码 +export const triggerPrint = (allocateTaskId) => { + return request({ + url: '/wms/wmsAllocateTask/triggerPrint/' + allocateTaskId, + method: 'post' + }); +}; + +// 重新创建调拨任务 +export const recreateAllocateTasks = (data) => { + return request({ + url: '/wms/wmsAllocateTask/recreateTasks', + method: 'post', + data + }); +}; + +// 更新调拨任务条码 +export const updateTaskBarcode = (data) => { + return request({ + url: '/wms/wmsAllocateTask/updateBarcode', + method: 'put', + data + }); +}; + +// 根据调拨明细ID删除所有任务 +export const deleteTasksByDetailId = (aoDId) => { + return request({ + url: '/wms/wmsAllocateTask/deleteTasksByDetailId/' + aoDId, + method: 'delete' + }); +}; diff --git a/src/api/wms/wmsAllocateTask/index.ts b/src/api/wms/wmsAllocateTask/index.ts new file mode 100644 index 0000000..d91ae99 --- /dev/null +++ b/src/api/wms/wmsAllocateTask/index.ts @@ -0,0 +1,77 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { WmsAllocateTaskVO, WmsAllocateTaskForm, WmsAllocateTaskQuery } from '@/api/wms/wmsAllocateTask/types'; + +/** + * 查询调拨打印列表 + * @param query + * @returns {*} + */ + +export const listWmsAllocateTask = (query?: WmsAllocateTaskQuery): AxiosPromise => { + return request({ + url: '/wms/wmsAllocateTask/list', + method: 'get', + params: query + }); +}; + +/** + * 查询调拨打印详细 + * @param allocateTaskId + */ +export const getWmsAllocateTask = (allocateTaskId: string | number): AxiosPromise => { + return request({ + url: '/wms/wmsAllocateTask/' + allocateTaskId, + method: 'get' + }); +}; + +/** + * 新增调拨打印 + * @param data + */ +export const addWmsAllocateTask = (data: WmsAllocateTaskForm) => { + return request({ + url: '/wms/wmsAllocateTask', + method: 'post', + data: data + }); +}; + +/** + * 修改调拨打印 + * @param data + */ +export const updateWmsAllocateTask = (data: WmsAllocateTaskForm) => { + return request({ + url: '/wms/wmsAllocateTask', + method: 'put', + data: data + }); +}; + +/** + * 删除调拨打印 + * @param allocateTaskId + */ +export const delWmsAllocateTask = (allocateTaskId: string | number | Array) => { + return request({ + url: '/wms/wmsAllocateTask/' + allocateTaskId, + method: 'delete' + }); +}; + + +/** + * 下拉框查询调拨打印列表 + * @param query + * @returns {*} + */ +export function getWmsAllocateTaskList (query) { + return request({ + url: '/wms/wmsAllocateTask/getWmsAllocateTaskList', + method: 'get', + params: query + }); +}; diff --git a/src/api/wms/wmsAllocateTask/types.ts b/src/api/wms/wmsAllocateTask/types.ts new file mode 100644 index 0000000..c55850b --- /dev/null +++ b/src/api/wms/wmsAllocateTask/types.ts @@ -0,0 +1,256 @@ +export interface WmsAllocateTaskVO { + /** + * 调拨任务表主键 + */ + allocateTaskId: string | number; + + /** + * 单号 + */ + allocateCode: string; + + /** + * 批次码 + */ + batchCode: string; + + /** + * 条码数量 + */ + materialQty: number; + + /** + * 分包数量 + */ + apportionQty: number; + + /** + * 物料id + */ + materialId: string | number; + + /** + * 物料编码 + */ + materialCode: string; + + /** + * 物料名称 + */ + materialName: string; + + /** + * 物料规格 + */ + materialSpe: string; + + /** + * 计量单位名称 + */ + unitName: string; + + /** + * 是否有条码 + */ + codeYesNo: string; + + /** + * 物料大类 + */ + materialCategories: string; + + /** + * 推荐库位id + */ + locationId: string | number; + + /** + * 入库状态(0-待入库,1-已入库,2-入库中) + */ + inboundStatus: string; + + /** + * 实际入库时间 + */ + actualInboundTime: string; + + /** + * 子表id + */ + aoDId: string | number; + +} + +export interface WmsAllocateTaskForm extends BaseEntity { + /** + * 调拨任务表主键 + */ + allocateTaskId?: string | number; + + /** + * 单号 + */ + allocateCode?: string; + + /** + * 批次码 + */ + batchCode?: string; + + /** + * 条码数量 + */ + materialQty?: number; + + /** + * 分包数量 + */ + apportionQty?: number; + + /** + * 物料id + */ + materialId?: string | number; + + /** + * 物料编码 + */ + materialCode?: string; + + /** + * 物料名称 + */ + materialName?: string; + + /** + * 物料规格 + */ + materialSpe?: string; + + /** + * 计量单位名称 + */ + unitName?: string; + + /** + * 是否有条码 + */ + codeYesNo?: string; + + /** + * 物料大类 + */ + materialCategories?: string; + + /** + * 推荐库位id + */ + locationId?: string | number; + + /** + * 入库状态(0-待入库,1-已入库,2-入库中) + */ + inboundStatus?: string; + + /** + * 实际入库时间 + */ + actualInboundTime?: string; + + /** + * 子表id + */ + aoDId?: string | number; + +} + +export interface WmsAllocateTaskQuery extends PageQuery { + + /** + * 调拨任务表主键 + */ + allocateTaskId?: string | number; + + /** + * 单号 + */ + allocateCode?: string; + + /** + * 批次码 + */ + batchCode?: string; + + /** + * 条码数量 + */ + materialQty?: number; + + /** + * 分包数量 + */ + apportionQty?: number; + + /** + * 物料id + */ + materialId?: string | number; + + /** + * 物料编码 + */ + materialCode?: string; + + /** + * 物料名称 + */ + materialName?: string; + + /** + * 物料规格 + */ + materialSpe?: string; + + /** + * 计量单位名称 + */ + unitName?: string; + + /** + * 是否有条码 + */ + codeYesNo?: string; + + /** + * 物料大类 + */ + materialCategories?: string; + + /** + * 推荐库位id + */ + locationId?: string | number; + + /** + * 入库状态(0-待入库,1-已入库,2-入库中) + */ + inboundStatus?: string; + + /** + * 实际入库时间 + */ + actualInboundTime?: string; + + /** + * 子表id + */ + aoDId?: string | number; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/views/wms/wmsAllocateTask/index.vue b/src/views/wms/wmsAllocateTask/index.vue new file mode 100644 index 0000000..fc53e96 --- /dev/null +++ b/src/views/wms/wmsAllocateTask/index.vue @@ -0,0 +1,394 @@ + + +