Browse Source

更新sku数据库,添加spu模板

qianyi
506583276@qq.com 2 years ago
parent
commit
43defb5d84
  1. 14
      BBWY.Client/APIServices/PackTaskService.cs
  2. 10
      BBWY.Client/App.xaml.cs
  3. 4
      BBWY.Client/BBWYAppSettings.json
  4. 2
      BBWY.Client/Models/APIModel/Request/CerRequest.cs
  5. 12
      BBWY.Client/Models/APIModel/Request/CreateTaskRequest.cs
  6. 5
      BBWY.Client/Models/APIModel/Response/PackTask/ProductSkuResponse.cs
  7. 9
      BBWY.Client/Models/PackTask/CertificateModel.cs
  8. 1
      BBWY.Client/ViewModels/Order/OrderListViewModel.cs
  9. 243
      BBWY.Client/ViewModels/PackTask/CreatePackTaskViewModel.cs
  10. 14
      BBWY.Client/ViewModels/PackTask/SetSpuCerViewModel.cs
  11. 9
      BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs
  12. 2
      BBWY.Client/Views/MainWindow.xaml
  13. 4
      BBWY.Client/Views/PackTask/CerControl.xaml
  14. 2
      BBWY.Client/Views/PackTask/CreatePackTask.xaml
  15. 4
      BBWY.Client/Views/PackTask/FeesExcelControl.xaml.cs
  16. 99
      BBWY.Client/Views/PackTask/SetCerControl.xaml
  17. 86
      BBWY.Client/Views/PackTask/SetCerControl.xaml.cs
  18. 169
      BBWY.Client/Views/PackTask/SetCerWindow.xaml
  19. 125
      BBWY.Client/Views/PackTask/SetSpuCerWindow.xaml
  20. 26
      BBWY.Client/Views/PackTask/SetSpuCerWindow.xaml.cs
  21. 1
      BBWY.Client/WebView2Manager.cs

14
BBWY.Client/APIServices/PackTaskService.cs

@ -100,6 +100,15 @@ namespace BBWY.Client.APIServices
return JsonConvert.DeserializeObject<ApiResponse<ProductSkuResponse>>(data);
}
public ApiResponse<CertificateModel> GetSpuCer(string spuId)
{
HttpClientHelper helper = new HttpClientHelper(globalContext.QKApiHost);
string url = $"{globalContext.QKApiHost}/api/PackTask/GetSpuCer?spuId={spuId}";
var data = helper.Get(url);
return JsonConvert.DeserializeObject<ApiResponse<CertificateModel>>(data);
}
public ApiResponse<object> UpdateTask(CreateTaskRequest createTaskRequest)
{
@ -148,6 +157,11 @@ namespace BBWY.Client.APIServices
return SendRequest<long>(globalContext.QKApiHost, "api/PackTask/CommitCer", cerRequest
, null, HttpMethod.Post);
}
public ApiResponse<long> SaveSpuCer(CerRequest cerRequest)
{
return SendRequest<long>(globalContext.QKApiHost, "api/PackTask/CommitSpuCer", cerRequest
, null, HttpMethod.Post);
}
public ApiResponse<PackUser[]> GetPackMembers()
{

10
BBWY.Client/App.xaml.cs

@ -47,13 +47,13 @@ namespace BBWY.Client
string userToken = string.Empty;
#if DEBUG
//仓库组测试
// userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNjM1OTMyMDAyMjcwMDU2NDQ4IiwidGVhbUlkIjoiMTU0MDg4NTU3MDYyNzA0NzQyNCIsInNvblRlYW1JZHMiOiIxNTQwODg1NTcwNjI3MDQ3NDI0IiwiZXhwIjoxNzEwNDk2NTQ1fQ.Sx2vGJcYGf98x99slQLU3vt7yWdjspptSpbUCcZgWek";
// userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNjM1OTMyMDAyMjcwMDU2NDQ4IiwidGVhbUlkIjoiMTU0MDg4NTU3MDYyNzA0NzQyNCIsInNvblRlYW1JZHMiOiIxNTQwODg1NTcwNjI3MDQ3NDI0IiwiZXhwIjoxNzEwNDk2NTQ1fQ.Sx2vGJcYGf98x99slQLU3vt7yWdjspptSpbUCcZgWek";
//齐越山鸡
userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNTM1MzMwMzI4ODkyMTQ5NzYwIiwidGVhbUlkIjoiMTUxNjk3NDI1MDU0MjUwMTg4OCIsInNvblRlYW1JZHMiOiIxNDM2Mjg4NTAwMjM1MjQzNTIwIiwiZXhwIjoxNjk0NjY5NjkxfQ.cSwro-7bGwOu92YejH9JhMenTai7Mvf99i2paQCmxIw";
userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNTM1MzMwMzI4ODkyMTQ5NzYwIiwidGVhbUlkIjoiMTUxNjk3NDI1MDU0MjUwMTg4OCIsInNvblRlYW1JZHMiOiIxNDM2Mjg4NTAwMjM1MjQzNTIwIiwiZXhwIjoxNjk0NjY5NjkxfQ.cSwro-7bGwOu92YejH9JhMenTai7Mvf99i2paQCmxIw";
//刷单组测试
//userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNTcxODUyODE0OTAzMTUyNjQwIiwidGVhbUlkIjoiMTU3MTg1MjQ1MDI5NjUwMDIyNCIsInNvblRlYW1JZHMiOiIiLCJleHAiOjE2OTUxNDc2ODh9.hVupdHnhgHHGo3QrMSDqhINqtq6Q5_RovWyXjiMkkEs";
@ -105,13 +105,13 @@ namespace BBWY.Client
IServiceCollection serviceCollection = new ServiceCollection();
serviceCollection.AddHttpClient();
// serviceCollection.AddTransient<CreatePackTaskViewModel>();
// serviceCollection.AddTransient<CreatePackTaskViewModel>();
serviceCollection.AddHttpClient("gzip").ConfigurePrimaryHttpMessageHandler(handler => new HttpClientHandler()
{
AutomaticDecompression = System.Net.DecompressionMethods.GZip
});
serviceCollection.AddMemoryCache();
serviceCollection.AddSingleton<RestApiService>();
serviceCollection.AddSingleton(gl);

4
BBWY.Client/BBWYAppSettings.json

@ -4,6 +4,6 @@
"MDSApiHost": "http://mdsapi.qiyue666.com",
"JOSApiHost": "",
"1688ApiHost": "",
//"QKApiHost": "http://localhost:8080"
"QKApiHost": "http://qiku.qiyue666.com"
"QKApiHost": "http://localhost:8080"
//"QKApiHost": "http://qiku.qiyue666.com"
}

2
BBWY.Client/Models/APIModel/Request/CerRequest.cs

@ -6,6 +6,8 @@ namespace BBWY.Client.Models.APIModel.Request
{
public class CerRequest
{
public string SpuId { get; set; }
/// <summary>
/// skuid
/// </summary>

12
BBWY.Client/Models/APIModel/Request/CreateTaskRequest.cs

@ -6,6 +6,18 @@ namespace BBWY.Client.Models.APIModel.Request
{
public class CreateTaskRequest
{
/// <summary>
/// 货号
/// </summary>
public string ProductNo { get; set; }
/// <summary>
/// sku图
/// </summary>
public string Logo { get; set; }
/// <summary>
/// sku 名称
/// </summary>
public string SkuName { get; set; }
public long TaskId { get; set; }
/// <summary>

5
BBWY.Client/Models/APIModel/Response/PackTask/ProductSkuResponse.cs

@ -47,11 +47,14 @@ namespace BBWY.Client.Models.APIModel.Response.PackTask
public BarCodeModel BarCodeModel { get; set; }
/// <summary>
/// 合格证信息
/// </summary>
public CertificateModel Certificate { get; set; }
/// <summary>
/// 合格证信息
/// </summary>
public CertificateModel SpuCertificate { get; set; }
}

9
BBWY.Client/Models/PackTask/CertificateModel.cs

@ -12,10 +12,19 @@ namespace BBWY.Client.Models
/// </summary>
public long Id { get; set; }
/// <summary>
/// skuid
/// </summary>
public string SkuId { get; set; }
private string spuId;
/// <summary>
/// 品牌
/// </summary>
public string SpuId { get => spuId; set { Set(ref spuId, value); } }
private string brand;

1
BBWY.Client/ViewModels/Order/OrderListViewModel.cs

@ -28,7 +28,6 @@ namespace BBWY.Client.ViewModels
private ChoosePurchaseSchemeViewModel choosePurchaseSchemeViewModel;
private DongDongHelper dongdongHelper;
private bool isLoading;
private string searchOrderId;
private DateTime startDate;
private DateTime endDate;

243
BBWY.Client/ViewModels/PackTask/CreatePackTaskViewModel.cs

@ -29,9 +29,9 @@ using System.Windows.Navigation;
namespace BBWY.Client.ViewModels.PackTask
{
public class CreatePackTaskViewModel : BaseVM,IDenpendency
public class CreatePackTaskViewModel : BaseVM, IDenpendency
{
private bool isLoading = false;
public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } }
@ -257,13 +257,48 @@ namespace BBWY.Client.ViewModels.PackTask
/// <summary>
/// 设置显示(条形码)
/// </summary>
public bool IsSetBarCode { get => isSetBarCode; set { Set(ref isSetBarCode, value); } }
public bool IsSetBarCode
{
get => isSetBarCode; set
{
Set(ref isSetBarCode, value);
IsNeedBarCode = IsSetBarCode ? "不需要" : "需要";
}
}
private bool isSetCertificate;
/// <summary>
/// 设置显示(合格证)
/// </summary>
public bool IsSetCertificate { get => isSetCertificate; set { Set(ref isSetCertificate, value); } }
public bool IsSetCertificate
{
get => isSetCertificate; set
{
Set(ref isSetCertificate, value);
IsNeedCertificateModel = IsSetCertificate ? "不需要" : "需要";
}
}
private string setSpuCerStatus;
public string SetSpuCerStatus { get => setSpuCerStatus; set { Set(ref setSpuCerStatus, value); } }
private bool isSetSpuCertificate = true;
/// <summary>
/// 设置spu显示(合格证)
/// </summary>
public bool IsSetSpuCertificate
{
get => isSetSpuCertificate; set
{
Set(ref isSetSpuCertificate, value);
SetSpuCerStatus = IsSetSpuCertificate ? "设置spu模板" : "修改spu模板";
}
}
private string saveTask;
@ -273,6 +308,18 @@ namespace BBWY.Client.ViewModels.PackTask
public string SaveTask { get => saveTask; set { Set(ref saveTask, value); } }
private string spuId;
/// <summary>
/// 合格证
/// </summary>
public string SpuId { get => spuId; set { Set(ref spuId, value); } }
private CertificateModel spuCertificateModel;
/// <summary>
/// spu合格证
/// </summary>
public CertificateModel SpuCertificateModel { get => spuCertificateModel; set { Set(ref spuCertificateModel, value); } }
private CertificateModel certificateModel;
@ -351,21 +398,25 @@ namespace BBWY.Client.ViewModels.PackTask
public ICommand BarLabelCheckCommand { get; set; }
public ICommand CerLabelCheckCommand { get; set; }
public ICommand SpuCerLabelCheckCommand { get; set; }
public ICommand LookBarCommand { get; set; }
public ICommand LookCerCommand { get; set; }
public ICommand SetSpuCerCommand { get; set; }
public ICommand SaveSpuCerCommand { get; set; }
public ICommand InseartCerCommand { get; set; }
public void InitData(PackTaskModel model = null)
{
string[] increates = new string[] { "气泡纸", "气泡袋", "POP袋", "折纸箱", "气泡纸封边", "彩盒", "剪胶", "剪彩带", "快递袋", "收纳盒", "纸箱子", "装纸箱", "封边", "胶带", "折彩盒" };
IncreateList = new ObservableCollection<IncreateModel>();
SpuId = string.Empty;
if (model == null)
{
SaveTask = "发布";
TaskId = 0;
Logo = string.Empty;
@ -397,9 +448,9 @@ namespace BBWY.Client.ViewModels.PackTask
SaveTask = "保存";
Logo = model.ItemList[0].Logo;
SearchSkuId =model.SkuId ;
SearchSkuId = model.SkuId;
SkuId = model.SkuId;
SkuCount = model.SkuCount;
SkuName = model.ItemList[0].SkuName;
@ -407,8 +458,8 @@ namespace BBWY.Client.ViewModels.PackTask
Brand = model.Brand;
BrandName = model.ItemList[0].BrandName;
this.MarkMessage = model.MarkMessage;
IsSetBarCode = model.BarCodeModel!=null ? false:true;
IsSetCertificate = model.CertificateModel!=null ? false : true;
IsSetBarCode = model.BarCodeModel != null ? false : true;
IsSetCertificate = model.CertificateModel != null ? false : true;
BarCodeModel = model.BarCodeModel;
CertificateModel = model.CertificateModel;
SkuTitle = model.SkuTitle;
@ -416,13 +467,13 @@ namespace BBWY.Client.ViewModels.PackTask
Availability = model.Availability;
IsWorry = model.IsWorry;
PositionType = model.PositionType;
PackType =model.PackType;
PackType = model.PackType;
BasicPack = model.BasicPack;
IsNeedBarCode = model.BarCodeModel != null ? "需要" : "不需要";
IsNeedCertificateModel = model.CertificateModel != null ? "需要" : "不需要";
CertificatePosition = model.CertificatePosition;
TaskId = model.TaskId;
string[] increateDatas =model.Increment1.Split(',');
string[] increateDatas = model.Increment1.Split(',');
bool isSelected = false;
foreach (var item in increates)
@ -438,7 +489,7 @@ namespace BBWY.Client.ViewModels.PackTask
IsSelected = isSelected
});
}
//SearchSku();
SearchSku();
}
@ -469,10 +520,6 @@ namespace BBWY.Client.ViewModels.PackTask
IsSelected = false
});
}
//查询sku
SearchSkuCommand = new RelayCommand(() =>
{
@ -485,9 +532,15 @@ namespace BBWY.Client.ViewModels.PackTask
SetCertificateCommand = new RelayCommand(SetCertificate);
SaveBarCodeCommand = new RelayCommand(SaveBarCode);
SetSpuCerCommand = new RelayCommand(SetSpuCer);
SaveSpuCerCommand = new RelayCommand(SaveSpuCer);
InseartCerCommand = new RelayCommand(InseartCer);
SaveCerCommand = new RelayCommand(SaveCer);
BarLabelCheckCommand = new RelayCommand<BarcodeLabelModel>(BarLabelCheck);
CerLabelCheckCommand = new RelayCommand<CertificateLabelModel>(CerLabelCheck);
SpuCerLabelCheckCommand = new RelayCommand<CertificateLabelModel>(SpuCerLabelCheck);
LookBarCommand = new RelayCommand(LookBar);
LookCerCommand = new RelayCommand(LookCer);
@ -497,7 +550,76 @@ namespace BBWY.Client.ViewModels.PackTask
BarLabelCheck(BarcodeLabelModel.);//默认精简模式
}
private void InseartCer()
{
CertificateModel = new CertificateModel()
{
//SpuId = SpuCertificateModel.SpuId,
SkuId = SkuId,
Brand = SpuCertificateModel.Brand,
BrandName = SpuCertificateModel.BrandName,
ExcuteStander = SpuCertificateModel.ExcuteStander,
FactoryNumber = SpuCertificateModel.FactoryNumber,
IsLogo = SpuCertificateModel.IsLogo,
LabelModel = SpuCertificateModel.LabelModel,
ProductAdress = SpuCertificateModel.ProductAdress,
ProductNo = SpuCertificateModel.ProductNo,
Shader = SpuCertificateModel.Shader,
ProductShop = SpuCertificateModel.ProductShop,
};
}
private void SetSpuCer()
{
if (SpuCertificateModel == null)
{
SpuCertificateModel = new CertificateModel();
SpuCertificateModel.ProductNo = ProductNo;
SpuCertificateModel.Brand = Brand;
SpuCertificateModel.SkuId = SkuId;
}
SpuCertificateModel.BrandName = BrandName;
setSpuCerWindow = new SetSpuCerWindow();
setSpuCerWindow.Show();
}
private void SaveSpuCer()
{
if (string.IsNullOrEmpty(SpuCertificateModel.ExcuteStander)
|| string.IsNullOrEmpty(SpuCertificateModel.Shader) || 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
});
if (resData == null || !resData.Success)
{
IsSetSpuCertificate = false;
return;
}
IsNeedCertificateModel = "需要";
CertificateModel.Id = resData.Data;
IsSetSpuCertificate = false;
setSpuCerWindow.Close();
}
private void OnSearchIncreateKeyWordChanged(string key)
{
@ -558,11 +680,15 @@ namespace BBWY.Client.ViewModels.PackTask
});
look.Show();
}
private void SpuCerLabelCheck(CertificateLabelModel cer)
{
SpuCertificateModel.LabelModel = cer;
SpuCertificateModel.IsLogo = cer == CertificateLabelModel.3c ? 1 : 0;
}
private void CerLabelCheck(CertificateLabelModel cer)
{
CertificateModel.LabelModel = cer;
CertificateModel.IsLogo = cer== CertificateLabelModel.3c?1:0;
CertificateModel.IsLogo = cer == CertificateLabelModel.3c ? 1 : 0;
}
/// <summary>
///
@ -595,11 +721,11 @@ namespace BBWY.Client.ViewModels.PackTask
new TipsWindow("请先查询skuId").Show();
return;
}
SearSpuCer();
if (CertificateModel == null)
{
CertificateModel = new CertificateModel();
CertificateModel = new CertificateModel();
CertificateModel.ProductNo = ProductNo;
CertificateModel.Brand = Brand;
CertificateModel.SkuId = SkuId;
@ -607,7 +733,7 @@ namespace BBWY.Client.ViewModels.PackTask
}
CertificateModel.BrandName = BrandName;
setCerWindow = new SetCerWindow();
setCerWindow.ShowDialog();
setCerWindow.Show();
//throw new NotImplementedException();
}
/// <summary>
@ -615,12 +741,12 @@ namespace BBWY.Client.ViewModels.PackTask
/// </summary>
private void SaveCer()
{
if (string.IsNullOrEmpty(CertificateModel.ExcuteStander)
if (string.IsNullOrEmpty(CertificateModel.ExcuteStander)
|| string.IsNullOrEmpty(CertificateModel.Shader) || string.IsNullOrEmpty(CertificateModel.BrandName)
|| string.IsNullOrEmpty(CertificateModel.Brand) || string.IsNullOrEmpty(CertificateModel.ProductShop)
|| string.IsNullOrEmpty(CertificateModel.ProductAdress))
{
new TipsWindow("参数出错!请重新填写!").ShowDialog();
new TipsWindow("参数出错!请重新填写!").Show();
return;
}
var standers = CertificateModel.ExcuteStander.Split(',', StringSplitOptions.RemoveEmptyEntries);
@ -652,10 +778,10 @@ namespace BBWY.Client.ViewModels.PackTask
setCerWindow.Close();
}
SetBarCodeWindow setBarCodeWindow = null; SetCerWindow setCerWindow = null;
SetBarCodeWindow setBarCodeWindow = null; SetCerWindow setCerWindow = null; SetSpuCerWindow setSpuCerWindow = null;
private void SetBarCode()
{
if (string.IsNullOrEmpty( SearchSkuId))
if (string.IsNullOrEmpty(SearchSkuId))
{
new TipsWindow("请先查询skuId").Show();
return;
@ -667,12 +793,12 @@ namespace BBWY.Client.ViewModels.PackTask
BarCodeModel.Brand = Brand;
BarCodeModel.SkuId = SkuId;
BarCodeModel.SkuName = SkuName;
}
BarCodeModel.BrandName = BrandName;
setBarCodeWindow = new SetBarCodeWindow();
setBarCodeWindow.ShowDialog();
setBarCodeWindow.Show();
}
public BarcodeLabelModel LabelModel = BarcodeLabelModel.;
@ -685,7 +811,7 @@ namespace BBWY.Client.ViewModels.PackTask
if (string.IsNullOrEmpty(ProductNo) || ProductNo == "待填写")
{
TipsWindow tips = new TipsWindow("该SKU无货号信息,将影响条形码打印\r\n请先设置好货号信息或调整打印模板类型");
tips.ShowDialog();
tips.Show();
return;
}
}
@ -706,7 +832,7 @@ namespace BBWY.Client.ViewModels.PackTask
IsSetBarCode = false;
return;
}
BarCodeModel.Id = resData.Data;
IsNeedBarCode = "需要";
IsSetBarCode = false;
@ -728,7 +854,7 @@ namespace BBWY.Client.ViewModels.PackTask
new TipsWindow("请先搜索SkuId!").Show();
return;
}
if (SkuCount<=0)
if (SkuCount <= 0)
{
new TipsWindow("请设置SKU任务数!").Show();
return;
@ -741,7 +867,10 @@ namespace BBWY.Client.ViewModels.PackTask
}
var createTaskModel = new Models.APIModel.Request.CreateTaskRequest
{
TaskId=TaskId,
ProductNo = ProductNo,
Logo = Logo,
SkuName = SkuName,
TaskId = TaskId,
BrandName = BrandName,
Availability = (int)Availability,
BasicPack = (int)BasicPack,
@ -764,7 +893,7 @@ namespace BBWY.Client.ViewModels.PackTask
{
if (BarCodeModel == null || BarCodeModel.Id <= 0)
{
new TipsWindow("请设置条形码模板").ShowDialog();
new TipsWindow("请设置条形码模板").Show();
return;
}
createTaskModel.BarCodeId = BarCodeModel.Id;
@ -773,17 +902,17 @@ namespace BBWY.Client.ViewModels.PackTask
{
if (CertificateModel == null || CertificateModel.Id <= 0)
{
new TipsWindow("请设置合格证模板").ShowDialog();
new TipsWindow("请设置合格证模板").Show();
return;
}
createTaskModel.CertificateId = CertificateModel.Id;//
}
ApiResponse<object> res = null;
if (TaskId>0)//修改界面
if (TaskId > 0)//修改界面
{
res = packTaskService.UpdateTask(createTaskModel);
}
else
else
{
res = packTaskService.CreateTask(createTaskModel);
}
@ -822,7 +951,7 @@ namespace BBWY.Client.ViewModels.PackTask
SkuName = skuResponse.Data[0].Title;
// ProductNo = skuResponse.Data[0].ProductItemNum;
SpuId = skuResponse.Data[0].ProductId;
productApiResponse = productService.GetProductList(skuResponse.Data[0].ProductId, string.Empty, string.Empty, 1);
@ -846,11 +975,13 @@ namespace BBWY.Client.ViewModels.PackTask
}
BrandName = productSku.Data.BrandName;
IsSetCertificate = true;
CertificateModel = productSku.Data.Certificate;
IsSetCertificate = false;
if (CertificateModel == null)
{
CertificateModel = new CertificateModel();
IsSetCertificate = true;
}
CertificateModel.Brand = Brand;
@ -858,16 +989,17 @@ namespace BBWY.Client.ViewModels.PackTask
CertificateModel.ProductNo = ProductNo;
CertificateModel.SkuId = SkuId;
BarCodeModel = productSku.Data.BarCodeModel;
IsSetBarCode = false;
if (BarCodeModel == null)
{
BarCodeModel = new BarCodeModel();
IsSetBarCode = true;
}
BarCodeModel.Brand = Brand;
BarCodeModel.BrandName = BrandName;
BarCodeModel.ProductNo = ProductNo;
BarCodeModel.SkuId = SkuId;
BarCodeModel.SkuName = SkuName;
IsSetBarCode = true;
}
else
{
@ -880,5 +1012,38 @@ namespace BBWY.Client.ViewModels.PackTask
//查看有木有存在
}
public void SearSpuCer()
{
if (string.IsNullOrEmpty(SpuId))
{
SearchSku();
return;
}
SpuId = SpuId.Trim();//去掉空格 避免数据异常
IsLoading = true;
var productSku = packTaskService.GetSpuCer(SpuId);
if (productSku == null || !productSku.Success)
{
IsSetSpuCertificate = true;
IsLoading = false;
return;
}
SpuCertificateModel = productSku.Data;
IsSetSpuCertificate = false;
if (SpuCertificateModel == null)
{
SpuCertificateModel = new CertificateModel();
IsSetSpuCertificate = true;
SpuCertificateModel.Brand = Brand;
SpuCertificateModel.BrandName = BrandName;
SpuCertificateModel.ProductNo = ProductNo;
SpuCertificateModel.SpuId = SpuId;
}
IsLoading = false;
}
}
}

14
BBWY.Client/ViewModels/PackTask/SetSpuCerViewModel.cs

@ -0,0 +1,14 @@
using BBWY.Common.Models;
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Controls;
namespace BBWY.Client.ViewModels.PackTask
{
public class SetSpuCerViewModel:ViewBase,IDenpendency//注入
{
public string SpuId { get; set; }
}
}

9
BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs

@ -17,6 +17,7 @@ using System.ComponentModel;
using HandyControl.Controls;
using System.Windows;
using System.Collections;
using NPOI.SS.Formula.Functions;
namespace BBWY.Client.ViewModels.PackTask
{
@ -140,12 +141,12 @@ namespace BBWY.Client.ViewModels.PackTask
#endregion
private readonly ProductService productService;
private readonly ConsumableService consumableService;
private readonly WorkProcessService workProcessService;
private readonly PackTaskService packTaskService;
private readonly IncreateServiceService increateServiceService;
public WareHouseListViewModel(PackTaskService packTaskService, ConsumableService consumableService, WorkProcessService workProcessService, IncreateServiceService increateServiceService)
public WareHouseListViewModel(PackTaskService packTaskService, ConsumableService consumableService, WorkProcessService workProcessService, IncreateServiceService increateServiceService, ProductService productService)
{
this.packTaskService = packTaskService;
this.consumableService = consumableService;
@ -186,13 +187,14 @@ namespace BBWY.Client.ViewModels.PackTask
SetTaskState(Models.TaskState.);
this.workProcessService = workProcessService;
this.increateServiceService = increateServiceService;
this.productService = productService;
}
#region 事件绑定
@ -278,7 +280,6 @@ namespace BBWY.Client.ViewModels.PackTask
OrderCount = dataModel.TotalCount;
foreach (var item in dataModel.Items)
{
var data = new PackTaskModel(packTaskService, consumableService, workProcessService, increateServiceService)
{
AcceptName = item.UserName,

2
BBWY.Client/Views/MainWindow.xaml

@ -26,7 +26,7 @@
<!--<TextBlock Text="{Binding GlobalContext.User.TeamName}" Margin="5,0,0,0"/>
<TextBlock Text="{Binding GlobalContext.User.Shop.Platform}" Margin="5,0,0,0"/>-->
<TextBlock Text="{Binding GlobalContext.User.Shop.ShopName}" Margin="5,0,0,0"/>
<TextBlock Text="v10087" Margin="5,0,0,0"/>
<TextBlock Text="v10088" Margin="5,0,0,0"/>
</StackPanel>
</Border>
<Grid Grid.Row="1">

4
BBWY.Client/Views/PackTask/CerControl.xaml

@ -16,7 +16,7 @@
<TextBlock Text="查看合格证" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<DockPanel Grid.Row="1">
<UniformGrid Grid.Row="1">
<Border Name="no3c" Visibility="{Binding CerData.LabelModel,Converter={StaticResource objConverter}, ConverterParameter=标准无3c:Visible:Collapsed}" BorderBrush="Black" BorderThickness="1" Width="380" Height="297" Margin="1" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid>
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text="合格证" FontSize="18" Margin="157,12,0,0" />
@ -106,7 +106,7 @@
Height="44" Text="{Binding CerData.ProductAdress}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,241,0,0"/>
</Grid>
</Border>
</DockPanel>
</UniformGrid>
</Grid>

2
BBWY.Client/Views/PackTask/CreatePackTask.xaml

@ -17,7 +17,7 @@
MinButtonVisibility="Collapsed"
MaxButtonVisibility="Collapsed"
RightButtonGroupMargin="0,5,5,0"
Title="CreatePackTask" Height="350" Width="1500">
Title="发布任务" Height="350" Width="1500">
<!-- DataContext="{Binding CreateTaskView,Source={StaticResource Locator}}" -->
<Window.Resources>
<ResourceDictionary>

4
BBWY.Client/Views/PackTask/FeesExcelControl.xaml.cs

@ -166,8 +166,6 @@ namespace BBWY.Client.Views.PackTask
public FeesExcelControl()
{
InitializeComponent();
}
@ -226,7 +224,7 @@ namespace BBWY.Client.Views.PackTask
{
serviceData.AppendLine(columnData.Replace("[:index:]", $"{i + 1}")
.Replace("[:ServiceName:]", $"{all[i].ItemName}")
.Replace("[:ServiceCount:]", $"{all[i].ItemCount}"));
.Replace("[:ServiceCount:]", $"{all[i].ItemPrice}*{all[i].ItemCount}"));
}
}
StringBuilder header = new StringBuilder();

99
BBWY.Client/Views/PackTask/SetCerControl.xaml

@ -0,0 +1,99 @@
<UserControl x:Class="BBWY.Client.Views.PackTask.SetCerControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
xmlns:local="clr-namespace:BBWY.Client.Views.PackTask"
xmlns:cmodel="clr-namespace:BBWY.Client.Models"
mc:Ignorable="d"
d:DesignHeight="700" d:DesignWidth="820">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid >
<!--IsChecked="{Binding IsLogo,Converter={StaticResource objConverter},ConverterParameter=0:true:false}"-->
<RadioButton GroupName="cer" IsChecked="{Binding model.LabelModel,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:CertificateLabelModel.标准无3c}}" Command="{Binding CerLabelCheckCommand}" CommandParameter="{x:Static cmodel:CertificateLabelModel.标准无3c}" Content="标准" Margin="10,0,0,0" Height="30" VerticalAlignment="Top"/>
<Border BorderBrush="Black" BorderThickness="1" Width="380" Height="297" Margin="13,30,13,0" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid>
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text="合格证" FontSize="18" Margin="157,12" />
<TextBlock Text="品牌:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,70" />
<c:BTextBox Height="25" Text="{Binding model.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,65"/>
<TextBlock Text="型号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,70,0,0" />
<c:BTextBox Height="25" Text="{Binding model.ProductNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,65,0,0"/>
<TextBlock Text="品名:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,112,0,0" />
<c:BTextBox Height="25" Text="{Binding model.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,107,0,0"/>
<TextBlock Text="材质:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,112,0,0" />
<c:BTextBox Height="25" Text="{Binding model.Shader,Mode=TwoWay}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,107,0,0"/>
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="9,166,0,0" />
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Height="25" Text="{Binding model.ExcuteStander,Mode=TwoWay}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,161,0,0"/>
<TextBlock Text="生产商:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="19,206,0,0" />
<c:BTextBox Height="25" Text="{Binding model.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,201,0,0"/>
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,242,0,0" />
<TextBox TextWrapping ="Wrap" AcceptsReturn="True" Height="44" Text="{Binding model.ProductAdress,Mode=TwoWay}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,241,0,0"/>
</Grid>
</Border>
</Grid>
<Grid Grid.Column="1" >
<!--IsChecked="{Binding IsLogo,Converter={StaticResource objConverter},ConverterParameter=1:true:false}"-->
<RadioButton GroupName="cer" IsChecked="{Binding model.LabelModel,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:CertificateLabelModel.标准有3c}}" Command="{Binding CerLabelCheckCommand}" CommandParameter="{x:Static cmodel:CertificateLabelModel.标准有3c}" Content="带3c标" Margin="10,0,0,0" Height="30" VerticalAlignment="Top"/>
<Border BorderBrush="Black" BorderThickness="1" Width="380" Height="297" Margin="13,30,13,0" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid >
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text="合格证" FontSize="18" Margin="157,12" />
<TextBlock Text="品牌:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,90" />
<c:BTextBox Text="{Binding model.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,85"/>
<TextBlock Text="型号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,90,0,0" />
<c:BTextBox Text="{Binding model.ProductNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,85,0,0"/>
<TextBlock Text="品名:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,127,0,0" />
<c:BTextBox Text="{Binding model.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,122,0,0"/>
<TextBlock Text="材质:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,127,0,0" />
<c:BTextBox Height="25" Text="{Binding model.Shader,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,122,0,0"/>
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="9,166,0,0" />
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Text="{Binding model.ExcuteStander,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,161,0,0"/>
<TextBlock Text="生产商:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="19,206,0,0" />
<c:BTextBox Text="{Binding ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,201,0,0"/>
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,242,0,0" />
<TextBox TextWrapping ="Wrap" AcceptsReturn="True" Text="{Binding model.ProductAdress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="44" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,241,0,0"/>
<TextBlock Text="工厂编号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,60,0,0" />
<c:BTextBox Text="{Binding model.FactoryNumber,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="100" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="259,55,0,0"/>
<Image Source="pack://siteoforigin:,,,/Resources/Images/3c.png" Width="54" Height="42" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="282,6,0,0" />
</Grid>
</Border>
</Grid>
<Grid Grid.Row="1">
<!--IsChecked="{Binding IsLogo,Converter={StaticResource objConverter},ConverterParameter=0:true:false}"-->
<RadioButton GroupName="cer" IsChecked="{Binding model.LabelModel,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:CertificateLabelModel.无型号}}" Command="{Binding CerLabelCheckCommand}" CommandParameter="{x:Static cmodel:CertificateLabelModel.无型号}" Content="无型号" Margin="10,0,0,0" Height="30" VerticalAlignment="Top"/>
<Border BorderBrush="Black" BorderThickness="1" Width="380" Height="297" Margin="13,30,13,0" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid>
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text="合格证" FontSize="18" Margin="157,12" />
<TextBlock Text="品牌:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,70" />
<c:BTextBox Height="25" Text="{Binding model.Brand,Mode=TwoWay,NotifyOnTargetUpdated=True,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,65"/>
<TextBlock Text="品名:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,70,0,0" />
<c:BTextBox Height="25" Text="{Binding model.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,65,0,0"/>
<TextBlock Text="材质:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,114,0,0" />
<c:BTextBox Height="26" Text="{Binding model.Shader,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,108,0,0"/>
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="9,166,0,0" />
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Height="25" Text="{Binding model.ExcuteStander,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,161,0,0"/>
<TextBlock Text="生产商:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="19,206,0,0" />
<c:BTextBox Height="25" Text="{Binding model.ProductShop,Mode=TwoWay,NotifyOnTargetUpdated=True,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,201,0,0"/>
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,242,0,0" />
<TextBox TextWrapping ="Wrap" AcceptsReturn="True" Height="44" Text="{Binding model.ProductAdress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,241,0,0"/>
</Grid>
</Border>
</Grid>
</Grid>
</UserControl>

86
BBWY.Client/Views/PackTask/SetCerControl.xaml.cs

@ -0,0 +1,86 @@
using BBWY.Client.Models;
using BBWY.Client.Models.APIModel.Response.PackTask;
using MathNet.Numerics;
using System;
using System.Collections.Generic;
using System.ComponentModel;
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.Navigation;
using System.Windows.Shapes;
namespace BBWY.Client.Views.PackTask
{
/// <summary>
/// SetCerControl.xaml 的交互逻辑
/// </summary>
public partial class SetCerControl : UserControl,INotifyPropertyChanged
{
public SetCerControl()
{
InitializeComponent();
}
//CertificateModel
public CertificateModel model
{
get
{
return (CertificateModel)GetValue(modelProperty);
}
set
{
SetValue(modelProperty, value);
NotifyPropertyChanged("CertificateModel");
}
}
public static readonly DependencyProperty modelProperty =
DependencyProperty.Register("model", typeof(CertificateModel), typeof(SetCerControl), new PropertyMetadata(ChangedProperty));
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void NotifyPropertyChanged(string propertyName)
{
if (this.PropertyChanged != null)
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private static void ChangedProperty(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var control = d as SetCerControl;
var newValue = e.NewValue as CertificateModel;
if (control != null && newValue != null)
{
control.model = newValue;
//control.DataContext = newValue;
//control.OnPropertyChanged(e);
}
}
}
}

169
BBWY.Client/Views/PackTask/SetCerWindow.xaml

@ -7,7 +7,7 @@
xmlns:local="clr-namespace:BBWY.Client.Views.PackTask"
mc:Ignorable="d"
Style="{StaticResource bwstyle}"
Height="799" Width="820"
Height="860" Width="820"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:ctr="clr-namespace:BBWY.Client.Converters"
xmlns:cmodel="clr-namespace:BBWY.Client.Models"
@ -32,98 +32,105 @@
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="60"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid >
<!--IsChecked="{Binding CertificateModel.IsLogo,Converter={StaticResource objConverter},ConverterParameter=0:true:false}"-->
<RadioButton GroupName="cer" IsChecked="{Binding CertificateModel.LabelModel,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:CertificateLabelModel.标准无3c}}" Command="{Binding CerLabelCheckCommand}" CommandParameter="{x:Static cmodel:CertificateLabelModel.标准无3c}" Content="标准" Margin="10,20,0,0" Height="30" VerticalAlignment="Top"/>
<Border BorderBrush="Black" BorderThickness="1" Width="380" Height="297" Margin="13,50,13,0" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid>
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text="合格证" FontSize="18" Margin="157,12" />
<TextBlock Text="品牌:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,70" />
<c:BTextBox Height="25" Text="{Binding CertificateModel.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,65"/>
<TextBlock Text="型号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,70,0,0" />
<c:BTextBox Height="25" Text="{Binding CertificateModel.ProductNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,65,0,0"/>
<TextBlock Text="品名:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,112,0,0" />
<c:BTextBox Height="25" Text="{Binding CertificateModel.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,107,0,0"/>
<TextBlock Text="材质:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,112,0,0" />
<c:BTextBox Height="25" Text="{Binding CertificateModel.Shader,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,107,0,0"/>
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="9,166,0,0" />
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Height="25" Text="{Binding CertificateModel.ExcuteStander,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,161,0,0"/>
<TextBlock Text="生产商:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="19,206,0,0" />
<c:BTextBox Height="25" Text="{Binding CertificateModel.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,201,0,0"/>
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,242,0,0" />
<TextBox TextWrapping ="Wrap" AcceptsReturn="True" Height="44" Text="{Binding CertificateModel.ProductAdress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,241,0,0"/>
<StackPanel Orientation="Horizontal">
<c:BButton Background="{StaticResource Button.Background}" Grid.Row="2" Content="{Binding SetSpuCerStatus}" HorizontalAlignment="Right" Width="100" Margin="20,0,20,0" VerticalAlignment="Stretch"
Command="{Binding SetSpuCerCommand}" />
<c:BButton Background="{StaticResource Button.Background}" Grid.Row="2" Content="导入spu模板" HorizontalAlignment="Right" Width="100" VerticalAlignment="Stretch"
Command="{Binding InseartCerCommand}" />
</StackPanel>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid >
<!--IsChecked="{Binding IsLogo,Converter={StaticResource objConverter},ConverterParameter=0:true:false}"-->
<RadioButton GroupName="cer" IsChecked="{Binding CertificateModel.LabelModel,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:CertificateLabelModel.标准无3c}}" Command="{Binding CerLabelCheckCommand}" CommandParameter="{x:Static cmodel:CertificateLabelModel.标准无3c}" Content="标准" Margin="10,0,0,0" Height="30" VerticalAlignment="Top"/>
<Border BorderBrush="Black" BorderThickness="1" Width="380" Height="297" Margin="13,30,13,0" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid>
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text="合格证" FontSize="18" Margin="157,12" />
<TextBlock Text="品牌:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,70" />
<c:BTextBox Height="25" Text="{Binding CertificateModel.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,65"/>
<TextBlock Text="型号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,70,0,0" />
<c:BTextBox Height="25" Text="{Binding CertificateModel.ProductNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,65,0,0"/>
<TextBlock Text="品名:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,112,0,0" />
<c:BTextBox Height="25" Text="{Binding CertificateModel.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,107,0,0"/>
<TextBlock Text="材质:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,112,0,0" />
<c:BTextBox Height="25" Text="{Binding CertificateModel.Shader,Mode=TwoWay}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,107,0,0"/>
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="9,166,0,0" />
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Height="25" Text="{Binding CertificateModel.ExcuteStander,Mode=TwoWay}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,161,0,0"/>
<TextBlock Text="生产商:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="19,206,0,0" />
<c:BTextBox Height="25" Text="{Binding CertificateModel.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,201,0,0"/>
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,242,0,0" />
<TextBox TextWrapping ="Wrap" AcceptsReturn="True" Height="44" Text="{Binding CertificateModel.ProductAdress,Mode=TwoWay}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,241,0,0"/>
</Grid>
</Border>
</Grid>
<Grid Grid.Column="1" >
<!--IsChecked="{Binding CertificateModel.IsLogo,Converter={StaticResource objConverter},ConverterParameter=1:true:false}"-->
<RadioButton GroupName="cer" IsChecked="{Binding CertificateModel.LabelModel,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:CertificateLabelModel.标准有3c}}" Command="{Binding CerLabelCheckCommand}" CommandParameter="{x:Static cmodel:CertificateLabelModel.标准有3c}" Content="带3c标" Margin="10,20,0,0" Height="30" VerticalAlignment="Top"/>
<Border BorderBrush="Black" BorderThickness="1" Width="380" Height="297" Margin="13,50,13,0" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid >
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text="合格证" FontSize="18" Margin="157,12" />
<TextBlock Text="品牌:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,90" />
<c:BTextBox Text="{Binding CertificateModel.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,85"/>
<TextBlock Text="型号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,90,0,0" />
<c:BTextBox Text="{Binding CertificateModel.ProductNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,85,0,0"/>
<TextBlock Text="品名:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,127,0,0" />
<c:BTextBox Text="{Binding CertificateModel.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,122,0,0"/>
<TextBlock Text="材质:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,127,0,0" />
<c:BTextBox Height="25" Text="{Binding CertificateModel.Shader,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,122,0,0"/>
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="9,166,0,0" />
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Text="{Binding CertificateModel.ExcuteStander,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,161,0,0"/>
<TextBlock Text="生产商:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="19,206,0,0" />
<c:BTextBox Text="{Binding CertificateModel.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,201,0,0"/>
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,242,0,0" />
<TextBox TextWrapping ="Wrap" AcceptsReturn="True" Text="{Binding CertificateModel.ProductAdress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="44" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,241,0,0"/>
<TextBlock Text="工厂编号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,60,0,0" />
<c:BTextBox Text="{Binding CertificateModel.FactoryNumber,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="100" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="259,55,0,0"/>
</Grid>
</Border>
</Grid>
<Grid Grid.Column="1">
<!--IsChecked="{Binding IsLogo,Converter={StaticResource objConverter},ConverterParameter=1:true:false}"-->
<RadioButton GroupName="cer" IsChecked="{Binding CertificateModel.LabelModel,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:CertificateLabelModel.标准有3c}}" Command="{Binding CerLabelCheckCommand}" CommandParameter="{x:Static cmodel:CertificateLabelModel.标准有3c}" Content="带3c标" Margin="10,0,0,0" Height="30" VerticalAlignment="Top"/>
<Border BorderBrush="Black" BorderThickness="1" Width="380" Height="297" Margin="13,30,13,0" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid >
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text="合格证" FontSize="18" Margin="157,12" />
<TextBlock Text="品牌:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,90" />
<c:BTextBox Text="{Binding CertificateModel.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,85"/>
<TextBlock Text="型号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,90,0,0" />
<c:BTextBox Text="{Binding CertificateModel.ProductNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,85,0,0"/>
<TextBlock Text="品名:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,127,0,0" />
<c:BTextBox Text="{Binding CertificateModel.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,122,0,0"/>
<TextBlock Text="材质:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,127,0,0" />
<c:BTextBox Height="25" Text="{Binding CertificateModel.Shader,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,122,0,0"/>
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="9,166,0,0" />
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Text="{Binding CertificateModel.ExcuteStander,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,161,0,0"/>
<TextBlock Text="生产商:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="19,206,0,0" />
<c:BTextBox Text="{Binding CertificateModel.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,201,0,0"/>
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,242,0,0" />
<TextBox TextWrapping ="Wrap" AcceptsReturn="True" Text="{Binding CertificateModel.ProductAdress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="44" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,241,0,0"/>
<TextBlock Text="工厂编号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,60,0,0" />
<c:BTextBox Text="{Binding CertificateModel.FactoryNumber,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="100" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="259,55,0,0"/>
<Image Source="pack://siteoforigin:,,,/Resources/Images/3c.png" Width="54" Height="42" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="282,6,0,0" />
<Image Source="pack://siteoforigin:,,,/Resources/Images/3c.png" Width="54" Height="42" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="282,6,0,0" />
</Grid>
</Border>
</Grid>
</Border>
</Grid>
</Grid>
<Grid Grid.Row="1">
<!--IsChecked="{Binding CertificateModel.IsLogo,Converter={StaticResource objConverter},ConverterParameter=0:true:false}"-->
<RadioButton GroupName="cer" IsChecked="{Binding CertificateModel.LabelModel,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:CertificateLabelModel.无型号}}" Command="{Binding CerLabelCheckCommand}" CommandParameter="{x:Static cmodel:CertificateLabelModel.无型号}" Content="无型号" Margin="10,20,0,0" Height="30" VerticalAlignment="Top"/>
<Border BorderBrush="Black" BorderThickness="1" Width="380" Height="297" Margin="13,50,13,0" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid>
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text="合格证" FontSize="18" Margin="157,12" />
<TextBlock Text="品牌:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,70" />
<c:BTextBox Height="25" Text="{Binding CertificateModel.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,65"/>
<TextBlock Text="品名:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,70,0,0" />
<c:BTextBox Height="25" Text="{Binding CertificateModel.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,65,0,0"/>
<TextBlock Text="材质:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,114,0,0" />
<c:BTextBox Height="26" Text="{Binding CertificateModel.Shader,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,108,0,0"/>
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="9,166,0,0" />
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Height="25" Text="{Binding CertificateModel.ExcuteStander,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,161,0,0"/>
<TextBlock Text="生产商:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="19,206,0,0" />
<c:BTextBox Height="25" Text="{Binding CertificateModel.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,201,0,0"/>
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,242,0,0" />
<TextBox TextWrapping ="Wrap" AcceptsReturn="True" Height="44" Text="{Binding CertificateModel.ProductAdress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,241,0,0"/>
<Grid Grid.Row="1">
<!--IsChecked="{Binding IsLogo,Converter={StaticResource objConverter},ConverterParameter=0:true:false}"-->
<RadioButton GroupName="cer" IsChecked="{Binding CertificateModel.LabelModel,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:CertificateLabelModel.无型号}}" Command="{Binding CerLabelCheckCommand}" CommandParameter="{x:Static cmodel:CertificateLabelModel.无型号}" Content="无型号" Margin="10,0,0,0" Height="30" VerticalAlignment="Top"/>
<Border BorderBrush="Black" BorderThickness="1" Width="380" Height="297" Margin="13,30,13,0" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid>
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text="合格证" FontSize="18" Margin="157,12" />
<TextBlock Text="品牌:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,70" />
<c:BTextBox Height="25" Text="{Binding CertificateModel.Brand,Mode=TwoWay,NotifyOnTargetUpdated=True,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,65"/>
<TextBlock Text="品名:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,70,0,0" />
<c:BTextBox Height="25" Text="{Binding CertificateModel.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,65,0,0"/>
<TextBlock Text="材质:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,114,0,0" />
<c:BTextBox Height="26" Text="{Binding CertificateModel.Shader,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,108,0,0"/>
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="9,166,0,0" />
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Height="25" Text="{Binding CertificateModel.ExcuteStander,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,161,0,0"/>
<TextBlock Text="生产商:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="19,206,0,0" />
<c:BTextBox Height="25" Text="{Binding CertificateModel.ProductShop,Mode=TwoWay,NotifyOnTargetUpdated=True,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,201,0,0"/>
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,242,0,0" />
<TextBox TextWrapping ="Wrap" AcceptsReturn="True" Height="44" Text="{Binding CertificateModel.ProductAdress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,241,0,0"/>
</Grid>
</Border>
</Grid>
</Border>
</Grid>
</Grid>
<!--<local:SetCerControl Grid.Row="1" CertificateModel="{Binding CertificateModel,Mode=TwoWay,NotifyOnSourceUpdated=True,UpdateSourceTrigger=PropertyChanged}"/>-->
</Grid>
<Border Grid.Row="2" Height="1" VerticalAlignment="Top" BorderBrush="{StaticResource Border.Background}" BorderThickness="1"/>
<c:BButton Background="{StaticResource Button.Background}" Grid.Row="2" Content="保存" HorizontalAlignment="Right" Width="100" VerticalAlignment="Stretch"
Command="{Binding SaveCerCommand}" />

125
BBWY.Client/Views/PackTask/SetSpuCerWindow.xaml

@ -0,0 +1,125 @@
<c:BWindow x:Class="BBWY.Client.Views.PackTask.SetSpuCerWindow"
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BBWY.Client.Views.PackTask"
mc:Ignorable="d"
Style="{StaticResource bwstyle}"
Height="799" Width="820"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:ctr="clr-namespace:BBWY.Client.Converters"
xmlns:cmodel="clr-namespace:BBWY.Client.Models"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
DataContext="{Binding CreateTaskView,Source={StaticResource Locator}}"
CloseButtonVisibility="Visible"
CloseButtonColor="{StaticResource WindowButtonColor}"
MinButtonVisibility="Collapsed"
MaxButtonVisibility="Collapsed"
RightButtonGroupMargin="0,5,5,0">
<!-- DataContext="{Binding CreateSetBarCodeView,Source={StaticResource Locator}}"-->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition/>
<RowDefinition Height="40"/>
</Grid.RowDefinitions>
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}"
Background="{StaticResource Border.Background}">
<TextBlock Text="设置SPU合格证模板" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid >
<!--IsChecked="{Binding IsLogo,Converter={StaticResource objConverter},ConverterParameter=0:true:false}"-->
<RadioButton GroupName="cer" IsChecked="{Binding SpuCertificateModel.LabelModel,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:CertificateLabelModel.标准无3c}}" Command="{Binding SpuCerLabelCheckCommand}" CommandParameter="{x:Static cmodel:CertificateLabelModel.标准无3c}" Content="标准" Margin="10,0,0,0" Height="30" VerticalAlignment="Top"/>
<Border BorderBrush="Black" BorderThickness="1" Width="380" Height="297" Margin="13,30,13,0" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid>
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text="合格证" FontSize="18" Margin="157,12" />
<TextBlock Text="品牌:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,70" />
<c:BTextBox Height="25" Text="{Binding SpuCertificateModel.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,65"/>
<TextBlock Text="型号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,70,0,0" />
<c:BTextBox Height="25" Text="{Binding SpuCertificateModel.ProductNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,65,0,0"/>
<TextBlock Text="品名:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,112,0,0" />
<c:BTextBox Height="25" Text="{Binding SpuCertificateModel.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,107,0,0"/>
<TextBlock Text="材质:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,112,0,0" />
<c:BTextBox Height="25" Text="{Binding SpuCertificateModel.Shader,Mode=TwoWay}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,107,0,0"/>
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="9,166,0,0" />
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Height="25" Text="{Binding SpuCertificateModel.ExcuteStander,Mode=TwoWay}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,161,0,0"/>
<TextBlock Text="生产商:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="19,206,0,0" />
<c:BTextBox Height="25" Text="{Binding SpuCertificateModel.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,201,0,0"/>
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,242,0,0" />
<TextBox TextWrapping ="Wrap" AcceptsReturn="True" Height="44" Text="{Binding SpuCertificateModel.ProductAdress,Mode=TwoWay}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,241,0,0"/>
</Grid>
</Border>
</Grid>
<Grid Grid.Column="1">
<!--IsChecked="{Binding IsLogo,Converter={StaticResource objConverter},ConverterParameter=1:true:false}"-->
<RadioButton GroupName="cer" IsChecked="{Binding SpuCertificateModel.LabelModel,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:CertificateLabelModel.标准有3c}}" Command="{Binding SpuCerLabelCheckCommand}" CommandParameter="{x:Static cmodel:CertificateLabelModel.标准有3c}" Content="带3c标" Margin="10,0,0,0" Height="30" VerticalAlignment="Top"/>
<Border BorderBrush="Black" BorderThickness="1" Width="380" Height="297" Margin="13,30,13,0" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid >
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text="合格证" FontSize="18" Margin="157,12" />
<TextBlock Text="品牌:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,90" />
<c:BTextBox Text="{Binding SpuCertificateModel.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,85"/>
<TextBlock Text="型号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,90,0,0" />
<c:BTextBox Text="{Binding SpuCertificateModel.ProductNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,85,0,0"/>
<TextBlock Text="品名:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,127,0,0" />
<c:BTextBox Text="{Binding SpuCertificateModel.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,122,0,0"/>
<TextBlock Text="材质:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,127,0,0" />
<c:BTextBox Height="25" Text="{Binding SpuCertificateModel.Shader,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,122,0,0"/>
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="9,166,0,0" />
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Text="{Binding SpuCertificateModel.ExcuteStander,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,161,0,0"/>
<TextBlock Text="生产商:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="19,206,0,0" />
<c:BTextBox Text="{Binding SpuCertificateModel.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,201,0,0"/>
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,242,0,0" />
<TextBox TextWrapping ="Wrap" AcceptsReturn="True" Text="{Binding SpuCertificateModel.ProductAdress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="44" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,241,0,0"/>
<TextBlock Text="工厂编号:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,60,0,0" />
<c:BTextBox Text="{Binding SpuCertificateModel.FactoryNumber,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="100" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="259,55,0,0"/>
<Image Source="pack://siteoforigin:,,,/Resources/Images/3c.png" Width="54" Height="42" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="282,6,0,0" />
</Grid>
</Border>
</Grid>
<Grid Grid.Row="1">
<!--IsChecked="{Binding IsLogo,Converter={StaticResource objConverter},ConverterParameter=0:true:false}"-->
<RadioButton GroupName="cer" IsChecked="{Binding SpuCertificateModel.LabelModel,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:CertificateLabelModel.无型号}}" Command="{Binding SpuCerLabelCheckCommand}" CommandParameter="{x:Static cmodel:CertificateLabelModel.无型号}" Content="无型号" Margin="10,0,0,0" Height="30" VerticalAlignment="Top"/>
<Border BorderBrush="Black" BorderThickness="1" Width="380" Height="297" Margin="13,30,13,0" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid>
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text="合格证" FontSize="18" Margin="157,12" />
<TextBlock Text="品牌:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,70" />
<c:BTextBox Height="25" Text="{Binding SpuCertificateModel.Brand,Mode=TwoWay,NotifyOnTargetUpdated=True,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,65"/>
<TextBlock Text="品名:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="203,70,0,0" />
<c:BTextBox Height="25" Text="{Binding SpuCertificateModel.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="233,65,0,0"/>
<TextBlock Text="材质:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,114,0,0" />
<c:BTextBox Height="26" Text="{Binding SpuCertificateModel.Shader,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,108,0,0"/>
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="9,166,0,0" />
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Height="25" Text="{Binding SpuCertificateModel.ExcuteStander,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,161,0,0"/>
<TextBlock Text="生产商:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="19,206,0,0" />
<c:BTextBox Height="25" Text="{Binding SpuCertificateModel.ProductShop,Mode=TwoWay,NotifyOnTargetUpdated=True,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,201,0,0"/>
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="33,242,0,0" />
<TextBox TextWrapping ="Wrap" AcceptsReturn="True" Height="44" Text="{Binding SpuCertificateModel.ProductAdress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="63,241,0,0"/>
</Grid>
</Border>
</Grid>
</Grid>
<Border Grid.Row="2" Height="1" VerticalAlignment="Top" BorderBrush="{StaticResource Border.Background}" BorderThickness="1"/>
<c:BButton Background="{StaticResource Button.Background}" Grid.Row="2" Content="保存" HorizontalAlignment="Right" Width="100" VerticalAlignment="Stretch"
Command="{Binding SaveSpuCerCommand}" />
</Grid>
</c:BWindow>

26
BBWY.Client/Views/PackTask/SetSpuCerWindow.xaml.cs

@ -0,0 +1,26 @@
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.PackTask
{
/// <summary>
/// SetSpuCerWindow.xaml 的交互逻辑
/// </summary>
public partial class SetSpuCerWindow : BWindow
{
public SetSpuCerWindow()
{
InitializeComponent();
}
}
}

1
BBWY.Client/WebView2Manager.cs

@ -20,6 +20,7 @@ namespace BBWY.Client
if (wb2 == null)
{
wb2 = new WebView2();
//配置环境
var wb2Setting = CoreWebView2Environment.CreateAsync(userDataFolder: io.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "WebView2UserData", userDataFolder)).Result;
wb2.EnsureCoreWebView2Async(wb2Setting);
wb2.CoreWebView2InitializationCompleted += Wb2_CoreWebView2InitializationCompleted;

Loading…
Cancel
Save