From 9115f035333fa47123e5c1a6583d7456c13827f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AD=A3=E6=98=93?= Date: Sun, 24 Aug 2025 18:23:14 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=87=BA=E5=BA=93=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9EPDA=E5=87=BA=E5=BA=93=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增出库单列表、出库计划清单和成品出库页面 添加防抖函数工具和PDA出库相关API接口 重构出库逻辑,支持按计划批次出库和严格校验 优化扫码录入和出库操作流程,增加计划完成状态显示 --- api/warehouse/pdaOutbound.js | 89 ++ components/pda-scan-input/index.vue | 2 + pages.json | 23 +- pages/index/index.vue | 42 +- pages/outWarehouse/components/CustomPopup.vue | 74 +- pages/outWarehouse/outWarehouse.vue | 10 +- pages/outWarehouse/outWarehouseV2.vue | 878 ++++++++++++++++++ .../outboundList/outboundList.vue | 304 ++++++ .../outboundPlanList/outboundPlanList.vue | 333 +++++++ .../inbound/finished-product-inbound.svg | 1 - .../inbound/no-validation-inbound.svg | 1 - .../index-icons/inbound/paint-inbound.svg | 1 - .../inbound/rough-casting-inbound.svg | 1 - .../inbound/spare-parts-inbound.svg | 1 - utils/debounce.js | 27 + 15 files changed, 1725 insertions(+), 62 deletions(-) create mode 100644 api/warehouse/pdaOutbound.js create mode 100644 pages/outWarehouse/outWarehouseV2.vue create mode 100644 pages/outWarehouse/outboundList/outboundList.vue create mode 100644 pages/outWarehouse/outboundPlanList/outboundPlanList.vue delete mode 100644 static/images/index-icons/inbound/finished-product-inbound.svg delete mode 100644 static/images/index-icons/inbound/no-validation-inbound.svg delete mode 100644 static/images/index-icons/inbound/paint-inbound.svg delete mode 100644 static/images/index-icons/inbound/rough-casting-inbound.svg delete mode 100644 static/images/index-icons/inbound/spare-parts-inbound.svg create mode 100644 utils/debounce.js diff --git a/api/warehouse/pdaOutbound.js b/api/warehouse/pdaOutbound.js new file mode 100644 index 0000000..acce43c --- /dev/null +++ b/api/warehouse/pdaOutbound.js @@ -0,0 +1,89 @@ +import request from '@/utils/request' + +// PDA出库接口 + +/** + * (PDA出库)获取出库单列表【出库中,已完成】 + * @param {WmPDAOutOrderPageQueryDto} params 查询参数 + */ +export function getPdaOutOrderPageList(params) { + return request({ + url: '/mes/wms/pdaOutbound/GetPdaOutOrderPageList', + method: 'get', + params + }) +} + +/** + * (PDA出库)获取出库计划列表 + * @param {WmPDAOutOrderPlanPageQueryDto} params 查询参数 + */ +export function getPdaOutOrderPlanPageList(params) { + return request({ + url: '/mes/wms/pdaOutbound/GetPdaOutOrderPlanPageList', + method: 'get', + params + }) +} + +/** + * (PDA出库)获取出库计划中所包含的物料的清单 + * @param {string} shipmentNum 出库单号 + */ +export function getPdaOutOrderPlanOptions(shipmentNum) { + return request({ + url: '/mes/wms/pdaOutbound/GetPdaOutOrderPlanOptions', + method: 'get', + params: { shipmentNum } + }) +} + +/** + * (PDA出库)获取出库计划中某物料实际库存变动信息 + * @param {string} shipmentNum 出库单号 + * @param {string} materialCode 物料号 + * @param {string} batchCode 批次号 + */ +export function getPdaOutOrderPlanActualData(shipmentNum, materialCode, batchCode) { + return request({ + url: '/mes/wms/pdaOutbound/GetPdaOutOrderPlanActualData', + method: 'get', + params: { shipmentNum, materialCode, batchCode } + }) +} + +/** + * (PDA出库)更新出库计划 + * @param {string} shipmentNum 出库单号 + */ +export function updatePdaOutOrderPlan(shipmentNum) { + return request({ + url: '/mes/wms/pdaOutbound/UpdatePdaOutOrderPlan', + method: 'post', + params: { shipmentNum } + }) +} + +/** + * (PDA出库)根据出库计划出库 返回 ok 成功,其余都是异常 + * @param {WmPDAOutboundDto} data 出库信息 + */ +export function pdaOutboundByOutOrderPlan(data) { + return request({ + url: '/mes/wms/pdaOutbound/PdaOutboundByOutOrderPlan', + method: 'post', + data + }) +} + +/** + * (PDA出库)出库单完成 + * @param {string} shipmentNum 出库单号 + */ +export function completeOutOrder(shipmentNum) { + return request({ + url: '/mes/wms/pdaOutbound/CompleteOutOrder', + method: 'post', + params: { shipmentNum } + }) +} \ No newline at end of file diff --git a/components/pda-scan-input/index.vue b/components/pda-scan-input/index.vue index 9b03657..2aff037 100644 --- a/components/pda-scan-input/index.vue +++ b/components/pda-scan-input/index.vue @@ -87,6 +87,8 @@ await this.handleScanDeliveryOrderCode(text); } else if (type === 4) { await this.handleScanStockReturnCode(text); + } else{ + this.emitInputChange(text, 0); } this.$nextTick(function() { this.search = ''; diff --git a/pages.json b/pages.json index 0a54f03..b9347f7 100644 --- a/pages.json +++ b/pages.json @@ -45,7 +45,7 @@ { "path": "pages/inWarehouse/inWarehouse", "style": { - "navigationBarTitleText": "入库", + "navigationBarTitleText": "成品入库", "enablePullDownRefresh": false } }, @@ -55,6 +55,13 @@ "navigationBarTitleText": "出库", "enablePullDownRefresh": false } + }, + { + "path": "pages/outWarehouse/outWarehouseV2", + "style": { + "navigationBarTitleText": "成品出库", + "enablePullDownRefresh": false + } }, { "path": "pages/stocktake/stocktake", @@ -250,6 +257,20 @@ { "navigationBarTitleText" : "AGV全点位移动" } + }, + { + "path" : "pages/outWarehouse/outboundList/outboundList", + "style" : + { + "navigationBarTitleText" : "出库清单" + } + }, + { + "path" : "pages/outWarehouse/outboundPlanList/outboundPlanList", + "style" : + { + "navigationBarTitleText" : "出库计划" + } } ] diff --git a/pages/index/index.vue b/pages/index/index.vue index cbcc500..ce87428 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -4,24 +4,14 @@ {{ getSectionTitle(type) }} - - + + {{ item.name }} - + @@ -80,6 +70,13 @@ export default { type: 2, index: 5 }, + { + name: '出库单', + icon: 'outbound/finished-product-outbound', + url: '/pages/outWarehouse/outboundList/outboundList', + type: 2, + index: 16 + }, { name: '无校验出库', icon: 'outbound/no-outbound-order', @@ -159,12 +156,21 @@ export default { 'GetInfo' ]), gridCheck(url) { + if (url === '') { return; } - uni.navigateTo({ - url - }); + try { + uni.navigateTo({ + url + }); + } catch (error) { + uni.showToast({ + title: '页面不存在', + icon: 'none' + }); + } + }, getSectionTitle(type) { const titles = ['', '入库', '出库', '库存管理', '库内管理']; diff --git a/pages/outWarehouse/components/CustomPopup.vue b/pages/outWarehouse/components/CustomPopup.vue index 9559600..bd80cef 100644 --- a/pages/outWarehouse/components/CustomPopup.vue +++ b/pages/outWarehouse/components/CustomPopup.vue @@ -1,12 +1,12 @@ + + \ No newline at end of file diff --git a/pages/outWarehouse/outboundList/outboundList.vue b/pages/outWarehouse/outboundList/outboundList.vue new file mode 100644 index 0000000..0f18244 --- /dev/null +++ b/pages/outWarehouse/outboundList/outboundList.vue @@ -0,0 +1,304 @@ + + + + + diff --git a/pages/outWarehouse/outboundPlanList/outboundPlanList.vue b/pages/outWarehouse/outboundPlanList/outboundPlanList.vue new file mode 100644 index 0000000..af73f3d --- /dev/null +++ b/pages/outWarehouse/outboundPlanList/outboundPlanList.vue @@ -0,0 +1,333 @@ + + + + + diff --git a/static/images/index-icons/inbound/finished-product-inbound.svg b/static/images/index-icons/inbound/finished-product-inbound.svg deleted file mode 100644 index fbee774..0000000 --- a/static/images/index-icons/inbound/finished-product-inbound.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/static/images/index-icons/inbound/no-validation-inbound.svg b/static/images/index-icons/inbound/no-validation-inbound.svg deleted file mode 100644 index ef52cd4..0000000 --- a/static/images/index-icons/inbound/no-validation-inbound.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/static/images/index-icons/inbound/paint-inbound.svg b/static/images/index-icons/inbound/paint-inbound.svg deleted file mode 100644 index 91cff99..0000000 --- a/static/images/index-icons/inbound/paint-inbound.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/static/images/index-icons/inbound/rough-casting-inbound.svg b/static/images/index-icons/inbound/rough-casting-inbound.svg deleted file mode 100644 index aa9257f..0000000 --- a/static/images/index-icons/inbound/rough-casting-inbound.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/static/images/index-icons/inbound/spare-parts-inbound.svg b/static/images/index-icons/inbound/spare-parts-inbound.svg deleted file mode 100644 index 9d4a3de..0000000 --- a/static/images/index-icons/inbound/spare-parts-inbound.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/utils/debounce.js b/utils/debounce.js new file mode 100644 index 0000000..6c3ef8a --- /dev/null +++ b/utils/debounce.js @@ -0,0 +1,27 @@ +/** + * 防抖函数 + * @param {Function} func - 需要防抖的函数 + * @param {number} wait - 延迟时间,单位毫秒 + * @param {boolean} immediate - 是否立即执行 + * @returns {Function} - 防抖后的函数 + */ +export function debounce(func, wait, immediate = false) { + let timeout; + + return function executedFunction(...args) { + const later = () => { + timeout = null; + if (!immediate) func.apply(this, args); + }; + + const callNow = immediate && !timeout; + + clearTimeout(timeout); + + timeout = setTimeout(later, wait); + + if (callNow) func.apply(this, args); + }; +} + +export default debounce; \ No newline at end of file