提交部分 物料绑定(wcs客户端)的代码
This commit is contained in:
@ -89,11 +89,19 @@ namespace WCS.BLL.DbModels
|
||||
public int MatQty { get; set; }
|
||||
#endregion
|
||||
|
||||
#region 单据属性
|
||||
/// <summary>
|
||||
/// 单据编号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "order_number", Length = 64, IsNullable = true, ColumnDescription = "单据编号")]
|
||||
public string OrderNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 站位编号 用于物料批量绑定时区分是哪个工位绑定的明细
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "station_code", Length = 64, IsNullable = true, ColumnDescription = "站位编号")]
|
||||
public string StationCode { get; set; }
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
|
22
WCS.BLL/DbModels/STZL/OrderTypeInfo.cs
Normal file
22
WCS.BLL/DbModels/STZL/OrderTypeInfo.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WCS.BLL.DbModels
|
||||
{
|
||||
/// <summary>
|
||||
/// 货架类型
|
||||
/// </summary>
|
||||
[SugarTable("wcs_order_type")]
|
||||
public class OrderTypeInfo
|
||||
{
|
||||
[SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsNullable = false, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "order_type_name", Length = 64, IsNullable = false, ColumnDescription = "单据类型名称")]
|
||||
public string OrderTypeName { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -71,7 +71,7 @@ namespace WCS.BLL.Manager
|
||||
Logs.Write("【初始化数据库】创建数据库", LogsType.StartBoot);
|
||||
|
||||
DbHelp.db.CodeFirst.InitTables(typeof(ShelfInfo), typeof(MatBaseInfo), typeof(ShelfTypeInfo)
|
||||
,typeof(LocationInfo), typeof(LocationAreaInfo),typeof(MatDetailCurrentInfo)
|
||||
, typeof(LocationInfo), typeof(LocationAreaInfo), typeof(MatDetailCurrentInfo), typeof(OrderTypeInfo)
|
||||
, typeof(InventoryDetail), typeof(OutOrder), typeof(OutOrderDetail), typeof(OutOrderMatDetail)
|
||||
, typeof(MatInfo), typeof(StoreInfo)
|
||||
, typeof(StockTakingOrder), typeof(StockTakingOrderMatDetail), typeof(InOutRecord)
|
||||
|
12
WCS.Model/ApiModel/BatchBindMatDetail/ShelfTypeModel.cs
Normal file
12
WCS.Model/ApiModel/BatchBindMatDetail/ShelfTypeModel.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WCS.Model.ApiModel.Home
|
||||
{
|
||||
public class OrderTypeModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string OrderTypeName { get; set; }
|
||||
}
|
||||
}
|
@ -8,6 +8,5 @@ namespace WCS.Model.ApiModel.Home
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string ShelfTypeName { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
267
WCS.WebApi/Controllers/BatchBindMatDetailController.cs
Normal file
267
WCS.WebApi/Controllers/BatchBindMatDetailController.cs
Normal file
@ -0,0 +1,267 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using WCS.BLL.DbModels;
|
||||
using WCS.BLL.Services.IService;
|
||||
using WCS.DAL.Db;
|
||||
using WCS.DAL.DbModels;
|
||||
using WCS.Model;
|
||||
using WCS.Model.ApiModel;
|
||||
using WCS.Model.ApiModel.Home;
|
||||
using WCS.Model.ApiModel.PDAMatBind;
|
||||
using WCS.Model.ApiModel.User;
|
||||
using WCS.Model.WebSocketModel;
|
||||
|
||||
namespace WCS.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// PDA物料绑定相关接口
|
||||
/// </summary>
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
||||
public class BatchBindMatDetailController : ControllerBase
|
||||
{
|
||||
public IWarningService _warningService { get; set; }
|
||||
|
||||
public BatchBindMatDetailController(IWarningService warningService)
|
||||
{
|
||||
_warningService = warningService;
|
||||
}
|
||||
|
||||
[Route("getShelfTypes")]
|
||||
[HttpPost(Name = "getShelfTypes")]
|
||||
public async Task<ResponseBase> getShelfTypes(RequestBase request)
|
||||
{
|
||||
try
|
||||
{
|
||||
//直接获取当前所有货架类型并返回
|
||||
var shelfTypes = DbHelp.db.Queryable<ShelfTypeInfo>()
|
||||
.Select(t => new ShelfTypeModel()
|
||||
{
|
||||
Id = t.Id,
|
||||
ShelfTypeName = t.ShelfTypeName
|
||||
})
|
||||
.ToList();
|
||||
return new PageQueryResponse<ShelfTypeModel>()
|
||||
{
|
||||
Code = 200,
|
||||
Message = "success",
|
||||
Data = new PageQueryResponseData<ShelfTypeModel>
|
||||
{
|
||||
Lists = shelfTypes,
|
||||
Count = shelfTypes.Count
|
||||
}
|
||||
};
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new PageQueryResponse<ShelfTypeModel>()
|
||||
{
|
||||
Code = 300,
|
||||
Message = $"查询失败:{ex.Message}",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Route("getShelfInfoByLocationCode")]
|
||||
[HttpPost(Name = "getShelfInfoByLocationCode")]
|
||||
public async Task<ResponseBase> getShelfInfoByLocationCode(GetShelfInfoByLocationCodeRequest request)
|
||||
{
|
||||
//判断参数
|
||||
if (string.IsNullOrEmpty(request.LocationCode))
|
||||
{
|
||||
return new ResponseCommon()
|
||||
{
|
||||
Code = 201,
|
||||
Message = "工位编码为空!",
|
||||
Data = null,
|
||||
};
|
||||
}
|
||||
|
||||
//获取是否存在当前工位
|
||||
var location = await DbHelp.db.Queryable<LocationInfo>()
|
||||
.Where(t => t.LocationCode == request.LocationCode)
|
||||
.Where(t => t.IsEnable == true)
|
||||
.FirstAsync();
|
||||
if (location == null)
|
||||
{
|
||||
return new ResponseCommon()
|
||||
{
|
||||
Code = 201,
|
||||
Message = $"工位[{request.LocationCode}]不存在或已被禁用!\r\n请联系系统管理人员维护工位信息!",
|
||||
Data = null,
|
||||
};
|
||||
}
|
||||
|
||||
//获取当前工位的货架
|
||||
var shelf = await DbHelp.db.Queryable<ShelfInfo>()
|
||||
.Where(t => t.CurrentLocationId == location.Id && t.TransStatus == TransStatusEnum.静止
|
||||
|| t.DestinationLocationId == location.Id && t.TransStatus == TransStatusEnum.运输中)//解决产线人员 呼叫后货架未到的时候绑定的问题
|
||||
.Where(t => t.IsEnable)
|
||||
.FirstAsync();
|
||||
|
||||
return new ResponseBase<GetShelfInfoByLocationReturnData>()
|
||||
{
|
||||
Code = 200,
|
||||
Message = $"success",
|
||||
Data = new GetShelfInfoByLocationReturnData()
|
||||
{
|
||||
LocationId = location.Id,
|
||||
LocationCode = request.LocationCode,
|
||||
ShelfId = shelf?.Id,
|
||||
ShelfCode = shelf?.ShelfCode,
|
||||
},
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
//[Route("bindMatDetail")]
|
||||
//[HttpPost(Name = "bindMatDetail")]
|
||||
//public async Task<ResponseCommon> bindMatDetail(BindMatDetailRequest request)
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// #region 参数校验
|
||||
// //判断参数
|
||||
// if (request.LocationId == 0 || string.IsNullOrEmpty(request.LocationCode))
|
||||
// {
|
||||
// return new ResponseCommon()
|
||||
// {
|
||||
// Code = 201,
|
||||
// Message = "工位或工位编码为空!",
|
||||
// Data = null,
|
||||
// };
|
||||
// }
|
||||
|
||||
// if (request.ShelfId == 0 || string.IsNullOrEmpty(request.ShelfCode))
|
||||
// {
|
||||
|
||||
// return new ResponseCommon()
|
||||
// {
|
||||
// Code = 201,
|
||||
// Message = "货架或货架编码为空!",
|
||||
// Data = null,
|
||||
// };
|
||||
// }
|
||||
|
||||
// if (request.MatBaseInfoId == 0 || string.IsNullOrEmpty(request.MatCode))
|
||||
// {
|
||||
// return new ResponseCommon()
|
||||
// {
|
||||
// Code = 201,
|
||||
// Message = "未选择物料!",
|
||||
// Data = null,
|
||||
// };
|
||||
// }
|
||||
|
||||
// if (request.Qty <= 0)
|
||||
// {
|
||||
// return new ResponseCommon()
|
||||
// {
|
||||
// Code = 201,
|
||||
// Message = "数量应大于等于1!",
|
||||
// Data = null,
|
||||
// };
|
||||
// }
|
||||
// #endregion
|
||||
|
||||
// #region 数据校验
|
||||
// //判断参数
|
||||
// if (string.IsNullOrEmpty(request.LocationCode))
|
||||
// {
|
||||
// return new ResponseCommon()
|
||||
// {
|
||||
// Code = 201,
|
||||
// Message = "工位编码为空!",
|
||||
// Data = null,
|
||||
// };
|
||||
// }
|
||||
|
||||
// //获取是否存在当前工位
|
||||
// var location = await DbHelp.db.Queryable<LocationInfo>()
|
||||
// .Where(t => t.Id == request.LocationId)
|
||||
// .Where(t => t.IsEnable == true)
|
||||
// .FirstAsync();
|
||||
// if (location == null)
|
||||
// {
|
||||
// return new ResponseCommon()
|
||||
// {
|
||||
// Code = 201,
|
||||
// Message = $"工位[{request.LocationCode}]不存在或已被禁用!\r\n请联系系统管理人员维护工位信息!",
|
||||
// Data = null,
|
||||
// };
|
||||
// }
|
||||
|
||||
// //获取当前工位的货架
|
||||
// var shelf = await DbHelp.db.Queryable<ShelfInfo>()
|
||||
// .Where(t => t.Id == request.ShelfId)
|
||||
// .Where(t => t.CurrentLocationId == location.Id && t.TransStatus == TransStatusEnum.静止
|
||||
// || t.DestinationLocationId == location.Id && t.TransStatus == TransStatusEnum.运输中)//解决产线人员 呼叫后货架未到的时候绑定的问题
|
||||
// .Where(t => t.IsEnable == true)
|
||||
// .FirstAsync();
|
||||
// if (shelf == null)
|
||||
// {
|
||||
// return new ResponseCommon()
|
||||
// {
|
||||
// Code = 205,
|
||||
// Message = $"货架[{request.ShelfCode}],已不在工位上!\r\n请进行【货架呼叫】!",
|
||||
// Data = null,
|
||||
// };
|
||||
// }
|
||||
|
||||
// //获取物料基础信息
|
||||
// var matBaseInfo = await DbHelp.db.Queryable<MatBaseInfo>()
|
||||
// .Where(t => t.Id == request.MatBaseInfoId)
|
||||
// .Where(t => t.IsEnable == true)
|
||||
// .FirstAsync();
|
||||
// if (matBaseInfo == null)
|
||||
// {
|
||||
// return new ResponseCommon()
|
||||
// {
|
||||
// Code = 201,
|
||||
// Message = $"不存在物料[{request.MatCode}]或已被禁用!",
|
||||
// Data = null,
|
||||
// };
|
||||
// }
|
||||
// #endregion
|
||||
|
||||
// //校验合格 进行保存
|
||||
// var matDetailCurrentInfo = new MatDetailCurrentInfo()
|
||||
// {
|
||||
// ShlefId = shelf.Id,
|
||||
// ShelfCode = shelf.ShelfCode,
|
||||
// ShelfType = shelf.ShelfTypeName,
|
||||
// //ShelfArea = shelf.ShelfArea,
|
||||
|
||||
// MatCode = matBaseInfo.MatCode,
|
||||
// MatName = matBaseInfo.MatName,
|
||||
// MatSupplier = matBaseInfo.MatSupplier,
|
||||
// MatCustomer = matBaseInfo.MatCustomer,
|
||||
// MatSpec = matBaseInfo.MatSpec,
|
||||
// MatUnit = matBaseInfo.MatUnit,
|
||||
// MatQty = request.Qty,
|
||||
|
||||
// ModifyUser = request.UserName,
|
||||
// };
|
||||
// DbHelp.db.Insertable(matDetailCurrentInfo).ExecuteCommand();
|
||||
|
||||
// return new ResponseCommon()
|
||||
// {
|
||||
// Code = 200,
|
||||
// Message = "success",
|
||||
// Data = null,
|
||||
// };
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// return new ResponseCommon()
|
||||
// {
|
||||
// Code = 201,
|
||||
// Message = ex.Message,
|
||||
// Data = null,
|
||||
// };
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -245,17 +245,17 @@ namespace WCS.WebApi.Controllers
|
||||
{
|
||||
//直接获取当前所有货架类型并返回
|
||||
var shelfTypes = DbHelp.db.Queryable<ShelfTypeInfo>()
|
||||
.Select(t => new ShelfTypeModel()
|
||||
.Select(t => new OrderTypeModel()
|
||||
{
|
||||
Id = t.Id,
|
||||
ShelfTypeName = t.ShelfTypeName
|
||||
})
|
||||
.ToList();
|
||||
return new PageQueryResponse<ShelfTypeModel>()
|
||||
return new PageQueryResponse<OrderTypeModel>()
|
||||
{
|
||||
Code = 200,
|
||||
Message = "success",
|
||||
Data = new PageQueryResponseData<ShelfTypeModel>
|
||||
Data = new PageQueryResponseData<OrderTypeModel>
|
||||
{
|
||||
Lists = shelfTypes,
|
||||
Count = shelfTypes.Count
|
||||
@ -264,7 +264,7 @@ namespace WCS.WebApi.Controllers
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new PageQueryResponse<ShelfTypeModel>()
|
||||
return new PageQueryResponse<OrderTypeModel>()
|
||||
{
|
||||
Code = 300,
|
||||
Message = $"查询失败:{ex.Message}",
|
||||
|
@ -13,7 +13,7 @@ namespace 智慧物流软件系统.Tool
|
||||
{
|
||||
public static class GetBaseData
|
||||
{
|
||||
public static List<ShelfTypeModel> GetShelfType()
|
||||
public static List<OrderTypeModel> GetShelfType()
|
||||
{
|
||||
var body = new RequestBase()
|
||||
{
|
||||
@ -21,12 +21,12 @@ namespace 智慧物流软件系统.Tool
|
||||
DeviceType = LocalFile.Config.DeviceType,
|
||||
};
|
||||
|
||||
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<ShelfTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
||||
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<OrderTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
||||
if (Result != null && Result.Data != null && Result.Data.Lists.Count() > 0)
|
||||
{
|
||||
return Result.Data.Lists;
|
||||
}
|
||||
else { return new List<ShelfTypeModel>(); }
|
||||
else { return new List<OrderTypeModel>(); }
|
||||
}
|
||||
|
||||
public static List<LocationAreaInfoModel> GetLocationAreaInfos()
|
||||
|
@ -40,8 +40,8 @@ namespace 智慧物流软件系统.ViewModel
|
||||
InitShelfTypeItems();
|
||||
}
|
||||
|
||||
private List<ShelfTypeModel> shelfTypeItems;
|
||||
public List<ShelfTypeModel> ShelfTypeItems
|
||||
private List<OrderTypeModel> shelfTypeItems;
|
||||
public List<OrderTypeModel> ShelfTypeItems
|
||||
{
|
||||
get { return shelfTypeItems; }
|
||||
set
|
||||
@ -50,8 +50,8 @@ namespace 智慧物流软件系统.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
private ShelfTypeModel selectedShelfTypeItem;
|
||||
public ShelfTypeModel SelectedShelfTypeItem
|
||||
private OrderTypeModel selectedShelfTypeItem;
|
||||
public OrderTypeModel SelectedShelfTypeItem
|
||||
{
|
||||
get { return selectedShelfTypeItem; }
|
||||
set
|
||||
@ -71,7 +71,7 @@ namespace 智慧物流软件系统.ViewModel
|
||||
DeviceType = LocalFile.Config.DeviceType,
|
||||
};
|
||||
|
||||
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<ShelfTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
||||
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<OrderTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
||||
if (Result != null && Result.Data != null && Result.Data.Lists.Count() > 0)
|
||||
{
|
||||
ShelfTypeItems = Result.Data.Lists;
|
||||
|
@ -123,8 +123,8 @@ namespace 智慧物流软件系统.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
private List<ShelfTypeModel> shelfTypeItems;
|
||||
public List<ShelfTypeModel> ShelfTypeItems
|
||||
private List<OrderTypeModel> shelfTypeItems;
|
||||
public List<OrderTypeModel> ShelfTypeItems
|
||||
{
|
||||
get { return shelfTypeItems; }
|
||||
set
|
||||
@ -133,8 +133,8 @@ namespace 智慧物流软件系统.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
private ShelfTypeModel? selectedShelfTypeItem;
|
||||
public ShelfTypeModel? SelectedShelfTypeItem
|
||||
private OrderTypeModel? selectedShelfTypeItem;
|
||||
public OrderTypeModel? SelectedShelfTypeItem
|
||||
{
|
||||
get { return selectedShelfTypeItem; }
|
||||
set
|
||||
@ -147,8 +147,8 @@ namespace 智慧物流软件系统.ViewModel
|
||||
//调用接口更新!
|
||||
Task.Run(() =>
|
||||
{
|
||||
ShelfTypeItems = new List<ShelfTypeModel>();
|
||||
ShelfTypeItems.Add(new ShelfTypeModel { Id = null, ShelfTypeName = "全部" });
|
||||
ShelfTypeItems = new List<OrderTypeModel>();
|
||||
ShelfTypeItems.Add(new OrderTypeModel { Id = null, ShelfTypeName = "全部" });
|
||||
|
||||
var body = new RequestBase()
|
||||
{
|
||||
@ -156,7 +156,7 @@ namespace 智慧物流软件系统.ViewModel
|
||||
DeviceType = LocalFile.Config.DeviceType,
|
||||
};
|
||||
|
||||
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<ShelfTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
||||
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<OrderTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
||||
if (Result != null && Result.Data != null && Result.Data.Lists.Count() > 0)
|
||||
{
|
||||
ShelfTypeItems.AddRange(Result.Data.Lists);
|
||||
|
@ -177,8 +177,8 @@ namespace 智慧物流软件系统.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
private List<ShelfTypeModel> shelfTypeItems;
|
||||
public List<ShelfTypeModel> ShelfTypeItems
|
||||
private List<OrderTypeModel> shelfTypeItems;
|
||||
public List<OrderTypeModel> ShelfTypeItems
|
||||
{
|
||||
get { return shelfTypeItems; }
|
||||
set
|
||||
@ -197,7 +197,7 @@ namespace 智慧物流软件系统.ViewModel
|
||||
DeviceType = LocalFile.Config.DeviceType,
|
||||
};
|
||||
|
||||
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<ShelfTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
||||
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<OrderTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
||||
if (Result != null && Result.Data != null && Result.Data.Lists.Count() > 0)
|
||||
{
|
||||
ShelfTypeItems = Result.Data.Lists;
|
||||
@ -205,8 +205,8 @@ namespace 智慧物流软件系统.ViewModel
|
||||
});
|
||||
}
|
||||
|
||||
private ShelfTypeModel selectedShelfTypeItem;
|
||||
public ShelfTypeModel SelectedShelfTypeItem
|
||||
private OrderTypeModel selectedShelfTypeItem;
|
||||
public OrderTypeModel SelectedShelfTypeItem
|
||||
{
|
||||
get { return selectedShelfTypeItem; }
|
||||
set
|
||||
|
@ -38,8 +38,8 @@ namespace 智慧物流软件系统.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
private List<ShelfTypeModel> shelfTypeItems;
|
||||
public List<ShelfTypeModel> ShelfTypeItems
|
||||
private List<OrderTypeModel> shelfTypeItems;
|
||||
public List<OrderTypeModel> ShelfTypeItems
|
||||
{
|
||||
get { return shelfTypeItems; }
|
||||
set
|
||||
@ -58,7 +58,7 @@ namespace 智慧物流软件系统.ViewModels
|
||||
DeviceType = LocalFile.Config.DeviceType,
|
||||
};
|
||||
|
||||
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<ShelfTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
||||
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<OrderTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
||||
if (Result != null && Result.Data != null && Result.Data.Lists.Count() > 0)
|
||||
{
|
||||
ShelfTypeItems = Result.Data.Lists;
|
||||
@ -67,8 +67,8 @@ namespace 智慧物流软件系统.ViewModels
|
||||
});
|
||||
}
|
||||
|
||||
private ShelfTypeModel selectedShelfTypeItem;
|
||||
public ShelfTypeModel SelectedShelfTypeItem
|
||||
private OrderTypeModel selectedShelfTypeItem;
|
||||
public OrderTypeModel SelectedShelfTypeItem
|
||||
{
|
||||
get { return selectedShelfTypeItem; }
|
||||
set
|
||||
|
@ -54,8 +54,8 @@ namespace 智慧物流软件系统.ViewModel
|
||||
};
|
||||
}
|
||||
|
||||
private List<ShelfTypeModel> shelfTypeItems;
|
||||
public List<ShelfTypeModel> ShelfTypeItems
|
||||
private List<OrderTypeModel> shelfTypeItems;
|
||||
public List<OrderTypeModel> ShelfTypeItems
|
||||
{
|
||||
get { return shelfTypeItems; }
|
||||
set
|
||||
@ -64,8 +64,8 @@ namespace 智慧物流软件系统.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
private ShelfTypeModel selectedShelfTypeItem;
|
||||
public ShelfTypeModel SelectedShelfTypeItem
|
||||
private OrderTypeModel selectedShelfTypeItem;
|
||||
public OrderTypeModel SelectedShelfTypeItem
|
||||
{
|
||||
get { return selectedShelfTypeItem; }
|
||||
set
|
||||
|
@ -64,8 +64,8 @@ namespace 智慧物流软件系统.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
private List<ShelfTypeModel> shelfTypeItems;
|
||||
public List<ShelfTypeModel> ShelfTypeItems
|
||||
private List<OrderTypeModel> shelfTypeItems;
|
||||
public List<OrderTypeModel> ShelfTypeItems
|
||||
{
|
||||
get { return shelfTypeItems; }
|
||||
set
|
||||
@ -74,8 +74,8 @@ namespace 智慧物流软件系统.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
private ShelfTypeModel? selectedShelfTypeItem;
|
||||
public ShelfTypeModel? SelectedShelfTypeItem
|
||||
private OrderTypeModel? selectedShelfTypeItem;
|
||||
public OrderTypeModel? SelectedShelfTypeItem
|
||||
{
|
||||
get { return selectedShelfTypeItem; }
|
||||
set
|
||||
@ -89,8 +89,8 @@ namespace 智慧物流软件系统.ViewModel
|
||||
//调用接口更新!
|
||||
Task.Run(() =>
|
||||
{
|
||||
ShelfTypeItems = new List<ShelfTypeModel>();
|
||||
ShelfTypeItems.Add(new ShelfTypeModel { Id = null, ShelfTypeName = "全部" });
|
||||
ShelfTypeItems = new List<OrderTypeModel>();
|
||||
ShelfTypeItems.Add(new OrderTypeModel { Id = null, ShelfTypeName = "全部" });
|
||||
|
||||
var body = new RequestBase()
|
||||
{
|
||||
@ -98,7 +98,7 @@ namespace 智慧物流软件系统.ViewModel
|
||||
DeviceType = LocalFile.Config.DeviceType,
|
||||
};
|
||||
|
||||
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<ShelfTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
||||
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<OrderTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
||||
if (Result != null && Result.Data != null && Result.Data.Lists.Count() > 0)
|
||||
{
|
||||
ShelfTypeItems.AddRange(Result.Data.Lists);
|
||||
|
325
货架标准上位机/Views/BatchBindMatDetailView.xaml
Normal file
325
货架标准上位机/Views/BatchBindMatDetailView.xaml
Normal file
@ -0,0 +1,325 @@
|
||||
<pi:UserControlBase
|
||||
xmlns:pi="https://github.com/ping9719/wpfex"
|
||||
x:Class="智慧物流软件系统.BatchBindMatDetailView"
|
||||
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*"></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>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.9*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="2*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="1.9*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="2*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="1.9*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="2*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="1.9*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="2*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="2*"></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"
|
||||
DisplayMemberPath="ShelfTypeName"
|
||||
ItemsSource="{Binding ShelfTypeItems}"
|
||||
SelectedItem="{Binding SelectedShelfTypeItem}"
|
||||
Height="30"
|
||||
FontSize="18"
|
||||
IsEditable="False" />
|
||||
|
||||
<TextBlock Grid.Column="2"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Right"
|
||||
Text="单据编号:" FontSize="18" ></TextBlock>
|
||||
<TextBox Grid.Column="3"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Stretch"
|
||||
FontSize="18" MinWidth="90" Text="{Binding ShelfCode}"></TextBox>
|
||||
<TextBlock Grid.Column="4"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
Text="货架编号:"
|
||||
FontSize="18"></TextBlock>
|
||||
<ComboBox Grid.Row="0"
|
||||
Grid.Column="5"
|
||||
DisplayMemberPath="LocationAreaName"
|
||||
ItemsSource="{Binding LocationAreaItems}"
|
||||
SelectedItem="{Binding SelectedLocationAreaItems}"
|
||||
Height="30"
|
||||
FontSize="18"
|
||||
IsEditable="False" />
|
||||
|
||||
<!--<TextBlock Grid.Column="6"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
Text="位置编号:"
|
||||
FontSize="18"></TextBlock>
|
||||
<TextBox Grid.Column="7"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Stretch"
|
||||
FontSize="18"
|
||||
MinWidth="90"
|
||||
Text="{Binding LocationCode}"></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>
|
||||
|
||||
</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"
|
||||
Background="CadetBlue"
|
||||
Command="{Binding BtnEditCommand}">
|
||||
</Button>
|
||||
<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 BtnImportCommand}"
|
||||
Foreground="WhiteSmoke"
|
||||
Background="Green"></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>
|
90
货架标准上位机/Views/BatchBindMatDetailView.xaml.cs
Normal file
90
货架标准上位机/Views/BatchBindMatDetailView.xaml.cs
Normal file
@ -0,0 +1,90 @@
|
||||
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 BatchBindMatDetailView : UserControlBase
|
||||
{
|
||||
public MatDetailCurrentInfoViewModel viewModel { get; set; } = new MatDetailCurrentInfoViewModel();
|
||||
public BatchBindMatDetailView()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.DataContext = viewModel;
|
||||
viewModel.InitLocationAreaItems();
|
||||
viewModel.InitShelfTypeItems();
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
//try
|
||||
//{
|
||||
// if (viewModel.SelectedataGridItem != null)
|
||||
// {
|
||||
// viewModel.SelectedataGridItem.IsSelected = !viewModel.SelectedataGridItem.IsSelected;
|
||||
// }
|
||||
|
||||
//}
|
||||
//catch
|
||||
//{
|
||||
|
||||
//}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -215,7 +215,7 @@
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
<hc:TransitioningContentControl TransitionMode="Fade">
|
||||
<View:InOutRecordView />
|
||||
<View:BatchBindMatDetailView />
|
||||
</hc:TransitioningContentControl>
|
||||
</TabItem>
|
||||
<TabItem Padding="10,10,40,10" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.出入记录},Converter={StaticResource AuthVisConverter}}">
|
||||
|
Reference in New Issue
Block a user