From ba6ef4b46a4f5c8289d2944d9806a8cc636f2072 Mon Sep 17 00:00:00 2001 From: icewint Date: Wed, 21 Aug 2024 17:05:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/TOngoodsshelfController.java | 2 + .../controller/system/SysIndexController.java | 6 ++ .../business/ongoodsshelf/ongoodsshelf.html | 55 +++++++++++++++++-- .../business/ongoodsshelf/ongoodsshelf.html | 55 +++++++++++++++++-- .../classes/mapper/TBaseProviderMapper.xml | 6 ++ 5 files changed, 114 insertions(+), 10 deletions(-) create mode 100644 wms-business/target/classes/mapper/TBaseProviderMapper.xml diff --git a/wms-admin/src/main/java/com/ruoyi/web/controller/business/TOngoodsshelfController.java b/wms-admin/src/main/java/com/ruoyi/web/controller/business/TOngoodsshelfController.java index 2213ae9..78b6682 100644 --- a/wms-admin/src/main/java/com/ruoyi/web/controller/business/TOngoodsshelfController.java +++ b/wms-admin/src/main/java/com/ruoyi/web/controller/business/TOngoodsshelfController.java @@ -81,6 +81,7 @@ public class TOngoodsshelfController extends BaseController @Autowired private ITBaseProviderService tBaseProviderService; + @RequiresPermissions("business:ongoodsshelf:view") @GetMapping() public String ongoodsshelf(ModelMap mmap) @@ -91,6 +92,7 @@ public class TOngoodsshelfController extends BaseController // 获取供应商 List providers = tBaseProviderService.list(); mmap.put("providers", providers); + return prefix + "/ongoodsshelf"; } diff --git a/wms-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java b/wms-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java index 4ffa74a..577d29f 100644 --- a/wms-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java +++ b/wms-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java @@ -5,6 +5,8 @@ import java.util.List; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletResponse; +import com.ruoyi.business.domain.TBaseProvider; +import com.ruoyi.business.service.ITBaseProviderService; import com.ruoyi.common.enums.LoginType; import com.ruoyi.common.utils.*; import com.ruoyi.framework.shiro.UserToken; @@ -46,6 +48,9 @@ public class SysIndexController extends BaseController @Autowired private SysPasswordService passwordService; + + @Autowired + private ITBaseProviderService tBaseProviderService; // 系统首页 @GetMapping("/index") public String index(ModelMap mmap) @@ -135,6 +140,7 @@ public class SysIndexController extends BaseController SysUser sysUser = ShiroUtils.getCurrentUser(); mmap.put("sysUser", sysUser); mmap.put("version", RuoYiConfig.getVersion()); + // return "business/ongoodsshelf/ongoodsshelf"; return "business/ongoodsshelf/ongoodsshelf"; } diff --git a/wms-admin/src/main/resources/templates/business/ongoodsshelf/ongoodsshelf.html b/wms-admin/src/main/resources/templates/business/ongoodsshelf/ongoodsshelf.html index cfd1a74..9b28e05 100644 --- a/wms-admin/src/main/resources/templates/business/ongoodsshelf/ongoodsshelf.html +++ b/wms-admin/src/main/resources/templates/business/ongoodsshelf/ongoodsshelf.html @@ -40,7 +40,7 @@
当前作业任务
-
+
@@ -51,11 +51,10 @@
- - - + +
@@ -425,7 +424,53 @@ } }); } + // 开始入库 + function startInBtn() { + $.post({ + url: ctx + "business/ongoodsshelf/startIn", + data: JSON.stringify({ + providerId: $("#providerInSelect").val(), + }), + dataType: "json", + contentType: "application/json", + success: function (data) { + if(data.code === 0) { + $("#inStatus").text("正在入库") + $.modal.msgSuccess("开始入库成功:" + data.msg); + } else { + $.modal.msgError("开始入库失败:" + data.msg); + } + }, + error: function (data) { + $.modal.msgError("开始入库失败:" + data.msg); + } + }); + } + + // 结束入库 + function stopInBtn() { + $.post({ + url: ctx + "business/ongoodsshelf/stopIn", + data: JSON.stringify({ + providerId: $("#providerInSelect").val(), + }), + dataType: "json", + contentType: "application/json", + success: function (data) { + if(data.code === 0) { + $("#inStatus").text("请选择供应商") + $.modal.msgSuccess("结束入库成功:" + data.msg); + } else { + $.modal.msgError("结束入库失败:" + data.msg); + } + + }, + error: function (data) { + $.modal.msgError("结束入库失败:" + data.msg); + } + }); + } // ERP入库 function scanFunctionProviderIn() { let keycode = event.keyCode; diff --git a/wms-admin/target/classes/templates/business/ongoodsshelf/ongoodsshelf.html b/wms-admin/target/classes/templates/business/ongoodsshelf/ongoodsshelf.html index cfd1a74..9b28e05 100644 --- a/wms-admin/target/classes/templates/business/ongoodsshelf/ongoodsshelf.html +++ b/wms-admin/target/classes/templates/business/ongoodsshelf/ongoodsshelf.html @@ -40,7 +40,7 @@
当前作业任务
-
+
@@ -51,11 +51,10 @@
- - - + +
@@ -425,7 +424,53 @@ } }); } + // 开始入库 + function startInBtn() { + $.post({ + url: ctx + "business/ongoodsshelf/startIn", + data: JSON.stringify({ + providerId: $("#providerInSelect").val(), + }), + dataType: "json", + contentType: "application/json", + success: function (data) { + if(data.code === 0) { + $("#inStatus").text("正在入库") + $.modal.msgSuccess("开始入库成功:" + data.msg); + } else { + $.modal.msgError("开始入库失败:" + data.msg); + } + }, + error: function (data) { + $.modal.msgError("开始入库失败:" + data.msg); + } + }); + } + + // 结束入库 + function stopInBtn() { + $.post({ + url: ctx + "business/ongoodsshelf/stopIn", + data: JSON.stringify({ + providerId: $("#providerInSelect").val(), + }), + dataType: "json", + contentType: "application/json", + success: function (data) { + if(data.code === 0) { + $("#inStatus").text("请选择供应商") + $.modal.msgSuccess("结束入库成功:" + data.msg); + } else { + $.modal.msgError("结束入库失败:" + data.msg); + } + + }, + error: function (data) { + $.modal.msgError("结束入库失败:" + data.msg); + } + }); + } // ERP入库 function scanFunctionProviderIn() { let keycode = event.keyCode; diff --git a/wms-business/target/classes/mapper/TBaseProviderMapper.xml b/wms-business/target/classes/mapper/TBaseProviderMapper.xml new file mode 100644 index 0000000..c5dbd3e --- /dev/null +++ b/wms-business/target/classes/mapper/TBaseProviderMapper.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file