|
|
@ -7,6 +7,7 @@ using BBWY.Client.Views.PackTask; |
|
|
|
using BBWY.Common.Models; |
|
|
|
using BBWY.Common.Trigger; |
|
|
|
using GalaSoft.MvvmLight.Command; |
|
|
|
using GalaSoft.MvvmLight.Messaging; |
|
|
|
using NPOI.Util; |
|
|
|
using Org.BouncyCastle.Asn1.Crmf; |
|
|
|
using System; |
|
|
@ -14,14 +15,18 @@ using System.Collections.Generic; |
|
|
|
using System.Collections.ObjectModel; |
|
|
|
using System.Data; |
|
|
|
using System.Linq; |
|
|
|
using System.Runtime.CompilerServices; |
|
|
|
using System.Text; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using System.Windows; |
|
|
|
using System.Windows.Controls; |
|
|
|
using System.Windows.Input; |
|
|
|
using System.Windows.Media.TextFormatting; |
|
|
|
using System.Windows.Navigation; |
|
|
|
|
|
|
|
namespace BBWY.Client.ViewModels.PackTask |
|
|
|
{ |
|
|
|
public class CreatePackTaskViewModel : BaseVM, IDenpendency |
|
|
|
public class CreatePackTaskViewModel : BaseVM |
|
|
|
{ |
|
|
|
private bool isLoading = false; |
|
|
|
public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } } |
|
|
@ -341,8 +346,45 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void InitData() |
|
|
|
{ |
|
|
|
|
|
|
|
Logo = string.Empty; |
|
|
|
SearchSkuId = ""; |
|
|
|
SkuId = ""; |
|
|
|
SkuCount = 0; |
|
|
|
SkuName = string.Empty; |
|
|
|
ProductNo= string.Empty; |
|
|
|
Brand =string.Empty; |
|
|
|
brandName = string.Empty; |
|
|
|
this.MarkMessage = ""; |
|
|
|
IsSetBarCode = true; |
|
|
|
IsSetCertificate =true; |
|
|
|
BarCodeModel = null; |
|
|
|
CertificateModel = null; |
|
|
|
SkuTitle= string.Empty; |
|
|
|
GoodsNumber = 0; |
|
|
|
string[] increates = new string[] { "气泡纸", "气泡袋", "POP袋", "折纸箱", "气泡纸封边", "彩盒", "剪胶", "剪彩带", "快递袋", "收纳盒", "纸箱子", "装纸箱", "封边", "胶带", "折彩盒" }; |
|
|
|
IncreateList = new ObservableCollection<IncreateModel>(); |
|
|
|
foreach (var item in increates) |
|
|
|
{ |
|
|
|
IncreateList.Add(new IncreateModel |
|
|
|
{ |
|
|
|
IncreateName = item, |
|
|
|
IsSelected = false |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public CreatePackTaskViewModel(PackTaskService packTaskService, GlobalContext globalContext, ProductService productService) |
|
|
|
{ |
|
|
|
Messenger.Default.Register<bool>(this, "InitData", message => { |
|
|
|
|
|
|
|
InitData(); |
|
|
|
}); |
|
|
|
//RaisePropertyChanged(string.Empty);
|
|
|
|
//this.RaisePropertyChanged(nameof(CreatePackTaskViewModel));
|
|
|
|
|
|
|
|
this.productService = productService; |
|
|
|
this.packTaskService = packTaskService; |
|
|
|
|
|
|
@ -367,7 +409,11 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
|
|
|
|
|
|
|
|
//查询sku
|
|
|
|
SearchSkuCommand = new RelayCommand(SearchSku); |
|
|
|
SearchSkuCommand = new RelayCommand(() => |
|
|
|
{ |
|
|
|
Task.Factory.StartNew(() => { SearchSku(); }); |
|
|
|
|
|
|
|
}); |
|
|
|
CreateTaskCommand = new RelayCommand<object>(CreateTask); |
|
|
|
this.globalContext = globalContext; |
|
|
|
SetBarCodeCommand = new RelayCommand(SetBarCode); |
|
|
@ -679,6 +725,11 @@ namespace BBWY.Client.ViewModels.PackTask |
|
|
|
/// </summary>
|
|
|
|
public void SearchSku() |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IsLoading = true; |
|
|
|
SkuId = searchSkuId; |
|
|
|
ApiResponse<ProductListResponse> productApiResponse = null; |
|
|
|