From 258ee495b1a611cef0bf69ccd156def1007a6c8a Mon Sep 17 00:00:00 2001 From: chenhao <852066789@qq.com> Date: Fri, 15 Aug 2025 09:08:33 +0800 Subject: [PATCH] =?UTF-8?q?feat(inventory):=20=E6=B7=BB=E5=8A=A0=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E6=9D=83=E9=99=90=E6=8E=A7=E5=88=B6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 IInventoryAuthService 接口及实现类,用于获取当前用户权限范围内的制造商、产品编码和仓库信息 - 在 InventoryDelivery 和 InventoryInfo 类中添加 productCodeList 字段,用于存储权限范围内的产品编码列表 - 修改 InventoryDeliveryController 和 InventoryExecutionController,增加权限控制逻辑 - 更新相关模板文件,调整UI布局和显示逻辑以适应新功能 --- .../src/main/resources/application.yml | 6 +- .../templates/inventory/execution/edit.html | 54 ++--- .../templates/inventory/execution/track.html | 68 +++++- .../templates/inventory/info/info.html | 34 +-- .../templates/inventory/info/outerLog.html | 91 ++++++++ .../templates/inventory/inner/add.html | 10 +- .../templates/inventory/inner/inner.html | 2 +- .../templates/inventory/outer/edit.html | 108 +++++----- .../templates/inventory/outer/outer.html | 4 +- .../templates/project/order/edit.html | 7 +- .../templates/system/partner/add.html | 14 +- .../templates/system/partner/edit.html | 14 +- .../templates/system/partner/partner.html | 9 + .../templates/warehouse/info/add.html | 9 +- .../templates/warehouse/info/edit.html | 10 - .../templates/warehouse/info/info.html | 9 +- .../InventoryDeliveryController.java | 16 +- .../InventoryExecutionController.java | 13 +- .../controller/InventoryInfoController.java | 36 +++- .../controller/InventoryOuterController.java | 60 +++++- .../OmsInventoryInnerController.java | 18 +- .../OmsWarehouseInfoController.java | 4 +- .../sip/controller/ProductInfoController.java | 10 + .../ProjectOrderInfoController.java | 47 +++++ .../sip/controller/VendorInfoController.java | 5 +- .../ruoyi/sip/domain/InventoryDelivery.java | 1 + .../com/ruoyi/sip/domain/InventoryInfo.java | 2 + .../com/ruoyi/sip/domain/InventoryOuter.java | 3 + .../sip/domain/InventoryOuterDetail.java | 1 + .../ruoyi/sip/domain/OmsInventoryInner.java | 4 + .../ruoyi/sip/domain/OmsWarehouseInfo.java | 4 + .../com/ruoyi/sip/domain/PartnerInfo.java | 3 +- .../com/ruoyi/sip/domain/ProductInfo.java | 4 + .../ruoyi/sip/domain/ProjectOrderFileLog.java | 1 + .../ruoyi/sip/domain/ProjectOrderInfo.java | 1 + .../ruoyi/sip/domain/ProjectProductInfo.java | 1 + .../dto/warehouse/WarehouseInnerExcelDto.java | 2 +- .../ruoyi/sip/mapper/InventoryInfoMapper.java | 2 + .../mapper/InventoryOuterDetailMapper.java | 1 + .../sip/mapper/InventoryOuterMapper.java | 3 + .../sip/mapper/OmsWarehouseInfoMapper.java | 5 + .../ruoyi/sip/mapper/PartnerInfoMapper.java | 1 + .../ruoyi/sip/mapper/ProductInfoMapper.java | 3 + .../sip/service/IInventoryAuthService.java | 27 +++ .../sip/service/IInventoryInfoService.java | 2 + .../service/IOmsInventoryInnerService.java | 4 +- .../sip/service/IOmsWarehouseInfoService.java | 14 +- .../sip/service/IPartnerInfoService.java | 1 + .../sip/service/IProductInfoService.java | 2 + .../sip/service/IProjectOrderInfoService.java | 3 + .../ruoyi/sip/service/IVendorInfoService.java | 2 +- .../impl/ExecutionTrackServiceImpl.java | 15 +- .../impl/InventoryAuthServiceImpl.java | 104 ++++++++++ .../impl/InventoryDeliveryServiceImpl.java | 6 +- .../impl/InventoryInfoServiceImpl.java | 41 +++- .../impl/InventoryOuterServiceImpl.java | 48 ++++- .../impl/OmsInventoryInnerServiceImpl.java | 75 +++++-- .../impl/OmsWarehouseInfoServiceImpl.java | 43 +++- .../service/impl/PartnerInfoServiceImpl.java | 6 + .../service/impl/ProductInfoServiceImpl.java | 16 +- .../impl/ProjectOrderInfoServiceImpl.java | 60 +++--- .../service/impl/VendorInfoServiceImpl.java | 10 - .../com/ruoyi/sip/utils/TemplateMailUtil.java | 3 +- .../inventory/InventoryDeliveryMapper.xml | 35 ++-- .../mapper/inventory/InventoryInfoMapper.xml | 30 ++- .../inventory/InventoryOuterDetailMapper.xml | 11 + .../mapper/inventory/InventoryOuterMapper.xml | 9 +- .../inventory/OmsInventoryInnerMapper.xml | 22 +- .../mapper/sip/ProjectOrderInfoMapper.xml | 196 ++++++++++++++---- .../mapper/sip/ProjectProductInfoMapper.xml | 2 +- .../mapper/system/PartnerInfoMapper.xml | 19 +- .../mapper/system/ProductInfoMapper.xml | 16 ++ .../warehouse/OmsWarehouseInfoMapper.xml | 51 ++++- .../ruoyi/system/service/ISysUserService.java | 2 + .../service/impl/SysUserServiceImpl.java | 6 + 75 files changed, 1224 insertions(+), 357 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/templates/inventory/info/outerLog.html create mode 100644 ruoyi-sip/src/main/java/com/ruoyi/sip/service/IInventoryAuthService.java create mode 100644 ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/InventoryAuthServiceImpl.java diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 37451aba..18b46811 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -152,8 +152,12 @@ process: orderApproveOffline: beanName: projectOrderInfoServiceImpl unis: + inventory: + allAuthRole: 103 order: # 执行单截止时间 endHour: 96 mail: - enabled: true \ No newline at end of file + enabled: true +# 商务角色id + businessRoleId: 103 \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/inventory/execution/edit.html b/ruoyi-admin/src/main/resources/templates/inventory/execution/edit.html index ac3c769b..8c7a699d 100644 --- a/ruoyi-admin/src/main/resources/templates/inventory/execution/edit.html +++ b/ruoyi-admin/src/main/resources/templates/inventory/execution/edit.html @@ -358,42 +358,24 @@ 生成出库单
-
- -
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
- -
- -
-
-
- -
- -
+
+ + + + + + + + + + + + + + + +
出库单号:出库时间:
产品编码产品型号:制造商:
仓库信息 diff --git a/ruoyi-admin/src/main/resources/templates/inventory/execution/track.html b/ruoyi-admin/src/main/resources/templates/inventory/execution/track.html index fad93669..53ce6fc0 100644 --- a/ruoyi-admin/src/main/resources/templates/inventory/execution/track.html +++ b/ruoyi-admin/src/main/resources/templates/inventory/execution/track.html @@ -118,7 +118,9 @@
- + + +
@@ -155,6 +157,58 @@ $.modal.openFull("项目详情", ctx + "sip/project/view/" + id) } + function signOrder(orderId,versionCode) { + $('#orderId').val(orderId) + $('#versionCode').val(versionCode) + $('#uploadInput').click() + } + + document.getElementById('uploadInput').addEventListener('change', function (event) { + const file = event.target.files[0]; + let data = new FormData() + data.append('file', file) + data.append('orderId', $('#orderId').val()) + data.append('versionCode', $('#versionCode').val()) + var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest对象 + xhr.open('POST', prefix + '/sign', true); // 设置请求类型和URL + // 当请求完成时执行的回调函数 + xhr.onload = function (res) { + let data = JSON.parse(res.currentTarget.response) + if (data.code === 0) { + $.modal.msgSuccess('上传成功'); + $.table.refresh() + } else { + top.layer.alert(data.msg || '导入失败', { + icon: 2, + title: "系统提示", + btn: ['确认'], + skin: 'content-br', + btnclass: ['btn btn-primary'], + }); + + } + $('#uploadInput').val('') + + + }; + + // 当请求发生错误时执行的回调函数 + xhr.onerror = function () { + console.log('上传过程中发生错误'); + }; + // + // // 发送数据到服务器 + xhr.send(data); + + + }); + function downloadSign(id,versionCode){ + window.location.href = prefix + `/sign/download?orderId=` + encodeURI(id) + '&versionCode=' + encodeURI(versionCode); + + } + + + $(function () { // $('#content').load(ctx + 'project/order/add'); var urlChina = '/cnarea/select'; @@ -255,9 +309,14 @@ width: 200, formatter: function (value, row, index) { var actions = []; - actions.push('编辑 '); - // actions.push('详情 '); - actions.push('删除'); + actions.push('编辑 '); + if (row.signStatus == '0' && row.deliveryStatus=='2') { + actions.push(`签收`); + } + if (row.signStatus == '1'){ + actions.push(`签收文件`); + } + return actions.join(''); } }] @@ -304,6 +363,7 @@ }); }) + }); diff --git a/ruoyi-admin/src/main/resources/templates/inventory/info/info.html b/ruoyi-admin/src/main/resources/templates/inventory/info/info.html index ed7bc4f3..10e061ce 100644 --- a/ruoyi-admin/src/main/resources/templates/inventory/info/info.html +++ b/ruoyi-admin/src/main/resources/templates/inventory/info/info.html @@ -35,20 +35,20 @@
-
- - 添加 - - - 修改 - - - 删除 - - - 导出 - -
+ + + + + + + + + + + + + +
@@ -117,7 +117,7 @@ formatter: function(value, row, index) { var actions = []; actions.push('入库记录 '); - actions.push('删除'); + actions.push(`出库记录`); return actions.join(''); } }] @@ -129,6 +129,10 @@ var url = prefix + "/innerLog/" + productCode; $.modal.openFull("入库记录表", url); } + function showOuterLog(productCode){ + var url = prefix + "/outerLog/" + productCode; + $.modal.openFull("入库记录表", url); + } \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/inventory/info/outerLog.html b/ruoyi-admin/src/main/resources/templates/inventory/info/outerLog.html new file mode 100644 index 00000000..5849076d --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/inventory/info/outerLog.html @@ -0,0 +1,91 @@ + + + + + + +
+ +
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/inventory/inner/add.html b/ruoyi-admin/src/main/resources/templates/inventory/inner/add.html index 4fe1902c..06cd1d39 100644 --- a/ruoyi-admin/src/main/resources/templates/inventory/inner/add.html +++ b/ruoyi-admin/src/main/resources/templates/inventory/inner/add.html @@ -27,8 +27,10 @@
- - +
@@ -50,7 +52,7 @@ - 导入模板 + 导入
@@ -353,7 +355,7 @@ debugger $(function () { initTable() - getCurrentVendor() + // getCurrentVendor() $('.fixed-table-toolbar').css('display', 'none') }) diff --git a/ruoyi-admin/src/main/resources/templates/inventory/inner/inner.html b/ruoyi-admin/src/main/resources/templates/inventory/inner/inner.html index 30752239..32b76837 100644 --- a/ruoyi-admin/src/main/resources/templates/inventory/inner/inner.html +++ b/ruoyi-admin/src/main/resources/templates/inventory/inner/inner.html @@ -24,7 +24,7 @@
  • - +
  • 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 36cc1cc5..7eb77645 100644 --- a/ruoyi-admin/src/main/resources/templates/inventory/outer/edit.html +++ b/ruoyi-admin/src/main/resources/templates/inventory/outer/edit.html @@ -26,7 +26,18 @@ font-family: "微软雅黑", Arial, sans-serif; /* 统一字体 */ justify-content: flex-end; } - + table { + border-collapse: collapse; + width: 100%; + margin-bottom: 20px; + } + body { + font-family: "微软雅黑", Arial, sans-serif; + } + th, td { + border: 1px solid #ccc; + padding: 8px; + } .required-delivery-time { font-size: 20px; } @@ -98,66 +109,45 @@
  • -
    -
    - -
    - -
    -
    -
    -
    -
    - -
    - + 发货方式: + -
    -
    -
    -
    -
    - -
    - + 物流公司: + -
    -
    -
    -
    -
    - -
    - -
    -
    -
    -
    -
    - -
    - + + + 发货人 + + 发货时间: + -
    -
    - -
    -
    + + + + +
    +
    +
    @@ -177,6 +167,7 @@