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.
79 lines
2.8 KiB
79 lines
2.8 KiB
using BBWY.Client.APIServices;
|
|
using BBWY.Client.Models;
|
|
using BBWY.Client.Models.APIModel.Request;
|
|
using BBWY.Controls;
|
|
using NPOI.Util;
|
|
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.PackTask
|
|
{
|
|
/// <summary>
|
|
/// SetSpuCerWindow.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class SetSpuCerWindow : BWindow
|
|
{
|
|
public SetSpuCerWindow()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
|
|
|
|
private PackTaskService packTaskService { get; set; }
|
|
public CertificateModel SpuCertificateModel { get; set; }
|
|
|
|
public void LoadData(CertificateModel SpuCertificateModel, PackTaskService packTaskService)
|
|
{
|
|
this.SpuCertificateModel = SpuCertificateModel.Copy();
|
|
this.packTaskService = packTaskService;
|
|
this.DataContext=this;
|
|
}
|
|
public Action<CertificateModel> SaveResult { get; set; }
|
|
private void save_spuCer_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
if (string.IsNullOrEmpty(SpuCertificateModel.ExcuteStander)
|
|
|| string.IsNullOrEmpty(SpuCertificateModel.BrandName)
|
|
|| string.IsNullOrEmpty(SpuCertificateModel.Brand) || string.IsNullOrEmpty(SpuCertificateModel.ProductShop)
|
|
|| string.IsNullOrEmpty(SpuCertificateModel.ProductAdress))
|
|
{
|
|
new TipsWindow("参数出错!请重新填写!").Show();
|
|
return;
|
|
}
|
|
var resData = packTaskService.SaveSpuCer(new CerRequest
|
|
{
|
|
Brand = SpuCertificateModel.Brand,
|
|
BrandName = SpuCertificateModel.BrandName,
|
|
ProductNo = SpuCertificateModel.ProductNo,
|
|
SpuId = SpuCertificateModel.SpuId,
|
|
ExcuteStander = SpuCertificateModel.ExcuteStander,
|
|
LabelModel = (int)SpuCertificateModel.LabelModel,
|
|
FactoryNumber = SpuCertificateModel.FactoryNumber,
|
|
IsLogo = SpuCertificateModel.IsLogo,
|
|
ProductAdress = SpuCertificateModel.ProductAdress,
|
|
ProductShop = SpuCertificateModel.ProductShop,
|
|
Shader = SpuCertificateModel.Shader,
|
|
//SkuId = SpuCertificateModel.SkuId,
|
|
ApplyAge = SpuCertificateModel.ApplyAge,
|
|
ProduceDate=SpuCertificateModel.ProduceDate,
|
|
|
|
});
|
|
if (resData == null || !resData.Success)
|
|
{
|
|
return;
|
|
}
|
|
|
|
if (SaveResult != null) SaveResult(SpuCertificateModel);
|
|
this.Close();
|
|
}
|
|
}
|
|
}
|
|
|