From 13dce68bfdf0aca4b05e800494d2cd82c36ac44c Mon Sep 17 00:00:00 2001
From: zhaowc <526854230@qq.com>
Date: 星期四, 22 八月 2024 16:59:13 +0800
Subject: [PATCH] 基础信息页面修改
---
Wms/WMS.IBLL/ISysServer/ILogisticsInfoServer.cs | 6 ++++++
HTML/views/SystemSettings/Role.html | 8 ++++----
Wms/WMS.DAL/BaseRepository.cs | 6 ++++++
Wms/WMS.IDAL/IBaseRepository.cs | 1 +
Wms/WMS.BLL/SysServer/PackagServer.cs | 8 ++++++++
Wms/WMS.BLL/SysServer/LogisticsInfoServer.cs | 6 ++++++
HTML/views/WareHouseSetting/Area.html | 3 ++-
Wms/Wms/Controllers/BasisController.cs | 2 +-
Wms/WMS.IBLL/ISysServer/IMaterialsServer.cs | 7 +++++++
9 files changed, 41 insertions(+), 6 deletions(-)
diff --git a/HTML/views/SystemSettings/Role.html b/HTML/views/SystemSettings/Role.html
index b3826ec..f4150c2 100644
--- a/HTML/views/SystemSettings/Role.html
+++ b/HTML/views/SystemSettings/Role.html
@@ -124,7 +124,7 @@
});
sendData(IP + "/basis/GetRoleRightList", {}, "get", function (res) {
$(function () {
- $("#approvalBtn").hide();
+ $(".approvalBtn").hide();
});
$(function () {
$(".editClass").hide();
@@ -150,7 +150,7 @@
}
if (res.data[k].MenuName == "娣诲姞瑙掕壊") {
$(function () {
- $("#approvalBtn").show();
+ $(".approvalBtn").show();
});
}
if (res.data[k].MenuName == "鍒犻櫎瑙掕壊") {
@@ -177,7 +177,7 @@
}
sendData(IP + "/basis/GetRoleRightList", {}, "get", function (res) {
$(function() {
- $("#approvalBtn").hide();
+ $(".approvalBtn").hide();
});
$(function() {
$(".editClass").hide();
@@ -208,7 +208,7 @@
if (res.data[k].MenuName == "娣诲姞瑙掕壊")
{
$(function () {
- $("#approvalBtn").show();
+ $(".approvalBtn").show();
});
}
if (res.data[k].MenuName == "鍒犻櫎瑙掕壊")
diff --git a/HTML/views/WareHouseSetting/Area.html b/HTML/views/WareHouseSetting/Area.html
index 385bc4e..0e9fd0b 100644
--- a/HTML/views/WareHouseSetting/Area.html
+++ b/HTML/views/WareHouseSetting/Area.html
@@ -327,7 +327,8 @@
time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
}, function() {
layer.close(index); //鍏抽棴寮瑰眰
- // refreshTable($("#CategoryName").val(),$("#AreaNo").val());
+ refreshTable("", "", "", "");
+ //table.reload('LAY-app-content-list');
doing = true;
});
}
diff --git a/Wms/WMS.BLL/SysServer/LogisticsInfoServer.cs b/Wms/WMS.BLL/SysServer/LogisticsInfoServer.cs
index cb334f7..b83c3ac 100644
--- a/Wms/WMS.BLL/SysServer/LogisticsInfoServer.cs
+++ b/Wms/WMS.BLL/SysServer/LogisticsInfoServer.cs
@@ -70,6 +70,12 @@
return data;
}
+ public async Task<SysLogisticsInfo> GetLogisticsDelInfo(int id)
+ {
+ var data = await LogisticsInfoRst.GetOneByIdAsync1(id);
+ return data;
+ }
+
public async Task<List<SysLogisticsInfo>> GetLogisticsInfoSelect()
{
var data = await LogisticsInfoRst.GetAllAsync();
diff --git a/Wms/WMS.BLL/SysServer/PackagServer.cs b/Wms/WMS.BLL/SysServer/PackagServer.cs
index d6ca134..4f7bca8 100644
--- a/Wms/WMS.BLL/SysServer/PackagServer.cs
+++ b/Wms/WMS.BLL/SysServer/PackagServer.cs
@@ -11,12 +11,15 @@
using Model.ModelVm.SysVm;
using System.Threading.Tasks;
using Utility;
+using WMS.Entity.Context;
namespace WMS.BLL.SysServer
{
public class PackagServer : IPackagServer
{
public IPackagRepository PackagRst { get; set; }
+ public IMaterialsServer materials { get; set; }
+ private static readonly SqlSugarScope Db = DataContext.Db;
public PackagServer(IPackagRepository packagRst)
{
@@ -301,6 +304,11 @@
{
throw Oops.Bah("鍖呰淇℃伅涓嶅瓨鍦紒");
}
+ var modMaterial = await Db.Queryable<SysMaterials>().FirstAsync(a => a.IsDel == "0" && a.PackagNo == packagItems.PackagNo);
+ if (modMaterial != null)
+ {
+ throw Oops.Bah("瀛樺湪姝e湪浣跨敤姝ゅ寘瑁呯殑鐗╂枡锛�");
+ }
packagItems.IsDel = "1";
packagItems.UpdateTime = DateTime.Now;
diff --git a/Wms/WMS.DAL/BaseRepository.cs b/Wms/WMS.DAL/BaseRepository.cs
index 1547c2a..a253d34 100644
--- a/Wms/WMS.DAL/BaseRepository.cs
+++ b/Wms/WMS.DAL/BaseRepository.cs
@@ -108,6 +108,12 @@
return data;
}
+ public async Task<T> GetOneByIdAsync1(int id)
+ {
+ var data = await _db.Queryable<T>().FirstAsync(m => m.Id == id && m.IsDel == "1");
+ return data;
+ }
+
public List<T> GetModels(string sqlString)
{
var models = _db.Ado.SqlQuery<T>(sqlString);
diff --git a/Wms/WMS.IBLL/ISysServer/ILogisticsInfoServer.cs b/Wms/WMS.IBLL/ISysServer/ILogisticsInfoServer.cs
index fd9bf63..9e4b4a1 100644
--- a/Wms/WMS.IBLL/ISysServer/ILogisticsInfoServer.cs
+++ b/Wms/WMS.IBLL/ISysServer/ILogisticsInfoServer.cs
@@ -31,6 +31,12 @@
/// <returns></returns>
Task<SysLogisticsInfo> GetLogisticsInfo(int id);
/// <summary>
+ /// 鏌ヨ鍗曟潯宸插垹闄ょ墿娴佷俊鎭�
+ /// </summary>
+ /// <param name="id"></param>
+ /// <returns></returns>
+ Task<SysLogisticsInfo> GetLogisticsDelInfo(int id);
+ /// <summary>
/// 鏌ヨ鍏ㄩ儴鐗╂祦淇℃伅
/// </summary>
/// <returns></returns>
diff --git a/Wms/WMS.IBLL/ISysServer/IMaterialsServer.cs b/Wms/WMS.IBLL/ISysServer/IMaterialsServer.cs
index 72ace42..cbd5996 100644
--- a/Wms/WMS.IBLL/ISysServer/IMaterialsServer.cs
+++ b/Wms/WMS.IBLL/ISysServer/IMaterialsServer.cs
@@ -40,6 +40,13 @@
Task<int> GetMateByNo(string SkuNo);
/// <summary>
+ /// 鏍规嵁鍖呰缂栧彿鏌ヨ鐗╂枡淇℃伅
+ /// </summary>
+ /// <param name="PackagNo">鐗╂枡缂栧彿</param>
+ /// <returns></returns>
+ Task<int> GetMateByPa(string PackagNo);
+
+ /// <summary>
/// 鏂板鐗╂枡淇℃伅
/// </summary>
/// <param name="matedto">鐗╂枡dto</param>
diff --git a/Wms/WMS.IDAL/IBaseRepository.cs b/Wms/WMS.IDAL/IBaseRepository.cs
index c423e3f..efd36af 100644
--- a/Wms/WMS.IDAL/IBaseRepository.cs
+++ b/Wms/WMS.IDAL/IBaseRepository.cs
@@ -32,6 +32,7 @@
Task<List<T>> GetAllAsync();
T GetOneById(int id);
Task<T> GetOneByIdAsync(int id);
+ Task<T> GetOneByIdAsync1(int id);
List<T> GetModels(string sqlString);
diff --git a/Wms/Wms/Controllers/BasisController.cs b/Wms/Wms/Controllers/BasisController.cs
index 0a43b54..95d7afc 100644
--- a/Wms/Wms/Controllers/BasisController.cs
+++ b/Wms/Wms/Controllers/BasisController.cs
@@ -1043,7 +1043,7 @@
public async Task DelLogisticsInfo(IdVm model)
{
await _logisticsSvc.DelLogisticsInfo(model.Id, _userManager.UserId);
- SysLogisticsInfo logisit = await _logisticsSvc.GetLogisticsInfo(model.Id);
+ SysLogisticsInfo logisit = await _logisticsSvc.GetLogisticsDelInfo(model.Id);
await _operation.InsertOperation("鍩虹淇℃伅", "鐗╂祦绠$悊", logisit.CarrierName, "鍒犻櫎", "鍒犻櫎鐗╂祦淇℃伅 鍏徃鍚嶇О锛�" + logisit.CarrierName, _userManager.UserId);
}
/// <summary>
--
Gitblit v1.8.0