From ecff189fe27b2c845103005abae9e6a695468da2 Mon Sep 17 00:00:00 2001 From: chenhao Date: Thu, 30 Oct 2025 09:07:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(inventory):=20=E6=B7=BB=E5=8A=A0=E5=8F=91?= =?UTF-8?q?=E8=B4=A7=E8=AF=A6=E6=83=85=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除了 edit.html 中的调试代码 debugger - 新增 InventoryDeliveryDetailExcelDto 类用于发货详情数据导出 - 在 InventoryDeliveryController 中增加了发货详情导出接口 /detail/export- 实现了 InventoryDeliveryServiceImpl 中的 detailExport 方法以支持详情导出逻辑 - 扩展了 InventoryInfoMapper 和对应的 XML 文件,新增 listByProductSnList 查询方法 - 修改了 InventoryOuterMapper.xml,增加对 projectCode 和 projectName 的查询条件支持 - 在前端页面 outer.html 中添加了项目编号、合同编号及项目名称的搜索框 - 在 view.html 页面中加入了导出按钮并实现对应的 JavaScript 导出函数- 为订单财务页面 orderFinance.html 添加了完结状态字段显示 --- .../templates/inventory/delivery/view.html | 23 +++++++- .../templates/inventory/outer/edit.html | 1 - .../templates/inventory/outer/outer.html | 12 +++++ .../templates/project/order/orderFinance.html | 8 +++ .../InventoryDeliveryController.java | 12 ++++- .../InventoryDeliveryDetailExcelDto.java | 52 +++++++++++++++++++ .../ruoyi/sip/mapper/InventoryInfoMapper.java | 2 + .../service/IInventoryDeliveryService.java | 2 + .../impl/InventoryDeliveryServiceImpl.java | 28 ++++++++++ .../impl/InventoryInfoServiceImpl.java | 2 +- .../mapper/inventory/InventoryInfoMapper.xml | 7 +++ .../mapper/inventory/InventoryOuterMapper.xml | 2 + 12 files changed, 147 insertions(+), 4 deletions(-) create mode 100644 ruoyi-sip/src/main/java/com/ruoyi/sip/dto/inventory/InventoryDeliveryDetailExcelDto.java diff --git a/ruoyi-admin/src/main/resources/templates/inventory/delivery/view.html b/ruoyi-admin/src/main/resources/templates/inventory/delivery/view.html index ee662e91..4ae93b76 100644 --- a/ruoyi-admin/src/main/resources/templates/inventory/delivery/view.html +++ b/ruoyi-admin/src/main/resources/templates/inventory/delivery/view.html @@ -1,5 +1,5 @@ - + @@ -72,6 +72,11 @@ +
@@ -91,6 +96,22 @@ focusCleanup: true }); + function exportDetail() { + let data={ + id: [[${inventoryDelivery.id}]] + } + $.modal.loading("正在导出数据,请稍候..."); + $.post(prefix+"/detail/export", data, function (result) { + if (result.code == web_status.SUCCESS) { + window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true; + } else if (result.code == web_status.WARNING) { + $.modal.alertWarning(result.msg) + } else { + $.modal.alertError(result.msg); + } + $.modal.closeLoading(); + }); + } function submitHandler() { if ($.validate.form()) { $.operate.save(prefix + "/edit", $('#form-delivery-edit').serialize()); diff --git a/ruoyi-admin/src/main/resources/templates/inventory/outer/edit.html b/ruoyi-admin/src/main/resources/templates/inventory/outer/edit.html index 834062ee..14785e37 100644 --- a/ruoyi-admin/src/main/resources/templates/inventory/outer/edit.html +++ b/ruoyi-admin/src/main/resources/templates/inventory/outer/edit.html @@ -475,7 +475,6 @@ return; } let arrays = [] - debugger if (productSnData.length <= 0) { arrays = $.table.selectColumns("productSn"); // if (arrays.length != quantity) { diff --git a/ruoyi-admin/src/main/resources/templates/inventory/outer/outer.html b/ruoyi-admin/src/main/resources/templates/inventory/outer/outer.html index e0b0f59f..eb493ecd 100644 --- a/ruoyi-admin/src/main/resources/templates/inventory/outer/outer.html +++ b/ruoyi-admin/src/main/resources/templates/inventory/outer/outer.html @@ -14,6 +14,18 @@ +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • + diff --git a/ruoyi-sip/src/main/resources/mapper/inventory/InventoryOuterMapper.xml b/ruoyi-sip/src/main/resources/mapper/inventory/InventoryOuterMapper.xml index 7d022265..de1ce0d7 100644 --- a/ruoyi-sip/src/main/resources/mapper/inventory/InventoryOuterMapper.xml +++ b/ruoyi-sip/src/main/resources/mapper/inventory/InventoryOuterMapper.xml @@ -83,6 +83,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and t1.quantity = #{quantity} + and t4.project_code = #{projectCode} + and t4.project_name like concat('%' ,#{projectName},'%') and t1.outer_status = #{outerStatus} and t1.outer_status in