提交代码
This commit is contained in:
@ -164,13 +164,18 @@ namespace 货架标准上位机.ViewModel
|
||||
var Result = ApiHelp.GetDataFromHttp<ShelfGoInInstoreResponse>(LocalFile.Config.ApiIpHost + "instore/shelfGoInInStore", body, "POST");
|
||||
if (Result != null && Result.Code == 200)
|
||||
{
|
||||
scanner.IsInstoreMode = true;
|
||||
scanner.ShelfCode = Result.Data.ShelfCode;
|
||||
scanner.ModulesStr = Result.Data.ModulesStr;
|
||||
}
|
||||
else if (Result != null && !string.IsNullOrEmpty(Result.Message))
|
||||
{
|
||||
Growl.Warning(Result.Message);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Growl.Warning(ex.Message);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@ -196,13 +201,56 @@ namespace 货架标准上位机.ViewModel
|
||||
{
|
||||
scanner.MatSn = Result.Data.MatSN;
|
||||
}
|
||||
else if(Result != null && !string.IsNullOrEmpty(Result.Message))
|
||||
{
|
||||
Growl.Warning(Result.Message);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Growl.Warning(ex.Message);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
public ICommand BtnEndCommand { get => new DelegateCommand(BtnEnd); }
|
||||
public void BtnEnd()
|
||||
{
|
||||
try
|
||||
{
|
||||
//获取当前入库的货架
|
||||
ScannerManager.Scanners.Where(t => t.IsInstoreMode).ToList().ForEach(t =>
|
||||
{
|
||||
if (!string.IsNullOrEmpty(t.ShelfCode))
|
||||
{
|
||||
var body = new ShelfGoOutInStoreRequest()
|
||||
{
|
||||
ShelfCode = t.ShelfCode,
|
||||
DeviceType = LocalFile.Config.DeviceType,
|
||||
UserName = LocalStatic.CurrentUser,
|
||||
};
|
||||
var Result = ApiHelp.GetDataFromHttp<ResponseCommon>(LocalFile.Config.ApiIpHost + "instore/shelfGoOutInStore", body, "POST");
|
||||
if (Result != null && Result.Code == 200)
|
||||
{
|
||||
t.IsInstoreMode = false;
|
||||
t.ShelfCode = string.Empty;
|
||||
t.MatSn = string.Empty;
|
||||
|
||||
t.ScannerDisplayControl.RefreshValues(t.ShelfCode, t.MatSn);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
t.IsInstoreMode = false;
|
||||
Logs.Write($"扫码枪{t.COM}的货架码因为某种原因丢失!");
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Growl.Warning(ex.Message);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user