数据记录 客户端页面
This commit is contained in:
@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WCS.Model.ApiModel.MatDetailHistoryInfo
|
||||||
|
{
|
||||||
|
public class GetMatDetailHistoryInfosRequest : PageQueryRequestBase
|
||||||
|
{
|
||||||
|
public RecordTypeEnum? RecordType { get; set; } = null;
|
||||||
|
|
||||||
|
public FunctionTypeEnum? FunctionType { get; set; } = null;
|
||||||
|
|
||||||
|
public string ShelfCode { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string MatCode { get; set; } = string.Empty ;
|
||||||
|
|
||||||
|
public string MatName { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
121
WCS.WebApi/Controllers/MatDetailHistoryInfoController.cs
Normal file
121
WCS.WebApi/Controllers/MatDetailHistoryInfoController.cs
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using NPOI.SS.Formula.Functions;
|
||||||
|
using SqlSugar;
|
||||||
|
using WCS.BLL;
|
||||||
|
using WCS.BLL.DbModels;
|
||||||
|
using WCS.BLL.HardWare;
|
||||||
|
using WCS.BLL.Manager;
|
||||||
|
using WCS.BLL.Services.IService;
|
||||||
|
using WCS.BLL.Services.Service;
|
||||||
|
using WCS.DAL.Db;
|
||||||
|
using WCS.DAL.DbModels;
|
||||||
|
using WCS.Model;
|
||||||
|
using WCS.Model.ApiModel.AGV;
|
||||||
|
using WCS.Model.ApiModel.Home;
|
||||||
|
using WCS.Model.ApiModel.MatBaseInfo;
|
||||||
|
using WCS.Model.ApiModel.MatDetailHistoryInfo;
|
||||||
|
using WCS.Model.ApiModel.StoreInfo;
|
||||||
|
using Mode = WCS.BLL.HardWare.Mode;
|
||||||
|
|
||||||
|
namespace WCS.WebApi.Controllers
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 主页面的接口
|
||||||
|
/// </summary>
|
||||||
|
[ApiController]
|
||||||
|
[Route("[controller]")]
|
||||||
|
public class MatDetailHistoryInfoController : ControllerBase
|
||||||
|
{
|
||||||
|
public MatDetailHistoryInfoController()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[Route("getMatDetailHistoryInfos")]
|
||||||
|
[HttpPost(Name = "getMatDetailHistoryInfos")]
|
||||||
|
public async Task<PageQueryResponse<MatDetailHistoryInfo>> getMatDetailHistoryInfos(GetMatDetailHistoryInfosRequest request)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var recordsQueryable = DbHelp.db.Queryable<MatDetailHistoryInfo>()
|
||||||
|
.WhereIF(request.RecordType != null, t => t.RecordType == request.RecordType)
|
||||||
|
.WhereIF(request.FunctionType != null, t => t.FunctionType == request.FunctionType)
|
||||||
|
.WhereIF(!string.IsNullOrEmpty(request.ShelfCode), t => t.ShelfCode.Contains(request.ShelfCode))
|
||||||
|
.WhereIF(!string.IsNullOrEmpty(request.MatCode), t => t.MatCode.Contains(request.MatCode))
|
||||||
|
.WhereIF(!string.IsNullOrEmpty(request.MatName), t => t.MatName.Contains(request.MatName))
|
||||||
|
;
|
||||||
|
|
||||||
|
var totalCount = await recordsQueryable.CountAsync();
|
||||||
|
var records = await recordsQueryable
|
||||||
|
.OrderByDescending(t => t.ModifyTime)
|
||||||
|
.Skip((request.PageNumber - 1) * request.PageSize).Take(request.PageSize)
|
||||||
|
.ToListAsync();
|
||||||
|
//生成序号
|
||||||
|
for (int i = 0; i < records.Count; i++)
|
||||||
|
{
|
||||||
|
records[i].RowNumber = (request.PageNumber - 1) * request.PageSize + i + 1;
|
||||||
|
}
|
||||||
|
return new PageQueryResponse<MatDetailHistoryInfo>()
|
||||||
|
{
|
||||||
|
Code = 200,
|
||||||
|
Message = $"success",
|
||||||
|
Data = new PageQueryResponseData<MatDetailHistoryInfo>()
|
||||||
|
{
|
||||||
|
TotalCount = totalCount,
|
||||||
|
MaxPage = request.PageSize == 0 ? 0 : (int)Math.Ceiling((decimal)totalCount / request.PageSize),
|
||||||
|
Count = records.Count,
|
||||||
|
Lists = records.ToList()
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
return new PageQueryResponse<MatDetailHistoryInfo>()
|
||||||
|
{
|
||||||
|
Code = 300,
|
||||||
|
Message = $"操作失败:{ex.Message}",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 删除-假删除
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[Route("deleteMatDetailHistoryInfo")]
|
||||||
|
[HttpPost(Name = "deleteMatDetailHistoryInfo")]
|
||||||
|
public async Task<ResponseBase> deleteMatDetailHistoryInfo(DeleteInfosRequest request)
|
||||||
|
{
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//先查询出具体的Id
|
||||||
|
var matDetailHistoryInfos = await DbHelp.db.Queryable<MatDetailHistoryInfo>()
|
||||||
|
.Where(t => request.needDeleteIds.Contains(t.Id))
|
||||||
|
.ToListAsync();
|
||||||
|
//执行删除
|
||||||
|
var deleteRows = await DbHelp.db.Deleteable(matDetailHistoryInfos).ExecuteCommandAsync();
|
||||||
|
return new ResponseCommon<Object>
|
||||||
|
{
|
||||||
|
Code = 200,
|
||||||
|
Message = $"已删除{deleteRows}条数据!",
|
||||||
|
Data = null
|
||||||
|
};
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
var response = new ResponseCommon<Object>
|
||||||
|
{
|
||||||
|
Code = 300,
|
||||||
|
Message = $"操作失败:{ex.Message}",
|
||||||
|
Data = null
|
||||||
|
};
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -281,7 +281,7 @@ namespace 智慧物流软件系统.ViewModel
|
|||||||
// StoreCode = StoreCode,
|
// StoreCode = StoreCode,
|
||||||
// Direction = SelectedDirection,
|
// Direction = SelectedDirection,
|
||||||
|
|
||||||
// ShelfTypeId = SelectedLocationAreaItems == null ? 0 : SelectedLocationAreaItems.Id,
|
// ShelfTypeId = SelectedRecordTypeItem == null ? 0 : SelectedRecordTypeItem.Id,
|
||||||
|
|
||||||
// UserName = LocalStatic.CurrentUser,
|
// UserName = LocalStatic.CurrentUser,
|
||||||
// DeviceType = LocalFile.Config.DeviceType,
|
// DeviceType = LocalFile.Config.DeviceType,
|
||||||
|
336
货架标准上位机/ViewModels/MatDetailHistoryInfoViewModel.cs
Normal file
336
货架标准上位机/ViewModels/MatDetailHistoryInfoViewModel.cs
Normal file
@ -0,0 +1,336 @@
|
|||||||
|
using HandyControl.Controls;
|
||||||
|
using MiniExcelLibs;
|
||||||
|
using Ping9719.WpfEx.Mvvm;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using 智慧物流软件系统.Views.Controls;
|
||||||
|
using 智慧物流软件系统.Api;
|
||||||
|
using WCS.Model;
|
||||||
|
using WCS.Model.ApiModel.Home;
|
||||||
|
using WCS.Model.ApiModel.StoreInfo;
|
||||||
|
using WCS.BLL.DbModels;
|
||||||
|
using WCS.Model.ApiModel.MatBaseInfo;
|
||||||
|
using WCS.Model.ApiModel.User;
|
||||||
|
using WCS.Model.ApiModel;
|
||||||
|
using Newtonsoft.Json.Bson;
|
||||||
|
using WCS.Model.ApiModel.LocationInfo;
|
||||||
|
using WCS.Model.ApiModel.MatDetailCurrentInfo;
|
||||||
|
using WCS.Model.ApiModel.Stocktaking;
|
||||||
|
using WCS.Model.ApiModel.MatDetailHistoryInfo;
|
||||||
|
using WCS.Model.ApiModel.AGV;
|
||||||
|
|
||||||
|
namespace 智慧物流软件系统.ViewModel
|
||||||
|
{
|
||||||
|
public class MatDetailHistoryInfoViewModel : BindableBase
|
||||||
|
{
|
||||||
|
public MatDetailHistoryInfoViewModel()
|
||||||
|
{
|
||||||
|
//初始化下拉列表框
|
||||||
|
//记录类型
|
||||||
|
RecordTypeItems = ["全部"];
|
||||||
|
var recordTypes = Enum.GetValues(typeof(RecordTypeEnum))
|
||||||
|
.Cast<RecordTypeEnum>()
|
||||||
|
.ToList();
|
||||||
|
foreach (var recordType in recordTypes)
|
||||||
|
{
|
||||||
|
RecordTypeItems.Add(recordType.ToString());
|
||||||
|
}
|
||||||
|
//操作功能
|
||||||
|
FunctionTypeItems = ["全部"];
|
||||||
|
var functionTypes = Enum.GetValues(typeof(FunctionTypeEnum))
|
||||||
|
.Cast<FunctionTypeEnum>()
|
||||||
|
.ToList();
|
||||||
|
foreach (var functionType in functionTypes)
|
||||||
|
{
|
||||||
|
FunctionTypeItems.Add(functionType.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Property
|
||||||
|
private List<MatDetailHistoryInfoModel> dataGridItemSource;
|
||||||
|
public List<MatDetailHistoryInfoModel> DataGridItemSource
|
||||||
|
{
|
||||||
|
get { return dataGridItemSource; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
SetProperty(ref dataGridItemSource, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private MatDetailHistoryInfoModel selectedataGridItem;
|
||||||
|
public MatDetailHistoryInfoModel SelectedataGridItem
|
||||||
|
{
|
||||||
|
get { return selectedataGridItem; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
SetProperty(ref selectedataGridItem, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#region
|
||||||
|
private string shelfCode;
|
||||||
|
public string ShelfCode
|
||||||
|
{
|
||||||
|
get { return shelfCode; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
SetProperty(ref shelfCode, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<string> recordTypeItems;
|
||||||
|
public List<string> RecordTypeItems
|
||||||
|
{
|
||||||
|
get { return recordTypeItems; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
SetProperty(ref recordTypeItems, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private string selectedRecordTypeItem;
|
||||||
|
public string SelectedRecordTypeItem
|
||||||
|
{
|
||||||
|
get { return selectedRecordTypeItem; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
SetProperty(ref selectedRecordTypeItem, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<string> functionTypeItems;
|
||||||
|
public List<string> FunctionTypeItems
|
||||||
|
{
|
||||||
|
get { return functionTypeItems; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
SetProperty(ref functionTypeItems, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private string selectedFunctionTypeItem;
|
||||||
|
public string SelectedFunctionTypeItem
|
||||||
|
{
|
||||||
|
get { return selectedFunctionTypeItem; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
SetProperty(ref selectedFunctionTypeItem, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 物料编码
|
||||||
|
/// </summary>
|
||||||
|
private string matCode;
|
||||||
|
public string MatCode
|
||||||
|
{
|
||||||
|
get { return matCode; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
SetProperty(ref matCode, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 物料名称
|
||||||
|
/// </summary>
|
||||||
|
private string matName;
|
||||||
|
public string MatName
|
||||||
|
{
|
||||||
|
get { return matName; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
SetProperty(ref matName, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Command
|
||||||
|
public ICommand BtnResetCommand { get => new DelegateCommand(BtnReset); }
|
||||||
|
public void BtnReset()
|
||||||
|
{
|
||||||
|
SelectedRecordTypeItem = RecordTypeItems.First();
|
||||||
|
SelectedFunctionTypeItem = FunctionTypeItems.First();
|
||||||
|
|
||||||
|
ShelfCode = string.Empty;
|
||||||
|
|
||||||
|
MatCode = string.Empty;
|
||||||
|
MatName = string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ICommand BtnSearchCommand { get => new DelegateCommand(BtnSearchReset); }
|
||||||
|
public void BtnSearchReset()
|
||||||
|
{
|
||||||
|
BtnSearch(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void BtnSearch(bool IsPageReset = true)
|
||||||
|
{
|
||||||
|
if (CurrentPage == 0 || IsPageReset)
|
||||||
|
{
|
||||||
|
CurrentPage = 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#region 调用接口获取数据
|
||||||
|
var dia = Dialog.Show(new TextDialog());
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var isSelectedRecordType = Enum.TryParse<RecordTypeEnum>(SelectedRecordTypeItem, out RecordTypeEnum recordType);
|
||||||
|
var isSelectedFunctionType = Enum.TryParse<FunctionTypeEnum>(SelectedFunctionTypeItem, out FunctionTypeEnum functionType);
|
||||||
|
|
||||||
|
var body = new GetMatDetailHistoryInfosRequest()
|
||||||
|
{
|
||||||
|
FunctionType = isSelectedFunctionType ? functionType : null,
|
||||||
|
RecordType = isSelectedRecordType ? recordType : null,
|
||||||
|
|
||||||
|
ShelfCode = ShelfCode,
|
||||||
|
MatCode = MatCode,
|
||||||
|
MatName = MatName,
|
||||||
|
|
||||||
|
UserName = LocalStatic.CurrentUser,
|
||||||
|
DeviceType = LocalFile.Config.DeviceType,
|
||||||
|
PageNumber = CurrentPage,
|
||||||
|
PageSize = PageSize,
|
||||||
|
};
|
||||||
|
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<MatDetailHistoryInfoModel>>(LocalFile.Config.ApiIpHost + "matDetailHistoryInfo/getMatDetailHistoryInfos", body, "POST");
|
||||||
|
if (Result != null && Result.Data != null && Result.Data.Lists != null)
|
||||||
|
{
|
||||||
|
DataGridItemSource = Result.Data.Lists;
|
||||||
|
MaxPage = Result.Data.MaxPage;
|
||||||
|
TotalCount = Result.Data.TotalCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Growl.Error("加载数据失败:" + ex.Message);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
dia.Close();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
|
||||||
|
public ICommand BtnDeleteCommand { get => new DelegateCommand(BtnDelete); }
|
||||||
|
public void BtnDelete()
|
||||||
|
{
|
||||||
|
Growl.Ask($"是否删除所有勾选的数据?", isConfirmed =>
|
||||||
|
{
|
||||||
|
if (isConfirmed)
|
||||||
|
{
|
||||||
|
//查询勾选的第一个数据
|
||||||
|
var needDeleteIds = DataGridItemSource?.Where(t => t.IsSelected == true)
|
||||||
|
.Select(t => t.Id)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
if (needDeleteIds == null)
|
||||||
|
{
|
||||||
|
Growl.Warning("请选择需要修改的数据!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var body = new DeleteInfosRequest()
|
||||||
|
{
|
||||||
|
UserName = LocalStatic.CurrentUser,
|
||||||
|
DeviceType = LocalFile.Config.DeviceType,
|
||||||
|
needDeleteIds = needDeleteIds,
|
||||||
|
};
|
||||||
|
var Result = ApiHelp.GetDataFromHttp<ResponseBase<UserModel>>(LocalFile.Config.ApiIpHost + "matDetailHistoryInfo/deleteMatDetailHistoryInfo", body, "POST");
|
||||||
|
if (Result != null && Result.Code == 200)
|
||||||
|
{
|
||||||
|
BtnSearch();
|
||||||
|
Growl.Success("删除成功!" + Result?.Message);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Growl.Error($"{Result?.Message?.ToString()}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region PageOperation 分页操作
|
||||||
|
private int currentPage;
|
||||||
|
public int CurrentPage
|
||||||
|
{
|
||||||
|
get { return currentPage; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
SetProperty(ref currentPage, value);
|
||||||
|
BtnSearch(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int maxPage;
|
||||||
|
public int MaxPage
|
||||||
|
{
|
||||||
|
get { return maxPage; }
|
||||||
|
set { SetProperty(ref maxPage, value); }
|
||||||
|
}
|
||||||
|
|
||||||
|
//总数量
|
||||||
|
private int totalCount;
|
||||||
|
public int TotalCount
|
||||||
|
{
|
||||||
|
get { return totalCount; }
|
||||||
|
set { SetProperty(ref totalCount, value); }
|
||||||
|
}
|
||||||
|
|
||||||
|
private int pageSize = 10;
|
||||||
|
public int PageSize
|
||||||
|
{
|
||||||
|
get => pageSize;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
SetProperty(ref pageSize, value);
|
||||||
|
BtnSearch(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ICommand BtnFirstPageCommand { get => new DelegateCommand(BtnFirstPage); }
|
||||||
|
public void BtnFirstPage()
|
||||||
|
{
|
||||||
|
CurrentPage = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ICommand BtnPrePageCommand { get => new DelegateCommand(BtnPrePage); }
|
||||||
|
public void BtnPrePage()
|
||||||
|
{
|
||||||
|
if (CurrentPage > 1)
|
||||||
|
{
|
||||||
|
CurrentPage--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ICommand BtnNextPageCommand { get => new DelegateCommand(BtnNextPage); }
|
||||||
|
public void BtnNextPage()
|
||||||
|
{
|
||||||
|
if (CurrentPage < MaxPage)
|
||||||
|
{
|
||||||
|
CurrentPage++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ICommand BtnLastPageCommand { get => new DelegateCommand(BtnLastPage); }
|
||||||
|
public void BtnLastPage()
|
||||||
|
{
|
||||||
|
if (CurrentPage != MaxPage)
|
||||||
|
{
|
||||||
|
CurrentPage = MaxPage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -29,8 +29,6 @@ namespace 智慧物流软件系统.ViewModel
|
|||||||
{
|
{
|
||||||
StocktakingStatuses.Add(status.ToString());
|
StocktakingStatuses.Add(status.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Property
|
#region Property
|
||||||
|
@ -253,8 +253,8 @@ namespace 智慧物流软件系统.ViewModel
|
|||||||
// MatCode = MatCode,
|
// MatCode = MatCode,
|
||||||
// StoreCode = StoreCode,
|
// StoreCode = StoreCode,
|
||||||
|
|
||||||
// ShelfTypeId = SelectedLocationAreaItems == null ? 0 : SelectedLocationAreaItems.Id,
|
// ShelfTypeId = SelectedRecordTypeItem == null ? 0 : SelectedRecordTypeItem.Id,
|
||||||
// LocationCode = LocationCode,
|
// ShelfCode = ShelfCode,
|
||||||
|
|
||||||
// UserName = LocalStatic.CurrentUser,
|
// UserName = LocalStatic.CurrentUser,
|
||||||
// DeviceType = LocalFile.Config.DeviceType,
|
// DeviceType = LocalFile.Config.DeviceType,
|
||||||
@ -342,8 +342,8 @@ namespace 智慧物流软件系统.ViewModel
|
|||||||
// MatCode = MatCode,
|
// MatCode = MatCode,
|
||||||
// StoreCode = StoreCode,
|
// StoreCode = StoreCode,
|
||||||
|
|
||||||
// ShelfTypeId = SelectedLocationAreaItems == null ? 0 : SelectedLocationAreaItems.Id,
|
// ShelfTypeId = SelectedRecordTypeItem == null ? 0 : SelectedRecordTypeItem.Id,
|
||||||
// LocationCode = LocationCode,
|
// ShelfCode = ShelfCode,
|
||||||
|
|
||||||
// UserName = LocalStatic.CurrentUser,
|
// UserName = LocalStatic.CurrentUser,
|
||||||
// DeviceType = LocalFile.Config.DeviceType,
|
// DeviceType = LocalFile.Config.DeviceType,
|
||||||
@ -443,8 +443,8 @@ namespace 智慧物流软件系统.ViewModel
|
|||||||
// MatCode = MatCode,
|
// MatCode = MatCode,
|
||||||
// StoreCode = StoreCode,
|
// StoreCode = StoreCode,
|
||||||
|
|
||||||
// ShelfTypeId = SelectedLocationAreaItems == null ? 0 : SelectedLocationAreaItems.Id,
|
// ShelfTypeId = SelectedRecordTypeItem == null ? 0 : SelectedRecordTypeItem.Id,
|
||||||
// LocationCode = LocationCode,
|
// ShelfCode = ShelfCode,
|
||||||
|
|
||||||
// UserName = LocalStatic.CurrentUser,
|
// UserName = LocalStatic.CurrentUser,
|
||||||
// DeviceType = LocalFile.Config.DeviceType,
|
// DeviceType = LocalFile.Config.DeviceType,
|
||||||
|
@ -115,7 +115,7 @@ namespace 智慧物流软件系统.ViewModels
|
|||||||
{
|
{
|
||||||
HandyControl.Controls.MessageBox.Show("请选择货架类型!");
|
HandyControl.Controls.MessageBox.Show("请选择货架类型!");
|
||||||
}
|
}
|
||||||
//var window = new OutInventoryAddMatView(SelectedLocationAreaItems.Id);
|
//var window = new OutInventoryAddMatView(SelectedRecordTypeItem.Id);
|
||||||
//window.Owner = Application.Current.MainWindow;
|
//window.Owner = Application.Current.MainWindow;
|
||||||
//window.Topmost = true;
|
//window.Topmost = true;
|
||||||
|
|
||||||
@ -192,8 +192,8 @@ namespace 智慧物流软件系统.ViewModels
|
|||||||
// {
|
// {
|
||||||
// OrderType = "出库",
|
// OrderType = "出库",
|
||||||
// OrderSource = "WCS前端",
|
// OrderSource = "WCS前端",
|
||||||
// ShelfTypeId = SelectedLocationAreaItems.Id,
|
// ShelfTypeId = SelectedRecordTypeItem.Id,
|
||||||
// ShelfTypeName = SelectedLocationAreaItems.ShelfTypeName,
|
// ShelfTypeName = SelectedRecordTypeItem.ShelfTypeName,
|
||||||
// ItemList = DataGridItemSource.Select(t => new MatCodeItemList()
|
// ItemList = DataGridItemSource.Select(t => new MatCodeItemList()
|
||||||
// {
|
// {
|
||||||
// MatCode = t.MatCode,
|
// MatCode = t.MatCode,
|
||||||
|
@ -226,7 +226,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</TabItem.Header>
|
</TabItem.Header>
|
||||||
<hc:TransitioningContentControl TransitionMode="Fade">
|
<hc:TransitioningContentControl TransitionMode="Fade">
|
||||||
<View:InOutRecordView/>
|
<View:MatDetailHistoryInfoView/>
|
||||||
</hc:TransitioningContentControl>
|
</hc:TransitioningContentControl>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Padding="10,10,40,10"
|
<TabItem Padding="10,10,40,10"
|
||||||
|
328
货架标准上位机/Views/MatDetailHistoryInfoView.xaml
Normal file
328
货架标准上位机/Views/MatDetailHistoryInfoView.xaml
Normal file
@ -0,0 +1,328 @@
|
|||||||
|
<pi:UserControlBase
|
||||||
|
xmlns:pi="https://github.com/ping9719/wpfex"
|
||||||
|
x:Class="智慧物流软件系统.MatDetailHistoryInfoView"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="737" d:DesignWidth="1192" LoadedVisibleFirst="LoadedVisible">
|
||||||
|
<Border Margin="0" Background="AliceBlue" CornerRadius="3" Padding="0">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1.6*"></RowDefinition>
|
||||||
|
<RowDefinition Height="9*"></RowDefinition>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Grid.Row="0" Margin="5 5 5 0" Background="AliceBlue" CornerRadius="5" Padding="0">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition></RowDefinition>
|
||||||
|
<RowDefinition></RowDefinition>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.9*"></ColumnDefinition>
|
||||||
|
<ColumnDefinition Width="2*"></ColumnDefinition>
|
||||||
|
<ColumnDefinition Width="1.9*"></ColumnDefinition>
|
||||||
|
<ColumnDefinition Width="3.2*"></ColumnDefinition>
|
||||||
|
<ColumnDefinition Width="1.9*"></ColumnDefinition>
|
||||||
|
<ColumnDefinition Width="2*"></ColumnDefinition>
|
||||||
|
<ColumnDefinition Width="1.9*"></ColumnDefinition>
|
||||||
|
<ColumnDefinition Width="2*"></ColumnDefinition>
|
||||||
|
<ColumnDefinition Width="1*"></ColumnDefinition>
|
||||||
|
<ColumnDefinition Width="2*"></ColumnDefinition>
|
||||||
|
<ColumnDefinition Width="2*"></ColumnDefinition>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Text="记录类型:"
|
||||||
|
FontSize="18"></TextBlock>
|
||||||
|
<ComboBox Grid.Row="0"
|
||||||
|
Grid.Column="1"
|
||||||
|
|
||||||
|
ItemsSource="{Binding RecordTypeItems}"
|
||||||
|
SelectedItem="{Binding SelectedRecordTypeItem}"
|
||||||
|
Height="30"
|
||||||
|
FontSize="18"
|
||||||
|
IsEditable="False" />
|
||||||
|
|
||||||
|
<TextBlock Grid.Column="2"
|
||||||
|
VerticalAlignment="Center" HorizontalAlignment="Right"
|
||||||
|
Text="操作功能:" FontSize="18" ></TextBlock>
|
||||||
|
<ComboBox Grid.Row="0"
|
||||||
|
Grid.Column="3"
|
||||||
|
|
||||||
|
ItemsSource="{Binding FunctionTypeItems}"
|
||||||
|
SelectedItem="{Binding SelectedFunctionTypeItem}"
|
||||||
|
Height="30"
|
||||||
|
FontSize="18"
|
||||||
|
IsEditable="False" />
|
||||||
|
<TextBlock Grid.Column="4"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Text="货架编码:"
|
||||||
|
FontSize="18"></TextBlock>
|
||||||
|
<TextBox Grid.Column="5"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
FontSize="18"
|
||||||
|
MinWidth="90"
|
||||||
|
Text="{Binding ShelfCode}"></TextBox>
|
||||||
|
<Button Style="{StaticResource ButtonSuccess}" hc:BorderElement.CornerRadius="15"
|
||||||
|
Grid.Column="9" MinHeight="40" FontSize="18" Content=" 搜索" FontFamily="{StaticResource IconFont}"
|
||||||
|
Command="{Binding BtnSearchCommand}">
|
||||||
|
</Button>
|
||||||
|
<Button Style="{StaticResource ButtonWarning}" hc:BorderElement.CornerRadius="15"
|
||||||
|
Grid.Column="10" MinHeight="40" FontSize="18" Content=" 重置" FontFamily="{StaticResource IconFont}"
|
||||||
|
Command="{Binding BtnResetCommand}">
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Grid.Row="1"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Text="物料编码:"
|
||||||
|
FontSize="18"></TextBlock>
|
||||||
|
<TextBox Grid.Column="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
FontSize="18"
|
||||||
|
MinWidth="90"
|
||||||
|
Text="{Binding MatCode}"></TextBox>
|
||||||
|
<TextBlock Grid.Column="2"
|
||||||
|
Grid.Row="1"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Text="物料名称:"
|
||||||
|
FontSize="18"></TextBlock>
|
||||||
|
<TextBox Grid.Column="3"
|
||||||
|
Grid.Row="1"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
FontSize="18"
|
||||||
|
MinWidth="90"
|
||||||
|
Text="{Binding MatName}"></TextBox>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Border Grid.Row="1" Margin="5" Background="AliceBlue" CornerRadius="5" Padding="0">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.8*"></RowDefinition>
|
||||||
|
<RowDefinition Height="8.2*"></RowDefinition>
|
||||||
|
<RowDefinition Height="0.8*"></RowDefinition>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
||||||
|
<Button MinHeight="40"
|
||||||
|
FontSize="18"
|
||||||
|
Margin="5"
|
||||||
|
Content="删 除"
|
||||||
|
FontFamily="{StaticResource IconFont}"
|
||||||
|
Foreground="WhiteSmoke"
|
||||||
|
Command="{Binding BtnDeleteCommand}"
|
||||||
|
Style="{StaticResource ButtonDanger}"></Button>
|
||||||
|
<Button MinHeight="40" FontSize="18" Margin="5"
|
||||||
|
Content="导 出" FontFamily="{StaticResource IconFont}"
|
||||||
|
Command="{Binding BtnExportCommand}"
|
||||||
|
Foreground="WhiteSmoke"
|
||||||
|
Background="DarkOrange">
|
||||||
|
</Button>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<DataGrid Grid.Row="1"
|
||||||
|
SelectionChanged="DataGrid_SelectionChanged"
|
||||||
|
SelectedItem="{Binding SelectedataGridItem}"
|
||||||
|
Name="dataGrid"
|
||||||
|
SelectedCellsChanged="DataGrid_SelectedCellsChanged"
|
||||||
|
ItemsSource="{Binding DataGridItemSource}"
|
||||||
|
RowHeight="39"
|
||||||
|
AutoGenerateColumns="False" FontSize="13">
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTemplateColumn CanUserResize="False">
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<CheckBox Width="30" Height="30" IsHitTestVisible="False" IsChecked="{Binding IsSelected}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataGridTemplateColumn.HeaderTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<CheckBox Width="30" Height="30" Unchecked="allChecked_Unchecked" Checked="allChecked_Checked" Name="allChecked"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.HeaderTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTextColumn IsReadOnly="True" Header="序号" Binding="{Binding RowNumber}"></DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="货架类型" MaxWidth="150" Binding="{Binding ShelfType}"></DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="货架编码" Binding="{Binding ShelfCode}"></DataGridTextColumn>
|
||||||
|
|
||||||
|
<DataGridTextColumn Header="位置区域" MaxWidth="150" Binding="{Binding LocationArea}"></DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="位置编号" Binding="{Binding LocationCode}"></DataGridTextColumn>
|
||||||
|
|
||||||
|
<DataGridTextColumn Header="物料编码" Binding="{Binding MatCode}"></DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="物料名称" Binding="{Binding MatName}"></DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="物料规格" Binding="{Binding MatSpec}"></DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="数量" Binding="{Binding MatQty}"></DataGridTextColumn>
|
||||||
|
<DataGridTextColumn IsReadOnly="True" Header="更新人" Binding="{Binding ModifyUser}"></DataGridTextColumn>
|
||||||
|
<DataGridTextColumn IsReadOnly="True" Header="更新时间" Binding="{Binding ModifyTime ,StringFormat='yyyy-MM-dd HH:mm:ss'}"></DataGridTextColumn>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</DataGrid>
|
||||||
|
|
||||||
|
<Grid Grid.Row="2">
|
||||||
|
<Border CornerRadius="3" Background="Transparent" VerticalAlignment="Center" >
|
||||||
|
<Grid HorizontalAlignment="Stretch" Margin="0" VerticalAlignment="Top" Width="Auto" MinHeight="26">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
||||||
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
||||||
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="5">
|
||||||
|
<TextBlock FontSize="14" VerticalAlignment="Center" Text="共"></TextBlock>
|
||||||
|
<TextBlock FontSize="14" VerticalAlignment="Center" Text="{Binding TotalCount ,FallbackValue=0}"></TextBlock>
|
||||||
|
<TextBlock FontSize="14" VerticalAlignment="Center" Text="条记录 "></TextBlock>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<TextBlock FontSize="14" VerticalAlignment="Center" Text="第"></TextBlock>
|
||||||
|
<TextBlock FontSize="14" VerticalAlignment="Center" Text="{Binding CurrentPage,FallbackValue=0}"></TextBlock>
|
||||||
|
<TextBlock FontSize="14" VerticalAlignment="Center" Text="/"></TextBlock>
|
||||||
|
<TextBlock FontSize="14" VerticalAlignment="Center" Text="{Binding MaxPage,FallbackValue=0}"></TextBlock>
|
||||||
|
<TextBlock FontSize="14" VerticalAlignment="Center" Text="页 "></TextBlock>
|
||||||
|
|
||||||
|
<ComboBox FontSize="14" VerticalAlignment="Center" SelectedValue="{Binding PageSize}" SelectedValuePath="Tag">
|
||||||
|
<ComboBoxItem Tag="10" IsSelected="True">10条/页</ComboBoxItem>
|
||||||
|
<ComboBoxItem Tag="20">20条/页</ComboBoxItem>
|
||||||
|
<ComboBoxItem Tag="50">50条/页</ComboBoxItem>
|
||||||
|
<ComboBoxItem Tag="100">100条/页</ComboBoxItem>
|
||||||
|
<ComboBoxItem Tag="500">500条/页</ComboBoxItem>
|
||||||
|
</ComboBox>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Column="1">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions >
|
||||||
|
<RowDefinition Height="30"></RowDefinition>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="auto"/>
|
||||||
|
<ColumnDefinition Width="auto"/>
|
||||||
|
<ColumnDefinition Width="auto"/>
|
||||||
|
<ColumnDefinition Width="auto"/>
|
||||||
|
<ColumnDefinition Width="auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Button BorderBrush="Transparent" Background="Transparent" Grid.Column="0" Name="btnFirst" Content="首页" Foreground="Black" FontSize="14"
|
||||||
|
Command="{Binding BtnFirstPageCommand}"/>
|
||||||
|
<Button BorderBrush="Transparent" Background="Transparent" Grid.Column="1" Name="btnPrev" Content="上一页" FontSize="14"
|
||||||
|
Command="{Binding BtnPrePageCommand}"/>
|
||||||
|
<TextBox BorderBrush="Transparent" Grid.Column="2" FontSize="14" MinWidth="50" HorizontalAlignment="Center" VerticalAlignment="Center" Cursor="IBeam" IsEnabled="False"
|
||||||
|
Text ="{Binding CurrentPage}" TextAlignment="Center"/>
|
||||||
|
<Button BorderBrush="Transparent" Background="Transparent" Grid.Column="3" Name="btnNext" Content="下一页" FontSize="14"
|
||||||
|
Command="{Binding BtnNextPageCommand}"/>
|
||||||
|
<Button BorderBrush="Transparent" Background="Transparent" Grid.Column="4" Name="btnLast" Content="末页" FontSize="14"
|
||||||
|
Command="{Binding BtnLastPageCommand}"/>
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<!--<Border Grid.Row="1" Margin="3" Background="AliceBlue" CornerRadius="3" Padding="0">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.8*"></RowDefinition>
|
||||||
|
<RowDefinition Height="8*"></RowDefinition>
|
||||||
|
<RowDefinition Height="0.7*"></RowDefinition>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
||||||
|
<Button MinHeight="40" FontSize="18" Margin="5" Command="{Binding BtnExportCommand}"
|
||||||
|
Content=" 导 出" FontFamily="{StaticResource IconFont}"
|
||||||
|
Style="{StaticResource ButtonWarning}" Background="DarkOrange">
|
||||||
|
</Button>
|
||||||
|
</StackPanel>
|
||||||
|
<DataGrid Grid.Row="1"
|
||||||
|
SelectedCellsChanged="DataGrid_SelectedCellsChanged"
|
||||||
|
ItemsSource="{Binding DataGridItemSource}"
|
||||||
|
RowHeight="39"
|
||||||
|
AutoGenerateColumns="False"
|
||||||
|
FontSize="13">
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn Header="序号" Binding="{Binding RowNumber}"></DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="接口地址" Binding="{Binding RequestUrl}"></DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="设备IP" Binding="{Binding DeviceIp}"></DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="请求参数" Binding="{Binding RequestBody}" MaxWidth="100"></DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="QueryString" Binding="{Binding QueryString}" MaxWidth="100"></DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="请求时间" Binding="{Binding RequestTime,StringFormat='yyyy-MM-dd HH:mm:ss'}"></DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="返回参数" Binding="{Binding ResponseJson}" MaxWidth="100"></DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="返回时间" Binding="{Binding ResponseTime,StringFormat='yyyy-MM-dd HH:mm:ss'}"></DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="耗时(ms)" Binding="{Binding ExecutionTime}"></DataGridTextColumn>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</DataGrid>
|
||||||
|
|
||||||
|
<Grid Grid.Row="2">
|
||||||
|
<Border CornerRadius="3" Background="Transparent" VerticalAlignment="Center" >
|
||||||
|
<Grid HorizontalAlignment="Stretch" Margin="0" VerticalAlignment="Top" Width="Auto" MinHeight="26">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
||||||
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
||||||
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal" Margin="5">
|
||||||
|
<TextBlock FontSize="14" Text="共"></TextBlock>
|
||||||
|
<TextBlock FontSize="14" Text="{Binding TotalCount ,FallbackValue=0}"></TextBlock>
|
||||||
|
<TextBlock FontSize="14" Text="条记录 "></TextBlock>
|
||||||
|
<TextBlock FontSize="14" Text="第"></TextBlock>
|
||||||
|
<TextBlock FontSize="14" Text="{Binding CurrentPage,FallbackValue=0}"></TextBlock>
|
||||||
|
<TextBlock FontSize="14" Text="/"></TextBlock>
|
||||||
|
<TextBlock FontSize="14" Text="{Binding MaxPage,FallbackValue=0}"></TextBlock>
|
||||||
|
<TextBlock FontSize="14" Text="页"></TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Column="1">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions >
|
||||||
|
<RowDefinition Height="30"></RowDefinition>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="auto"/>
|
||||||
|
<ColumnDefinition Width="auto"/>
|
||||||
|
<ColumnDefinition Width="auto"/>
|
||||||
|
<ColumnDefinition Width="auto"/>
|
||||||
|
<ColumnDefinition Width="auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Button BorderBrush="Transparent" Background="Transparent" Grid.Column="0" Name="btnFirst" Content="首页" Foreground="Black" FontSize="14"
|
||||||
|
Command="{Binding BtnFirstPageCommand}"/>
|
||||||
|
<Button BorderBrush="Transparent" Background="Transparent" Grid.Column="1" Name="btnPrev" Content="上一页" FontSize="14"
|
||||||
|
Command="{Binding BtnPrePageCommand}"/>
|
||||||
|
<TextBox BorderBrush="Transparent" Grid.Column="2" FontSize="14" MinWidth="50" HorizontalAlignment="Center" VerticalAlignment="Center" Cursor="IBeam" IsEnabled="False"
|
||||||
|
Text ="{Binding CurrentPage}" TextAlignment="Center"
|
||||||
|
|
||||||
|
/>
|
||||||
|
<Button BorderBrush="Transparent" Background="Transparent" Grid.Column="3" Name="btnNext" Content="下一页" FontSize="14"
|
||||||
|
Command="{Binding BtnNextPageCommand}"/>
|
||||||
|
<Button BorderBrush="Transparent" Background="Transparent" Grid.Column="4" Name="btnLast" Content="末页" FontSize="14"
|
||||||
|
Command="{Binding BtnLastPageCommand}"/>
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Border>-->
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</pi:UserControlBase>
|
77
货架标准上位机/Views/MatDetailHistoryInfoView.xaml.cs
Normal file
77
货架标准上位机/Views/MatDetailHistoryInfoView.xaml.cs
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
using Ping9719.WpfEx;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
using 智慧物流软件系统.ViewModel;
|
||||||
|
|
||||||
|
namespace 智慧物流软件系统
|
||||||
|
{
|
||||||
|
public partial class MatDetailHistoryInfoView : UserControlBase
|
||||||
|
{
|
||||||
|
public MatDetailHistoryInfoViewModel viewModel { get; set; } = new MatDetailHistoryInfoViewModel();
|
||||||
|
public MatDetailHistoryInfoView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
this.DataContext = viewModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadedVisible(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
viewModel.BtnReset();
|
||||||
|
viewModel.BtnSearchReset();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (viewModel.SelectedataGridItem != null)
|
||||||
|
{
|
||||||
|
viewModel.SelectedataGridItem.IsSelected = !viewModel.SelectedataGridItem.IsSelected;
|
||||||
|
dataGrid.UnselectAllCells();//取消选中 避免手动点击check选项时反选失败 和重新点击该项时反选失败
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGrid_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void allChecked_Checked(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (viewModel != null && viewModel.DataGridItemSource != null && viewModel.DataGridItemSource.Count() > 0)
|
||||||
|
{
|
||||||
|
foreach (var item in viewModel.DataGridItemSource)
|
||||||
|
{
|
||||||
|
item.IsSelected = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void allChecked_Unchecked(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (viewModel != null && viewModel.DataGridItemSource != null && viewModel.DataGridItemSource.Count() > 0)
|
||||||
|
{
|
||||||
|
foreach (var item in viewModel.DataGridItemSource)
|
||||||
|
{
|
||||||
|
item.IsSelected = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user