生成条码优化

This commit is contained in:
hehaibing-1996
2024-05-13 09:18:49 +08:00
parent f57b79d0fc
commit 88cbe5d052
22 changed files with 262 additions and 220 deletions

View File

@ -311,6 +311,7 @@ namespace 货架标准上位机.ViewModel
if (matBaseInfo == null)
{
Growl.Warning("请选择需要修改的数据!");
return;
}
else
{
@ -395,20 +396,10 @@ namespace 货架标准上位机.ViewModel
if (matBaseInfo == null)
{
Growl.Warning("请勾选数据!");
return;
}
var generateWindow = new MatBaseInoGenarateMatInfoView(matBaseInfo);
var result = generateWindow.ShowDialog();
//PrintTender.PrintTag(new PrintClass()
//{
// MatQty = "123",
// MatCode = "123",
// MatBatch = "123",
// MatName = "123",
// MatSn = "123",
// MatSpec = "123",
//});
}
#endregion

View File

@ -326,7 +326,12 @@ namespace 货架标准上位机.ViewModel
var Result1 = ApiHelp.GetDataFromHttp<ResponseCommon>(LocalFile.Config.ApiIpHost + "outstore/sysOutOrderByMatSn", body1, "POST");
if (Result1 != null && Result1.Code == 200)
{
Growl.Success(Result1.Message);
App.Current.Dispatcher.Invoke(() =>
{
dia.Close();
dia.Collapse();
HandyControl.Controls.MessageBox.Show(Result1.Message);
});
}
else if (Result1 != null)
{
@ -419,7 +424,12 @@ namespace 货架标准上位机.ViewModel
var Result1 = ApiHelp.GetDataFromHttp<ResponseCommon>(LocalFile.Config.ApiIpHost + "stockTaking/sysStockTakingOrder", body1, "POST");
if (Result1 != null && Result1.Code == 200)
{
Growl.Success(Result1.Message);
App.Current.Dispatcher.Invoke(() =>
{
dia.Close();
dia.Collapse();
HandyControl.Controls.MessageBox.Show(Result1.Message);
});
}
else if (Result1 != null)
{

View File

@ -75,12 +75,15 @@ namespace 货架标准上位机.ViewModels
}
// 定义一个事件,当需要关闭窗口时触发
public event Action RequestClose;
public event Action TrueClose;
public event Action FalseClose;
// 一个方法,当满足某些条件时调用,以触发关闭窗口
protected virtual void OnRequestClose()
protected virtual void OnRequestClose(bool IsTrue)
{
RequestClose?.Invoke();
if (IsTrue)
TrueClose?.Invoke();
else
FalseClose?.Invoke();
}
public ICommand GenerateOutOrderCommand { get => new DelegateCommand(GenerateOutOrder); }
public void GenerateOutOrder()
@ -128,11 +131,12 @@ namespace 货架标准上位机.ViewModels
if (Result != null && Result.Code == 200)
{
Growl.Success(Result.Message);
OnRequestClose();
OnRequestClose(true);
}
else if (Result != null)
{
Growl.Warning(Result.Message);
return;
}
}
catch (Exception ex)

View File

@ -134,6 +134,16 @@ namespace 货架标准上位机.ViewModels
//}
public ICommand BtnOutOrderCommand { get => new DelegateCommand(BtnOutOrder); }
public void BtnOutOrder()
{
var window = new OutInventoryAddDucumentView();
window.Owner = Application.Current.MainWindow;
var result = window.ShowDialog();
if (result == true)
BtnSearch(true);
}
public ICommand BtnOrderDetailCommand { get => new DelegateCommand(BtnOrderDetail); }
public void BtnOrderDetail()
{