提交代码
This commit is contained in:
@ -90,7 +90,7 @@ namespace 货架标准上位机.ViewModels
|
||||
return;
|
||||
}
|
||||
|
||||
#region 调用接口获取数据
|
||||
#region 调用接口获取单据
|
||||
try
|
||||
{
|
||||
var body = new GetStockTakingOrdersRequest()
|
||||
@ -113,7 +113,7 @@ namespace 货架标准上位机.ViewModels
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Growl.Error("加载数据失败:" + ex.Message);
|
||||
Growl.Error("加载单据失败:" + ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@ -138,20 +138,20 @@ namespace 货架标准上位机.ViewModels
|
||||
{
|
||||
if (DataGridItemSource == null)
|
||||
{
|
||||
Growl.Warning("未勾选数据!");
|
||||
Growl.Warning("未勾选单据!");
|
||||
return;
|
||||
}
|
||||
|
||||
//判断是否勾选数据
|
||||
//判断是否勾选单据
|
||||
var selectetOrder = DataGridItemSource.Where(t => t.IsSelected)
|
||||
.FirstOrDefault();
|
||||
if (selectetOrder == null)
|
||||
{
|
||||
Growl.Warning("未勾选数据!");
|
||||
Growl.Warning("未勾选单据!");
|
||||
return;
|
||||
}
|
||||
|
||||
#region 调用接口获取数据
|
||||
#region 调用接口获取单据
|
||||
|
||||
var body = new GetStockTakingOrderMatDetailRequest()
|
||||
{
|
||||
@ -203,19 +203,19 @@ namespace 货架标准上位机.ViewModels
|
||||
{
|
||||
if (DataGridItemSource == null)
|
||||
{
|
||||
Growl.Warning("未勾选数据!");
|
||||
Growl.Warning("未勾选单据!");
|
||||
return;
|
||||
}
|
||||
|
||||
//判断是否勾选数据
|
||||
//判断是否勾选单据
|
||||
var selectedOutOrder = DataGridItemSource.Where(t => t.IsSelected)
|
||||
.FirstOrDefault();
|
||||
if (selectedOutOrder == null)
|
||||
{
|
||||
Growl.Warning("未勾选数据!");
|
||||
Growl.Warning("未勾选单据!");
|
||||
return;
|
||||
}
|
||||
#region 调用接口获取数据
|
||||
#region 调用接口获取单据
|
||||
var body = new GetOutOrderDetailRequest()
|
||||
{
|
||||
OrderId = selectedOutOrder.Id,
|
||||
@ -267,15 +267,15 @@ namespace 货架标准上位机.ViewModels
|
||||
//是否已搜索
|
||||
if (DataGridItemSource == null)
|
||||
{
|
||||
Growl.Warning("未勾选数据!");
|
||||
Growl.Warning("未勾选单据!");
|
||||
return;
|
||||
}
|
||||
//判断是否已勾选数据
|
||||
//判断是否已勾选单据
|
||||
var selectetOrder = DataGridItemSource.Where(t => t.IsSelected)
|
||||
.FirstOrDefault();
|
||||
if (selectetOrder == null)
|
||||
{
|
||||
Growl.Warning("未勾选数据!");
|
||||
Growl.Warning("未勾选单据!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -321,15 +321,15 @@ namespace 货架标准上位机.ViewModels
|
||||
//是否已搜索
|
||||
if (DataGridItemSource == null)
|
||||
{
|
||||
Growl.Warning("未勾选数据!");
|
||||
Growl.Warning("未勾选单据!");
|
||||
return;
|
||||
}
|
||||
//判断是否已勾选数据
|
||||
//判断是否已勾选单据
|
||||
var selectetOrder = DataGridItemSource.Where(t => t.IsSelected)
|
||||
.FirstOrDefault();
|
||||
if (selectetOrder == null)
|
||||
{
|
||||
Growl.Warning("未勾选数据!");
|
||||
Growl.Warning("未勾选单据!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -364,6 +364,59 @@ namespace 货架标准上位机.ViewModels
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public ICommand BtnCommitCommand { get => new DelegateCommand(BtnCommit); }
|
||||
public void BtnCommit()
|
||||
{
|
||||
try
|
||||
{
|
||||
//是否已搜索
|
||||
if (DataGridItemSource == null)
|
||||
{
|
||||
Growl.Warning("未勾选单据!");
|
||||
return;
|
||||
}
|
||||
//判断是否已勾选单据
|
||||
var selectetOrder = DataGridItemSource.Where(t => t.IsSelected)
|
||||
.FirstOrDefault();
|
||||
if (selectetOrder == null)
|
||||
{
|
||||
Growl.Warning("未勾选单据!");
|
||||
return;
|
||||
}
|
||||
|
||||
#region 调用接口提交盘点
|
||||
var body = new GetStockTakingOrderMatDetailRequest()
|
||||
{
|
||||
StockTakingOrderId = selectetOrder.Id,
|
||||
StockTakingOrderNumber = selectetOrder.StocktakingOrderNumber,
|
||||
UserName = LocalStatic.CurrentUser,
|
||||
DeviceType = LocalFile.Config.DeviceType,
|
||||
};
|
||||
var Result = ApiHelp.GetDataFromHttp<ResponseCommon>(LocalFile.Config.ApiIpHost + "stockTaking/commitStockTakingOrder", body, "POST");
|
||||
if (Result != null && Result.Code == 200)
|
||||
{
|
||||
Growl.Warning("单据已提交,库存数据已修改!");
|
||||
BtnSearch();
|
||||
}
|
||||
else if (Result != null)
|
||||
{
|
||||
Growl.Warning(Result.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
Growl.Warning("调用接口失败!");
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Growl.Error("出现异常:" + ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region PageOperation 分页操作
|
||||
|
Reference in New Issue
Block a user