You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

115 lines
3.3 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using SlnMesnac.RfidUpload.Business;
using SlnMesnac.RfidUpload.Model;
using SlnMesnac.RfidUpload.Model.apiParam;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
#region << 版 本 注 释 >>
/*--------------------------------------------------------------------
* 版权所有 (c) 2024 WenJY 保留所有权利。
* CLR版本4.0.30319.42000
* 机器名称T14-GEN3-7895
* 命名空间SlnMesnac.RfidUpload.UI.viewModel
* 唯一标识a65ccfd9-c493-46c4-9905-7a7d55ef1508
*
* 创建者WenJY
* 电子邮箱:
* 创建时间2024-12-06 16:31:16
* 版本V1.0.0
* 描述:
*
*--------------------------------------------------------------------
* 修改人:
* 时间:
* 修改说明:
*
* 版本V1.0.0
*--------------------------------------------------------------------*/
#endregion << 版 本 注 释 >>
namespace SlnMesnac.RfidUpload.UI.viewModel
{
public partial class containerStorageQueryByCsbViewModel : ObservableObject
{
private readonly Window _window;
#region 委托事件
/// <summary>
/// model-新容器入库-调拨单号验证状态成功1失败-1
/// model-容器封发-验证封发计划接口状态成功2失败-1
/// dbdh-调拨单号
/// status- 1-正常
/// </summary>
/// <param name="status"></param>
/// <param name="dbdh"></param>
public delegate void RefreshSubmitVerifyDelegate(int model,string msg, TransferOrderInfo transferOrderInfo = null);
public static event RefreshSubmitVerifyDelegate RefreshSubmitVerifyEvent;
#endregion
public containerStorageQueryByCsbViewModel(Window window)
{
_window = window;
}
private CsbHandleBusiness csbHandleBusiness = CsbHandleBusiness.Instance;
public string _dbbh = string.Empty;
public string dbbh
{
get => _dbbh;
set => SetProperty(ref _dbbh, value);
}
public string _rqtmStart = string.Empty;
public string rqtmStart
{
get => _rqtmStart;
set => SetProperty(ref _rqtmStart, value);
}
private string _rqtmEnd = string.Empty;
public string rqtmEnd
{
get => _rqtmEnd;
set
{
_rqtmEnd = value;
OnPropertyChanged(nameof(_rqtmEnd));
}
}
[RelayCommand]
private void Submit()
{
CsbResult res = csbHandleBusiness.containerStorageQueryByCsb(_dbbh, _rqtmStart, _rqtmEnd);
if (res.code == "200")
{
MessageBox.Show($"新容器入库-调拨单号验证通过");
TransferOrderInfo transferOrderInfo = new TransferOrderInfo() {
dbdh = _dbbh,
};
RefreshSubmitVerifyEvent?.Invoke(1, res.message, transferOrderInfo);
_window.Close();
}
else
{
MessageBox.Show($"新容器入库-调拨单号验证失败,status:{res.code};msg:{res.message};");
}
}
}
}