From d5b8b0ca689773c0ab8a2f11ceb117709abe0d11 Mon Sep 17 00:00:00 2001 From: chenhao Date: Tue, 16 Dec 2025 18:42:34 +0800 Subject: [PATCH] =?UTF-8?q?feat(inventory):=20=E4=BF=AE=E6=94=B9=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=E4=B8=BAPOST?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E5=B9=B6=E4=BC=98=E5=8C=96=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将库存信息列表接口从GET改为POST请求 - 更新前端调用方式,使用data传递参数 - 优化后端空列表判断逻辑,避免无效查询 - 修复Vue组件中按钮事件参数传递问题 - 调整退回到货状态变更后的回调逻辑 - 更新本地开发环境后端接口地址配置 - 优化MyBatis XML中集合判空条件表达式 --- oms_web/oms_vue/src/api/inventory/delivery.js | 4 ++-- .../src/views/inventory/outer/components/OuterForm.vue | 6 ++++-- oms_web/oms_vue/src/views/inventory/outer/index.vue | 2 +- oms_web/oms_vue/vue.config.js | 2 +- .../sip/controller/vue/VueInventoryInfoController.java | 4 ++-- .../sip/service/impl/InventoryDeliveryServiceImpl.java | 3 +++ .../main/resources/mapper/inventory/InventoryInfoMapper.xml | 2 +- 7 files changed, 14 insertions(+), 9 deletions(-) diff --git a/oms_web/oms_vue/src/api/inventory/delivery.js b/oms_web/oms_vue/src/api/inventory/delivery.js index b43ced26..386017ad 100644 --- a/oms_web/oms_vue/src/api/inventory/delivery.js +++ b/oms_web/oms_vue/src/api/inventory/delivery.js @@ -74,8 +74,8 @@ export function exportDeliveryDetail(id) { export function listProductSn(query) { return request({ url: '/inventory/info/vue/list', - method: 'get', - params: query + method: 'post', + data: query }) } diff --git a/oms_web/oms_vue/src/views/inventory/outer/components/OuterForm.vue b/oms_web/oms_vue/src/views/inventory/outer/components/OuterForm.vue index 638830bd..4b2ae40e 100644 --- a/oms_web/oms_vue/src/views/inventory/outer/components/OuterForm.vue +++ b/oms_web/oms_vue/src/views/inventory/outer/components/OuterForm.vue @@ -82,7 +82,7 @@ @@ -117,6 +117,7 @@ export default { getOuter(id).then(response => { this.visible = true; this.form = response.data.inventoryOuter; + console.log(this.form) this.productList = response.data.productVoList || []; this.deliveryList = response.data.deliveryList || []; this.showReturn=this.deliveryList.length<=0; @@ -192,7 +193,8 @@ export default { return changeOuterStatus(row.id, status, row.orderCode); }).then(() => { this.$message.success(`${actionText}成功`); - this.getList(); + this.visible=false; + this.$emit('returnSuccess'); }).catch(() => {}); } } diff --git a/oms_web/oms_vue/src/views/inventory/outer/index.vue b/oms_web/oms_vue/src/views/inventory/outer/index.vue index fe3a8136..fd182bb0 100644 --- a/oms_web/oms_vue/src/views/inventory/outer/index.vue +++ b/oms_web/oms_vue/src/views/inventory/outer/index.vue @@ -72,7 +72,7 @@ - + diff --git a/oms_web/oms_vue/vue.config.js b/oms_web/oms_vue/vue.config.js index a87f08b0..5d29444a 100644 --- a/oms_web/oms_vue/vue.config.js +++ b/oms_web/oms_vue/vue.config.js @@ -9,7 +9,7 @@ const CompressionPlugin = require('compression-webpack-plugin') const name = process.env.VUE_APP_TITLE || 'UNISSENSE-OMS' // 网页标题 -const baseUrl = 'http://localhost:28080' // 后端接口 +const baseUrl = 'http://localhost:28081' // 后端接口 const port = process.env.port || process.env.npm_config_port || 80 // 端口 diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/controller/vue/VueInventoryInfoController.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/controller/vue/VueInventoryInfoController.java index c5986a14..1c4b884e 100644 --- a/ruoyi-sip/src/main/java/com/ruoyi/sip/controller/vue/VueInventoryInfoController.java +++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/controller/vue/VueInventoryInfoController.java @@ -71,9 +71,9 @@ public class VueInventoryInfoController extends BaseController { List list = productInfoService.listInventory(info); return getDataTable(list); } - @GetMapping("/list") + @PostMapping("/list") @ResponseBody - public TableDataInfo list(InventoryInfo inventoryInfo) + public TableDataInfo list(@RequestBody InventoryInfo inventoryInfo) { if (!inventoryAuthService.authAll()) { diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/InventoryDeliveryServiceImpl.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/InventoryDeliveryServiceImpl.java index 93079cac..4df26d17 100644 --- a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/InventoryDeliveryServiceImpl.java +++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/InventoryDeliveryServiceImpl.java @@ -241,6 +241,9 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService { public List getNumberInfo(ApiDataQueryDto dto) { List resultList = inventoryDeliveryMapper.listSn(dto); List orderCodeList = resultList.stream().map(DeliveryInfoVo::getOrderCode).collect(Collectors.toList()); + if (CollUtil.isEmpty(orderCodeList)){ + return Collections.emptyList(); + } // 根据订单ID查询合同信息 List projectProductInfos = projectProductInfoService.selectProjectProductInfoListByOrderCode(orderCodeList); diff --git a/ruoyi-sip/src/main/resources/mapper/inventory/InventoryInfoMapper.xml b/ruoyi-sip/src/main/resources/mapper/inventory/InventoryInfoMapper.xml index a3757aec..3bb6171e 100644 --- a/ruoyi-sip/src/main/resources/mapper/inventory/InventoryInfoMapper.xml +++ b/ruoyi-sip/src/main/resources/mapper/inventory/InventoryInfoMapper.xml @@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and t1.product_sn = #{productSn} - and t1.product_sn in + and t1.product_sn in #{item}