You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
82 lines
2.7 KiB
82 lines
2.7 KiB
using BBWY.Client.APIServices.QiKu;
|
|
using BBWY.Client.Models;
|
|
using BBWY.Controls;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
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;
|
|
|
|
namespace BBWY.Client.Views.PackTaskAbort
|
|
{
|
|
/// <summary>
|
|
/// UpdateShelvesNumberWindow.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class UpdateShelvesNumberWindow : BWindow
|
|
{
|
|
public UpdateShelvesNumberWindow(PackTaskAbortService packTaskAbortService, PackTaskModel model, Action taskAbort, List<string> shelvesNumberList, List<int> floorNumberList)
|
|
{
|
|
InitializeComponent();
|
|
this.model = model;
|
|
this.packTaskAbortService = packTaskAbortService;
|
|
this.taskAbort = taskAbort;
|
|
this.FloorNumberList = floorNumberList;
|
|
this.ShelvesNumberList = shelvesNumberList;
|
|
if (model != null)
|
|
{
|
|
ShelvesNumber = model.ShelvesNumber;
|
|
FloorNumber = model.FloorNumber;
|
|
}
|
|
this.DataContext = this;
|
|
}
|
|
Action taskAbort { get; set; }
|
|
PackTaskAbortService packTaskAbortService { get; set; }
|
|
PackTaskModel model { get; set; }
|
|
|
|
private List<int> floorNumberList = new List<int> { 1, 2, 3, 4 };
|
|
/// <summary>
|
|
/// 层数列表
|
|
/// </summary>
|
|
public List<int> FloorNumberList { get => floorNumberList; set { Set(ref floorNumberList, value); } }
|
|
|
|
private int? floorNumber;
|
|
/// <summary>
|
|
///层数
|
|
/// </summary>
|
|
public int? FloorNumber { get => floorNumber; set { Set(ref floorNumber, value); } }
|
|
|
|
|
|
private List<string> shelvesNumberList;
|
|
/// <summary>
|
|
/// 货架列表
|
|
/// </summary>
|
|
public List<string> ShelvesNumberList { get => shelvesNumberList; set { Set(ref shelvesNumberList, value); } }
|
|
|
|
private string shelvesNumber;
|
|
/// <summary>
|
|
/// 货架
|
|
/// </summary>
|
|
public string ShelvesNumber { get => shelvesNumber; set { Set(ref shelvesNumber, value); } }
|
|
|
|
private void BButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
|
|
|
|
|
|
var res = packTaskAbortService.UpdateAbortPackTask(model.TaskId, model.TaskState, ShelvesNumber, FloorNumber);
|
|
if (res == null || !res.Success)
|
|
{
|
|
MessageBox.Show(res?.Msg);
|
|
return ;
|
|
}
|
|
taskAbort?.Invoke();
|
|
this.Close();
|
|
}
|
|
}
|
|
}
|
|
|