diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
index 0a8bd450..797f05f2 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
@@ -1,7 +1,11 @@
package com.ruoyi.web.controller.system;
+import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
+
+import cn.hutool.core.lang.Dict;
+import com.ruoyi.common.utils.mail.TemplateMailUtil;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
@@ -228,13 +232,19 @@ public class SysUserController extends BaseController
userService.checkUserAllowed(user);
userService.checkUserDataScope(user.getUserId());
user.setSalt(ShiroUtils.randomSalt());
- user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
+ String realPassword = user.getPassword();
+ user.setPassword(passwordService.encryptPassword(user.getLoginName(), realPassword, user.getSalt()));
if (userService.resetUserPwd(user) > 0)
{
+ SysUser dbUser = userService.selectUserById(user.getUserId());
+ if (dbUser!=null && StringUtils.isNotEmpty(dbUser.getEmail())){
+ TemplateMailUtil.sendTemplateMail(Collections.singletonList(dbUser.getEmail()),"密码重置", TemplateMailUtil.MailTemplate.PASSWORD_RESET, Dict.of("password", realPassword));
+ }
if (ShiroUtils.getUserId().longValue() == user.getUserId().longValue())
{
- setSysUser(userService.selectUserById(user.getUserId()));
+ setSysUser(dbUser);
}
+
return success();
}
return error();
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/validate/jquery.validate.extend.js b/ruoyi-admin/src/main/resources/static/ajax/libs/validate/jquery.validate.extend.js
index 42d53850..b1a5fb58 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/validate/jquery.validate.extend.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/validate/jquery.validate.extend.js
@@ -21,6 +21,14 @@ $(document).ready(function(){
var tel = /^(0\d{2,3}-)?\d{7,8}$/g;//区号3,4位,号码7,8位
return this.optional(element) || (tel.test(value));
},"请填写正确的座机号码");
+ // 手机号码验证身份证正则合并:(^\d{15}$)|(^\d{17}([0-9]|X)$)
+ jQuery.validator.addMethod("isTelNumber",function(value,element) {
+ debugger
+ var length = value.length;
+ const phone = /^1[3-9]\d{9}$/;
+ const tel = /^(0\d{2,3}-)?\d{7,8}$/g;//区号3,4位,号码7,8位
+ return this.optional(element)||(length === 11 && phone.test(value)) || (tel.test(value));
+ },"请填写正确的手机号或座机号");
// 姓名校验
jQuery.validator.addMethod("isName",function(value,element) {
var name = /^[\u4e00-\u9fa5]{2,6}$/;
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 7e8e1365..35cb35ed 100644
--- a/ruoyi-admin/src/main/resources/templates/inventory/info/info.html
+++ b/ruoyi-admin/src/main/resources/templates/inventory/info/info.html
@@ -24,7 +24,24 @@
-
+
+
+
+
+
+
+
+
搜索
@@ -93,11 +110,18 @@
field: 'productName',
title: '产品名称'
},
+ {
+ field: 'warehouseName',
+ title: '仓库',
+ },
{
field: 'availableCount',
title: '实时库存',
formatter: function (value, row, index) {
- let showValue= value ??0;
+ let showValue = value ?? 0;
+ if (showValue >= 0 && (row.inventoryCount ?? 0) > 0) {
+ showValue = row.inventoryCount
+ }
let showHtml=''
if (value>200){
showHtml= `${showValue}`
@@ -125,8 +149,8 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
- actions.push('入库记录 ');
- actions.push(`出库记录`);
+ actions.push('入库记录 ');
+ actions.push(`出库记录`);
return actions.join('');
}
}]
@@ -134,12 +158,19 @@
$.table.init(options);
});
- function showInnerLog(productCode){
- var url = prefix + "/innerLog/" + productCode;
+ function showInnerLog(productCode, warehouseId) {
+ if (!warehouseId) {
+ $.modal.errorMsg("仓库不能为空");
+ }
+ var url = prefix + "/innerLog/" + productCode + "/" + warehouseId;
$.modal.openFull("入库记录表", url);
}
- function showOuterLog(productCode){
- var url = prefix + "/outerLog/" + productCode;
+
+ function showOuterLog(productCode, warehouseId) {
+ if (!warehouseId) {
+ $.modal.errorMsg("仓库不能为空");
+ }
+ var url = prefix + "/outerLog/" + productCode + "/" + warehouseId;
$.modal.openFull("入库记录表", url);
}
diff --git a/ruoyi-admin/src/main/resources/templates/inventory/info/innerLog.html b/ruoyi-admin/src/main/resources/templates/inventory/info/innerLog.html
index dfe7ff9d..80a97b80 100644
--- a/ruoyi-admin/src/main/resources/templates/inventory/info/innerLog.html
+++ b/ruoyi-admin/src/main/resources/templates/inventory/info/innerLog.html
@@ -9,6 +9,7 @@
diff --git a/ruoyi-admin/src/main/resources/templates/inventory/info/outerLog.html b/ruoyi-admin/src/main/resources/templates/inventory/info/outerLog.html
index 0b30ce8f..370371b2 100644
--- a/ruoyi-admin/src/main/resources/templates/inventory/info/outerLog.html
+++ b/ruoyi-admin/src/main/resources/templates/inventory/info/outerLog.html
@@ -9,6 +9,7 @@
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 859b5faa..5672d145 100644
--- a/ruoyi-admin/src/main/resources/templates/inventory/inner/add.html
+++ b/ruoyi-admin/src/main/resources/templates/inventory/inner/add.html
@@ -180,7 +180,7 @@
@@ -213,6 +213,11 @@
}
})
}
+ // 限制productSn只能输入数字和字母
+ function validateProductSn(input) {
+ // 只允许数字和字母
+ input.value = input.value.replace(/[^a-zA-Z0-9]/g, '');
+ }
function clearAddInventory(){
$('#productCodeQuery').val('')
$('#addInventory input[type="text"]').each(function() {
@@ -451,7 +456,7 @@
align: 'center',
formatter: function (value, row, index) {
var actions = [];
- actions.push('删除');
+ actions.push('删除');
return actions.join('');
}
}]
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 0f657be3..00517089 100644
--- a/ruoyi-admin/src/main/resources/templates/inventory/outer/edit.html
+++ b/ruoyi-admin/src/main/resources/templates/inventory/outer/edit.html
@@ -686,10 +686,13 @@
}
function updateStatus(id, outerCode, orderCode,productCode) {
- $.operate.post(deliveryPrefix + '/status', {id: id, outerCode: outerCode, orderCode: orderCode,productCode:productCode}, res => {
- refreshTable();
+ $.modal.confirm("请确认sn码的准确性,当日24点后无法更改", function () {
+ $.operate.post(deliveryPrefix + '/status', {id: id, outerCode: outerCode, orderCode: orderCode,productCode:productCode}, res => {
+ refreshTable();
+ })
})
+
}
function refreshTable() {
diff --git a/ruoyi-admin/src/main/resources/templates/layout/product-list.html b/ruoyi-admin/src/main/resources/templates/layout/product-list.html
index 299e4c98..582d211a 100644
--- a/ruoyi-admin/src/main/resources/templates/layout/product-list.html
+++ b/ruoyi-admin/src/main/resources/templates/layout/product-list.html
@@ -313,7 +313,7 @@
|
|
|
- |
+ |
|
diff --git a/ruoyi-admin/src/main/resources/templates/project/order/add.html b/ruoyi-admin/src/main/resources/templates/project/order/add.html
index 800c6e0e..7bd13bc1 100644
--- a/ruoyi-admin/src/main/resources/templates/project/order/add.html
+++ b/ruoyi-admin/src/main/resources/templates/project/order/add.html
@@ -173,7 +173,7 @@
|
联系方式* |
- |
+ |
@@ -252,7 +252,7 @@
|
联系方式* |
- |
+ |
@@ -280,9 +280,25 @@
|
联系方式* |
- |
+ |
-
+
+ | 收货地址* |
+
+
+ |
+
+
+ | 收货人 |
+ |
+ Email |
+ |
+ 联系方式* |
+
+ |
+
+
| 其他特别说明 |
@@ -346,7 +362,21 @@
+ |