可放置货架类型
This commit is contained in:
@ -107,6 +107,9 @@ namespace WCS.DAL.DbModels
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public int RowNumber { get; set; }
|
||||
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public List<string> AllowShelfTypesName { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// 是否已经选择
|
||||
/// </summary>
|
||||
|
@ -40,9 +40,15 @@ namespace WCS.BLL.Services.Service
|
||||
var records = await recordsQueryable
|
||||
.Skip((request.PageNumber - 1) * request.PageSize).Take(request.PageSize)
|
||||
.ToListAsync();
|
||||
//获取系统内货架类型
|
||||
var shelfTypes = await DbHelp.db.Queryable<ShelfTypeInfo>().ToListAsync();
|
||||
|
||||
//生成序号
|
||||
for (int i = 0; i < records.Count; i++)
|
||||
{
|
||||
records[i].AllowShelfTypesName = shelfTypes.Where(s => records[i].AllowShelfTypes.Contains(s.Id))
|
||||
.Select(t => t.ShelfTypeName)
|
||||
.ToList();
|
||||
records[i].RowNumber = (request.PageNumber - 1) * request.PageSize + i + 1;
|
||||
}
|
||||
return new PageQueryResponse<LocationInfo>()
|
||||
|
@ -33,7 +33,9 @@ namespace WCS.Model.ApiModel.StoreInfo
|
||||
/// <summary>
|
||||
/// 允许放置的货架类型
|
||||
/// </summary>
|
||||
public List<string> AllowShelfTypes { get; set; } = new List<string>();
|
||||
public List<string> AllowShelfTypesName { get; set; } = new List<string>();
|
||||
public List<int?>? AllowShelfTypes { get; set; } =new List<int?>();
|
||||
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
|
@ -40,9 +40,9 @@ namespace 智慧物流软件系统.ViewModel
|
||||
|
||||
var task2 = Task.Run(() =>
|
||||
{
|
||||
AllowShelfTypes = new List<string>();
|
||||
AllowShelfTypes = new List<ShelfTypeModel>();
|
||||
AllowShelfTypes = GetBaseData.GetShelfType()
|
||||
.Select(t => t.ShelfTypeName)
|
||||
//.Select(t => t.ShelfTypeName)
|
||||
.ToList();
|
||||
});
|
||||
|
||||
@ -72,14 +72,16 @@ namespace 智慧物流软件系统.ViewModel
|
||||
//comboBox.selec
|
||||
App.Current.Dispatcher.Invoke(() =>
|
||||
{
|
||||
locationInfoModel.AllowShelfTypes?.ForEach(t => checkComboBox.SelectedItems.Add(t));
|
||||
locationInfoModel.AllowShelfTypesName?.ForEach(t =>
|
||||
checkComboBox.SelectedItems.Add(AllowShelfTypes.Where(a => a.ShelfTypeName == t).FirstOrDefault()));
|
||||
});
|
||||
|
||||
IsEnable = locationInfoModel.IsEnable;
|
||||
}
|
||||
|
||||
public LocationInfoModel GetValues()
|
||||
{
|
||||
var selectShelfTypes = checkComboBox.SelectedItems?.Cast<string>().ToList();
|
||||
var selectShelfTypes = checkComboBox.SelectedItems?.Cast<ShelfTypeModel>().Select(t => t.Id).ToList();
|
||||
|
||||
return new LocationInfoModel()
|
||||
{
|
||||
@ -137,8 +139,8 @@ namespace 智慧物流软件系统.ViewModel
|
||||
/// <summary>
|
||||
/// 允许放置的货架类型
|
||||
/// </summary>
|
||||
private List<string> allowShelfTypes;
|
||||
public List<string> AllowShelfTypes
|
||||
private List<ShelfTypeModel> allowShelfTypes;
|
||||
public List<ShelfTypeModel> AllowShelfTypes
|
||||
{
|
||||
get { return allowShelfTypes; }
|
||||
set
|
||||
|
@ -62,6 +62,7 @@
|
||||
|
||||
<hc:CheckComboBox Margin="5" Height="60"
|
||||
ItemsSource="{Binding AllowShelfTypes}"
|
||||
DisplayMemberPath="ShelfTypeName"
|
||||
Name="Group" MinWidth="150" MaxWidth="150"
|
||||
hc:InfoElement.Necessary="True"
|
||||
Style="{StaticResource CheckComboBoxExtend}" >
|
||||
|
@ -149,7 +149,7 @@
|
||||
<DataGridTextColumn Header="位置区域" MaxWidth="150" Binding="{Binding LocationArea}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="位置编号" Binding="{Binding LocationCode}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="RCS库位编号" MaxWidth="150" Binding="{Binding RcsStoreCode}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="可放置货架类型" Binding="{Binding AllowShelfTypes,Converter={StaticResource listToString}}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="可放置货架类型" Binding="{Binding AllowShelfTypesName,Converter={StaticResource listToString}}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="启用状态" Binding="{Binding IsEnableStr}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="更新人" Binding="{Binding ModifyUser}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="更新时间" Binding="{Binding ModifyTime ,StringFormat='yyyy-MM-dd HH:mm:ss'}"></DataGridTextColumn>
|
||||
|
Reference in New Issue
Block a user