diff --git a/WCS.BLL/DbModels/STZL/MatDetailCurrentInfo.cs b/WCS.BLL/DbModels/STZL/MatDetailCurrentInfo.cs index 541bc54..a02432e 100644 --- a/WCS.BLL/DbModels/STZL/MatDetailCurrentInfo.cs +++ b/WCS.BLL/DbModels/STZL/MatDetailCurrentInfo.cs @@ -39,11 +39,11 @@ namespace WCS.BLL.DbModels [SugarColumn(ColumnName = "shelf_type", Length = 64, IsNullable = true, ColumnDescription = "货架类型")] public string ShelfType { get; set; } - /// - /// 货架区域 - /// - [SugarColumn(ColumnName = "shelf_area", Length = 64, IsNullable = true, ColumnDescription = "货架区域")] - public string ShelfArea { get; set; } + ///// + ///// 货架区域 + ///// + //[SugarColumn(ColumnName = "shelf_area", Length = 64, IsNullable = true, ColumnDescription = "货架区域")] + //public string ShelfArea { get; set; } #endregion #region 物料属性 diff --git a/WCS.BLL/DbModels/STZL/ShelfInfo.cs b/WCS.BLL/DbModels/STZL/ShelfInfo.cs index d9ef57d..4ce3558 100644 --- a/WCS.BLL/DbModels/STZL/ShelfInfo.cs +++ b/WCS.BLL/DbModels/STZL/ShelfInfo.cs @@ -41,11 +41,11 @@ namespace WCS.DAL.DbModels [SugarColumn(ColumnName = "shelf_status", IsNullable = true, ColumnDescription = "货架状态")] public ShelfStatusEnum ShelfStatus { get; set; } = ShelfStatusEnum.空货架; - /// - /// 货架区域 - /// - [SugarColumn(ColumnName = "shelf_area", Length = 64, IsNullable = true, ColumnDescription = "货架区域")] - public string ShelfArea { get; set; } + ///// + ///// 货架区域 + ///// + //[SugarColumn(ColumnName = "shelf_area", Length = 64, IsNullable = true, ColumnDescription = "货架区域")] + //public string ShelfArea { get; set; } /// /// 货架尺寸 diff --git a/WCS.BLL/Services/IService/IMatDetailCurrentInfoService.cs b/WCS.BLL/Services/IService/IMatDetailCurrentInfoService.cs index da94c27..68139f7 100644 --- a/WCS.BLL/Services/IService/IMatDetailCurrentInfoService.cs +++ b/WCS.BLL/Services/IService/IMatDetailCurrentInfoService.cs @@ -1,14 +1,9 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using WCS.Model.ApiModel.User; -using WCS.Model; +using WCS.Model; using WCS.DAL.DbModels; using WCS.Model.ApiModel.StoreInfo; using WCS.BLL.DbModels; using WCS.Model.ApiModel.MatBaseInfo; +using WCS.Model.ApiModel.MatDetailCurrentInfo; namespace WCS.BLL.Services.IService { @@ -19,7 +14,7 @@ namespace WCS.BLL.Services.IService /// /// /// - public Task> GetMatDetailCurrentInfos(GetMatDetailCurrentInfosRequest request); + public Task> GetMatDetailCurrentInfos(GetMatDetailCurrentInfosRequest request); /// /// 更新货架存量 diff --git a/WCS.BLL/Services/Service/MatDetailCurrentInfoService.cs b/WCS.BLL/Services/Service/MatDetailCurrentInfoService.cs index 84d6f50..8bd99ab 100644 --- a/WCS.BLL/Services/Service/MatDetailCurrentInfoService.cs +++ b/WCS.BLL/Services/Service/MatDetailCurrentInfoService.cs @@ -18,6 +18,7 @@ using WCS.Model; using WCS.Model.ApiModel; using WCS.Model.ApiModel.InOutRecord; using WCS.Model.ApiModel.MatBaseInfo; +using WCS.Model.ApiModel.MatDetailCurrentInfo; using WCS.Model.ApiModel.StoreInfo; using WCS.Model.ApiModel.User; @@ -26,7 +27,7 @@ namespace WCS.BLL.Services.Service public class MatDetailCurrentInfoService : IMatDetailCurrentInfoService { - public async Task> GetMatDetailCurrentInfos(GetMatDetailCurrentInfosRequest request) + public async Task> GetMatDetailCurrentInfos(GetMatDetailCurrentInfosRequest request) { try { @@ -39,12 +40,34 @@ namespace WCS.BLL.Services.Service .WhereIF(request.ShelfTypeId != null && request.ShelfTypeId != 0, (mci, si, li) => si.ShelfTypeId == request.ShelfTypeId) .WhereIF(!string.IsNullOrEmpty(request.ShelfCode), (mci, si, li) => si.ShelfCode.Contains(request.ShelfCode)) .WhereIF(!string.IsNullOrEmpty(request.MatCode), (mci, si, li) => mci.MatCode.Contains(request.MatCode)) - .WhereIF(!string.IsNullOrEmpty(request.MatName), (mci, si, li) => mci.MatCode.Contains(request.MatName)) - .Select((mci, si, li) => mci); + .WhereIF(!string.IsNullOrEmpty(request.MatName), (mci, si, li) => mci.MatName.Contains(request.MatName)) + .Select((mci, si, li) => new MatDetailCurrentInfoModel() + { + Id = mci.Id, + ShlefId = mci.ShlefId, + ShelfCode = mci.ShelfCode, + ShelfType = mci.ShelfType, + + LocationArea = li.LocationArea, + LocationCode = li.LocationCode, + + MatCode = mci.MatCode, + MatName = mci.MatName, + MatSpec = mci.MatSpec, + MatUnit = mci.MatUnit, + MatCustomer = mci.MatCustomer, + MatQty = mci.MatQty, + MatSupplier = mci.MatSupplier, + + StationCode = mci.StationCode, + ModifyUser = mci.ModifyUser, + ModifyTime = mci.ModifyTime + }); //分页 var totalCount = await recordsQueryable.CountAsync(); var records = await recordsQueryable + .OrderByDescending(mci => mci.Id) .Skip((request.PageNumber - 1) * request.PageSize).Take(request.PageSize) .ToListAsync(); //生成序号 @@ -52,11 +75,11 @@ namespace WCS.BLL.Services.Service { records[i].RowNumber = (request.PageNumber - 1) * request.PageSize + i + 1; } - return new PageQueryResponse() + return new PageQueryResponse() { Code = 200, Message = $"success", - Data = new PageQueryResponseData() + Data = new PageQueryResponseData() { TotalCount = totalCount, MaxPage = request.PageSize == 0 ? 0 : (int)Math.Ceiling((decimal)totalCount / request.PageSize), @@ -67,7 +90,7 @@ namespace WCS.BLL.Services.Service } catch (Exception ex) { - return new PageQueryResponse() + return new PageQueryResponse() { Code = 300, Message = $"操作失败:{ex.Message}", @@ -77,119 +100,58 @@ namespace WCS.BLL.Services.Service public async Task> updateMatDetailCurrentInfo(AddLocaionInfoRequest request) { - return null; - //try - //{ - // var MatDetailCurrentInfo = await DbHelp.db.Queryable() //.Where(t => t.MatDetailCurrentCode == request.MatDetailCurrentInfo.MatDetailCurrentCode) - // .FirstAsync(); - // //修改位置信息 - // if (request.AddOrUpdate == AddOrUpdate.Update) - // { - // var existId = MatDetailCurrentInfo == null ? 0 : MatDetailCurrentInfo.Id; + try + { + var matDetailCurrentInfo = await DbHelp.db.Queryable() //.Where(t => t.MatDetailCurrentCode == request.MatDetailCurrentInfo.MatDetailCurrentCode) + .Where(t => t.Id == request.LocationInfo.Id) + .FirstAsync(); + if (matDetailCurrentInfo == null) + { + return new ResponseCommon + { + Code = 205, + Message = $"更新位置信息失败:此条数据不存在,请确认!", + Data = null + }; + } - // MatDetailCurrentInfo = await DbHelp.db.Queryable() - // //.Where(t => t.Id == request.MatDetailCurrentInfo.Id) - // .FirstAsync(); - // if (MatDetailCurrentInfo == null) - // { - // return new ResponseCommon - // { - // Code = 201, - // Message = $"更新位置信息失败:该位置不存在!", - // Data = null - // }; - // } - // else if (existId != 0 && existId != MatDetailCurrentInfo.Id) - // { - // return new ResponseCommon - // { - // Code = 201, - // Message = $"更新位置信息失败:位置[{MatDetailCurrentInfo.MatDetailCurrentCode}]已存在!!", - // Data = null - // }; - // } - // else - // { - // request.MatDetailCurrentInfo.ModifyUser = request.UserName; - // request.MatDetailCurrentInfo.ModifyTime = DateTime.Now; + matDetailCurrentInfo.MatQty = request.LocationInfo.MatQty; + matDetailCurrentInfo.ModifyUser = request.UserName; + matDetailCurrentInfo.ModifyTime = DateTime.Now; - // var rowNum = await DbHelp.db.Updateable(request.MatDetailCurrentInfo).ExecuteCommandAsync(); - // if (rowNum == 0) - // { - // return new ResponseCommon - // { - // Code = 201, - // Message = $"更新位置信息失败:请重试!", - // Data = null - // }; - // } - // else - // { - // return new ResponseCommon - // { - // Code = 200, - // Message = $"更新位置信息成功!", - // Data = null - // }; - // } - // } - // } - // else if (request.AddOrUpdate == AddOrUpdate.Add) - // { - // if (MatDetailCurrentInfo != null) - // { - // return new ResponseCommon - // { - // Code = 201, - // Message = $"新增位置信息失败:位置[{MatDetailCurrentInfo.MatDetailCurrentCode}]已存在!", - // Data = null - // }; - // } - // else - // { - // request.MatDetailCurrentInfo.ModifyUser = request.UserName; - // var rowNum = await DbHelp.db.Insertable(request.MatDetailCurrentInfo).ExecuteCommandAsync(); - // if (rowNum == 0) - // { - // return new ResponseCommon - // { - // Code = 201, - // Message = $"添加位置信息失败:请重试!", - // Data = null - // }; - // } - // else - // { - // return new ResponseCommon - // { - // Code = 200, - // Message = $"添加位置信息成功!", - // Data = null - // }; - // } - // } - // } - // else - // { - // var response = new ResponseCommon - // { - // Code = 300, - // Message = "不支持的操作!", - // Data = null - // }; - // return response; - // } - //} - //catch (Exception ex) - //{ - // var response = new ResponseCommon - // { - // Code = 300, - // Message = $"操作失败:{ex.Message}", - // Data = null - // }; - // return response; - //} + var rowNum = await DbHelp.db.Updateable(matDetailCurrentInfo).ExecuteCommandAsync(); + if (rowNum == 0) + { + return new ResponseCommon + { + Code = 201, + Message = $"更新货架存量信息失败:请重试!", + Data = null + }; + } + else + { + return new ResponseCommon + { + Code = 200, + Message = $"更新货架存量信息成功!", + Data = null + }; + } + + + + } + catch (Exception ex) + { + var response = new ResponseCommon + { + Code = 300, + Message = $"操作失败:{ex.Message}", + Data = null + }; + return response; + } } public async Task> deleteMatDetailCurrentInfo(DeleteInfosRequest request) diff --git a/WCS.Model/ApiModel/MatDetailCurrentInfo/GetLocationInfosRequest.cs b/WCS.Model/ApiModel/MatDetailCurrentInfo/GetLocationInfosRequest.cs index 073dca4..01208cc 100644 --- a/WCS.Model/ApiModel/MatDetailCurrentInfo/GetLocationInfosRequest.cs +++ b/WCS.Model/ApiModel/MatDetailCurrentInfo/GetLocationInfosRequest.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Text; -namespace WCS.Model.ApiModel.StoreInfo +namespace WCS.Model.ApiModel.MatDetailCurrentInfo { public class GetMatDetailCurrentInfosRequest : PageQueryRequestBase { diff --git a/WCS.Model/ApiModel/MatDetailCurrentInfo/MatDetailCurrentInfo.cs b/WCS.Model/ApiModel/MatDetailCurrentInfo/MatDetailCurrentInfo.cs new file mode 100644 index 0000000..f804a4d --- /dev/null +++ b/WCS.Model/ApiModel/MatDetailCurrentInfo/MatDetailCurrentInfo.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Text; + +namespace WCS.Model.ApiModel.MatDetailCurrentInfo +{ + public class MatDetailCurrentInfoModel : INotifyPropertyChanged + { + public int Id { get; set; } + + #region 货架属性 + public int? ShlefId { get; set; } + public string? ShelfCode { get; set; } = string.Empty; + public string? ShelfType { get; set; } = string.Empty; + //货架位置的区域 + public string? LocationArea { get; set; } = string.Empty; + /// + /// 货架位置 + /// + public string? LocationCode { get; set; } = string.Empty; + #endregion + + #region 物料属性 + public string? MatCode { get; set; } = string.Empty; + + public string? MatName { get; set; } = string.Empty; + + public string? MatSpec { get; set; } = string.Empty; + + public string? MatUnit { get; set; } = string.Empty; + + public string? MatSupplier { get; set; } = string.Empty; + + public string? MatCustomer { get; set; } = string.Empty; + + public int MatQty { get; set; } + #endregion + + public string? StationCode { get; set; } = string.Empty; + + public string? ModifyUser { get; set; } = string.Empty; + + public DateTime? ModifyTime { get; set; } = DateTime.Now; + + public int RowNumber { get; set; } + + public bool IsSelected + { + get { return isSelected; } + set + { + isSelected = value; + OnPropertyChanged(nameof(IsSelected)); + } + } + public bool isSelected; + + public event PropertyChangedEventHandler PropertyChanged; + protected virtual void OnPropertyChanged(string propertyName) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } + } +} diff --git a/WCS.Model/ApiModel/StoreInfo/ShelfInfoModel.cs b/WCS.Model/ApiModel/StoreInfo/ShelfInfoModel.cs index 2ad56fb..a2e14af 100644 --- a/WCS.Model/ApiModel/StoreInfo/ShelfInfoModel.cs +++ b/WCS.Model/ApiModel/StoreInfo/ShelfInfoModel.cs @@ -29,10 +29,10 @@ namespace WCS.Model.ApiModel.StoreInfo /// public ShelfStatusEnum ShelfStatus { get; set; } = ShelfStatusEnum.空货架; - /// - /// 货架区域 - /// - public string ShelfArea { get; set; } = string.Empty; + ///// + ///// 货架区域 + ///// + //public string ShelfArea { get; set; } = string.Empty; /// /// 货架尺寸 diff --git a/WCS.WebApi/Controllers/MatDetailCurrenInfoController.cs b/WCS.WebApi/Controllers/MatDetailCurrenInfoController.cs index da9abf3..e6a2b71 100644 --- a/WCS.WebApi/Controllers/MatDetailCurrenInfoController.cs +++ b/WCS.WebApi/Controllers/MatDetailCurrenInfoController.cs @@ -1,15 +1,11 @@ using Microsoft.AspNetCore.Mvc; using WCS.BLL.Services.IService; using WCS.BLL.Services.Service; -using WCS.Model.ApiModel.MatInventoryDetail; using WCS.Model; using WCS.Model.ApiModel.StoreInfo; using WCS.BLL.DbModels; using WCS.Model.ApiModel.MatBaseInfo; -using WCS.DAL.DbModels; -using WCS.DAL.Db; -using WCS.Model.ApiModel.Home; -using WCS.Model.ApiModel.LocationInfo; +using WCS.Model.ApiModel.MatDetailCurrentInfo; namespace WCS.WebApi.Controllers { @@ -34,14 +30,14 @@ namespace WCS.WebApi.Controllers return await _matDetailCurrentInfoService.GetMatDetailCurrentInfos(request); } - [HttpPost("updateLocationInfo")] - public async Task> updateLocationInfo(AddLocaionInfoRequest request) + [HttpPost("updateMatDetailCurrentInfo")] + public async Task> updateMatDetailCurrentInfo(AddLocaionInfoRequest request) { return await _matDetailCurrentInfoService.updateMatDetailCurrentInfo(request); } - [HttpPost("deleteLocationInfo")] - public async Task> deleteLocationInfo(DeleteInfosRequest request) + [HttpPost("deleteMatDetailCurrentInfo")] + public async Task> deleteMatDetailCurrentInfo(DeleteInfosRequest request) { return await _matDetailCurrentInfoService.deleteMatDetailCurrentInfo(request); } diff --git a/WCS.WebApi/Controllers/PDAMatBindController.cs b/WCS.WebApi/Controllers/PDAMatBindController.cs index c8210d1..76a4818 100644 --- a/WCS.WebApi/Controllers/PDAMatBindController.cs +++ b/WCS.WebApi/Controllers/PDAMatBindController.cs @@ -193,7 +193,7 @@ namespace WCS.WebApi.Controllers ShlefId = shelf.Id, ShelfCode = shelf.ShelfCode, ShelfType = shelf.ShelfTypeName, - ShelfArea = shelf.ShelfArea, + //ShelfArea = shelf.ShelfArea, MatCode = matBaseInfo.MatCode, MatName = matBaseInfo.MatName, diff --git a/货架标准上位机/ViewModels/MatDetailCurrentInfoUpdateViewModel.cs b/货架标准上位机/ViewModels/MatDetailCurrentInfoUpdateViewModel.cs new file mode 100644 index 0000000..2d59a03 --- /dev/null +++ b/货架标准上位机/ViewModels/MatDetailCurrentInfoUpdateViewModel.cs @@ -0,0 +1,149 @@ +using HandyControl.Controls; +using Ping9719.WpfEx.Mvvm; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.AccessControl; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; +using System.Web.UI.WebControls; +using System.Windows.Controls; +using TouchSocket.Core; +using WCS.Model; +using WCS.Model.ApiModel.Home; +using WCS.Model.ApiModel.MatDetailCurrentInfo; +using WCS.Model.ApiModel.StoreInfo; +using 智慧物流软件系统.Tool; + +namespace 智慧物流软件系统.ViewModel +{ + public class MatDetailCurrentInfoUpdateViewModel : BindableBase + { + public MatDetailCurrentInfoModel model { get; set; } + + public System.Windows.Controls.TextBox textBox { get; set; } + + #region Property 属性 + public void SetValues(MatDetailCurrentInfoModel matDetailCurrentInfoModel) + { + model = matDetailCurrentInfoModel; + + ShelfType = matDetailCurrentInfoModel.ShelfType; + ShelfCode = matDetailCurrentInfoModel.ShelfCode; + + LocationArea = matDetailCurrentInfoModel.LocationArea; + LocationCode = matDetailCurrentInfoModel.LocationCode; + + MatName = matDetailCurrentInfoModel.MatName; + MatCode = matDetailCurrentInfoModel.MatCode; + MatSpec = matDetailCurrentInfoModel.MatSpec; + MatQty = matDetailCurrentInfoModel.MatQty; + + if (textBox != null) + Task.Run(() => + { + Thread.Sleep(100); + App.Current.Dispatcher.Invoke(() => + { + textBox.Focus(); + }); + }); + + } + + public MatDetailCurrentInfoModel GetValues() + { + if (model == null) + { + return null; + } + model.MatQty = MatQty; + return model; + } + + private string shelfCode; + public string ShelfCode + { + get { return shelfCode; } + set + { + SetProperty(ref shelfCode, value); + } + } + + private string shelfType; + public string ShelfType + { + get { return shelfType; } + set + { + SetProperty(ref shelfType, value); + } + } + + private string locationArea; + + public string LocationArea + { + get { return locationArea; } + set + { + SetProperty(ref locationArea, value); + } + } + + private string locationCode; + + public string LocationCode + { + get { return locationCode; } + set + { + SetProperty(ref locationCode, value); + } + } + + private string matCode; + public string MatCode + { + get { return matCode; } + set + { + SetProperty(ref matCode, value); + } + } + + + private string matName; + public string MatName + { + get { return matName; } + set + { + SetProperty(ref matName, value); + } + } + + private string matSpec; + public string MatSpec + { + get { return matSpec; } + set + { + SetProperty(ref matSpec, value); + } + } + + private int matQty; + public int MatQty + { + get { return matQty; } + set + { + SetProperty(ref matQty, value); + } + #endregion + } + } +} \ No newline at end of file diff --git a/货架标准上位机/ViewModels/MatDetailCurrentInfoViewModel.cs b/货架标准上位机/ViewModels/MatDetailCurrentInfoViewModel.cs index ff09a67..23a2473 100644 --- a/货架标准上位机/ViewModels/MatDetailCurrentInfoViewModel.cs +++ b/货架标准上位机/ViewModels/MatDetailCurrentInfoViewModel.cs @@ -20,6 +20,7 @@ using WCS.Model.ApiModel.User; using WCS.Model.ApiModel; using Newtonsoft.Json.Bson; using WCS.Model.ApiModel.LocationInfo; +using WCS.Model.ApiModel.MatDetailCurrentInfo; namespace 智慧物流软件系统.ViewModel { @@ -31,8 +32,8 @@ namespace 智慧物流软件系统.ViewModel } #region Property - private List dataGridItemSource; - public List DataGridItemSource + private List dataGridItemSource; + public List DataGridItemSource { get { return dataGridItemSource; } set @@ -41,8 +42,8 @@ namespace 智慧物流软件系统.ViewModel } } - private LocationInfoModel selectedataGridItem; - public LocationInfoModel SelectedataGridItem + private MatDetailCurrentInfoModel selectedataGridItem; + public MatDetailCurrentInfoModel SelectedataGridItem { get { return selectedataGridItem; } set @@ -166,7 +167,7 @@ namespace 智慧物流软件系统.ViewModel } #endregion - #region + #region 物料 /// /// 物料编码 /// @@ -194,7 +195,6 @@ namespace 智慧物流软件系统.ViewModel } #endregion - #endregion #region Command @@ -234,16 +234,21 @@ namespace 智慧物流软件系统.ViewModel var dia = Dialog.Show(new TextDialog()); try { - var body = new GetLocationInfosRequest() + var body = new GetMatDetailCurrentInfosRequest() { LocationAreaId = SelectedLocationAreaItems == null ? null : SelectedLocationAreaItems.Id, LocationCode = LocationCode, + ShelfTypeId = SelectedShelfTypeItem == null? null:selectedShelfTypeItem.Id, + ShelfCode = ShelfCode, + MatCode = MatCode, + MatName = MatName, + UserName = LocalStatic.CurrentUser, DeviceType = LocalFile.Config.DeviceType, PageNumber = CurrentPage, PageSize = PageSize, }; - var Result = ApiHelp.GetDataFromHttp>(LocalFile.Config.ApiIpHost + "locationInfo/getLocationInfos", body, "POST"); + var Result = ApiHelp.GetDataFromHttp>(LocalFile.Config.ApiIpHost + "matDetailCurrenInfo/getMatDetailCurrentInfos", body, "POST"); if (Result != null && Result.Data != null && Result.Data.Lists != null) { DataGridItemSource = Result.Data.Lists; @@ -262,23 +267,9 @@ namespace 智慧物流软件系统.ViewModel #endregion } - /// - /// 物料新增操作 - /// - public ICommand BtnAddCommand { get => new DelegateCommand(BtnAdd); } - public async void BtnAdd() - { - var addView = new LocationInfoAddOrUpdateView("新增位置"); - addView.ShowDialog(); - if (addView.DialogResult == true) - { - //添加或修改成功后重新查询 - CurrentPage = 1; - } - } public ICommand BtnEditCommand { get => new DelegateCommand(BtnEdit); } - public async void BtnEdit() + public void BtnEdit() { //查询勾选的第一个数据 var info = DataGridItemSource?.Where(t => t.IsSelected == true).FirstOrDefault(); @@ -288,9 +279,9 @@ namespace 智慧物流软件系统.ViewModel } else { - var addView = new LocationInfoAddOrUpdateView("修改位置", info); - addView.ShowDialog(); - if (addView.DialogResult == true) + var updateView = new MatDetailCurrentInfoUpdateView("修改货架存量", info); + updateView.ShowDialog(); + if (updateView.DialogResult == true) { CurrentPage = 1; } @@ -321,7 +312,7 @@ namespace 智慧物流软件系统.ViewModel DeviceType = LocalFile.Config.DeviceType, needDeleteIds = needDeleteIds, }; - var Result = ApiHelp.GetDataFromHttp>(LocalFile.Config.ApiIpHost + "locationInfo/deleteLocationInfo", body, "POST"); + var Result = ApiHelp.GetDataFromHttp>(LocalFile.Config.ApiIpHost + "matDetailCurrenInfo/deleteMatDetailCurrentInfo", body, "POST"); if (Result != null && Result.Code == 200) { BtnSearch(); @@ -335,33 +326,6 @@ namespace 智慧物流软件系统.ViewModel } return true; }); - - ////查询勾选的第一个数据 - //var info = DataGridItemSource?.Where(t => t.IsSelected == true).FirstOrDefault(); - //if (info == null) - //{ - // Growl.Warning("请选择需要删除的数据!"); - //} - //else - //{ - // var body = new AddShelfInfoRequest() - // { - // UserName = LocalStatic.CurrentUser, - // DeviceType = LocalFile.Config.DeviceType, - // ShelfInfo = info, - // AddOrUpdate = AddOrUpdate.Delete - // }; - // var Result = ApiHelp.GetDataFromHttp>(LocalFile.Config.ApiIpHost + "storeInfo/addOrUpdateShelfInfo", body, "POST"); - // if (Result != null && Result.Code == 200) - // { - // Growl.Success("删除成功!"); - // CurrentPage = 1; - // } - // else - // { - // Growl.Error($"{Result?.Message?.ToString()}"); - // } - //} } #endregion diff --git a/货架标准上位机/Views/MatDetailCurrentInfoUpdateView.xaml b/货架标准上位机/Views/MatDetailCurrentInfoUpdateView.xaml new file mode 100644 index 0000000..4f4c5c9 --- /dev/null +++ b/货架标准上位机/Views/MatDetailCurrentInfoUpdateView.xaml @@ -0,0 +1,156 @@ + + + + + + + + + +