59 changed files with 3759 additions and 26 deletions
@ -0,0 +1,123 @@ |
|||
using BBWYB.Client.Models; |
|||
using BBWYB.Client.Models.APIModel; |
|||
using BBWYB.Common.Http; |
|||
using BBWYB.Common.Models; |
|||
using Microsoft.Extensions.Logging.Abstractions; |
|||
using Newtonsoft.Json; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Net; |
|||
using System.Net.Http; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace BBWYB.Client.APIServices |
|||
{ |
|||
public class PackPurchaseTaskService : BaseApiService, IDenpendency |
|||
{ |
|||
public PackPurchaseTaskService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext) |
|||
{ |
|||
} |
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
/// <param name="shopId">店铺Id(采购方)</param>
|
|||
/// <param name="skuId">来源店铺的skuid</param>
|
|||
/// <param name="originShopName">店铺来源</param>
|
|||
/// <param name="skuCount">下单数量</param>
|
|||
/// <param name="userName">下单人</param>
|
|||
/// <param name="orderId">订单id</param>
|
|||
/// <param name="Platform">采购平台</param>
|
|||
/// <param name="WareHourses">分箱明细</param>
|
|||
/// <param name="MarkMessage"></param>
|
|||
/// <returns></returns>
|
|||
public ApiResponse<long> PublicPurchaseTask(string shopId,string skuId, string originShopName, |
|||
int skuCount, string userName, string orderId, Platform Platform, |
|||
WareHourseDTO[] WareHourses, |
|||
string MarkMessage) |
|||
{ |
|||
return SendRequest<long>(globalContext.QKApiHost, "api/PackPurchaseTask/PublicPurchaseTask", new |
|||
{ |
|||
shopId, |
|||
skuId, |
|||
originShopName, |
|||
skuCount, |
|||
userName, |
|||
orderId, |
|||
Platform, |
|||
WareHourses, |
|||
MarkMessage |
|||
}, null, HttpMethod.Post); |
|||
} |
|||
|
|||
public ApiResponse<long> UpdatePurchaseTask(UpdatePurchaseTaskRequest updatePurchaseTaskRequest) |
|||
{ |
|||
return SendRequest<long>(globalContext.QKApiHost, "api/PackPurchaseTask/UpdatePurchaseTask", updatePurchaseTaskRequest, null, HttpMethod.Post); |
|||
} |
|||
|
|||
public ApiResponse<ConfigPackResponse> GetConfigPack(string skuId, string skuPurchaseSchemeId) |
|||
{ |
|||
return SendRequest<ConfigPackResponse>(globalContext.QKApiHost, "api/PackPurchaseTask/GetConfigPack", new { |
|||
skuId, |
|||
skuPurchaseSchemeId |
|||
} |
|||
, null, HttpMethod.Post); |
|||
} |
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
/// <param name="orderId"></param>
|
|||
/// <param name="skuId"></param>
|
|||
/// <param name="availability">到货情况(物流状态)(已到货 = 0,部分到货 = 1,未到货 = 2)</param>
|
|||
/// <returns></returns>
|
|||
public ApiResponse<long> UpdateAvailabilityState(string orderId, string skuId, int availability) |
|||
{ |
|||
return SendRequest<long>(globalContext.QKApiHost, "api/PackPurchaseTask/UpdatePurchaseTask", new { |
|||
orderId, |
|||
skuId, |
|||
availability |
|||
}, null, HttpMethod.Post); |
|||
} |
|||
|
|||
public ApiResponse<long> SaveBarCode(BarCodeRequest barCodeModel) |
|||
{ |
|||
return SendRequest<long>(globalContext.QKApiHost, "api/PackTask/CommitBarCode", barCodeModel |
|||
, null, HttpMethod.Post); |
|||
} |
|||
|
|||
public ApiResponse<long> SaveCer(CerRequest cerRequest) |
|||
{ |
|||
return SendRequest<long>(globalContext.QKApiHost, "api/Certificate/CommitSkuCer", cerRequest |
|||
, null, HttpMethod.Post); |
|||
} |
|||
|
|||
|
|||
public ApiResponse<ProductSkuResponse> GetProductSku(string skuId) |
|||
{ |
|||
|
|||
return SendRequest<ProductSkuResponse>(globalContext.QKApiHost, $"api/PackTask/SearchProduct?skuId={skuId}&ShopId={globalContext.User.Shop.ShopId}", null, null, HttpMethod.Get); |
|||
// HttpClientHelper helper = new HttpClientHelper(globalContext.QKApiHost);
|
|||
|
|||
//string url = $"{globalContext.QKApiHost}/api/PackTask/SearchProduct?skuId={skuId}&ShopId={globalContext.User.Shop.ShopId}";
|
|||
//var data = helper.Get(url);
|
|||
|
|||
//return JsonConvert.DeserializeObject<ApiResponse<ProductSkuResponse>>(data);
|
|||
} |
|||
|
|||
} |
|||
public class WareHourseDTO |
|||
{ |
|||
|
|||
public string WareId { get; set; } |
|||
/// <summary>
|
|||
/// 仓库名称
|
|||
/// </summary>
|
|||
public string WareName { get; set; } |
|||
/// <summary>
|
|||
/// 数量
|
|||
/// </summary>
|
|||
public int Count { get; set; } |
|||
} |
|||
|
|||
} |
@ -0,0 +1,43 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace BBWYB.Client.Models.APIModel |
|||
{ |
|||
public class BarCodeRequest |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 品牌
|
|||
/// </summary>
|
|||
public string Brand { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 品名
|
|||
/// </summary>
|
|||
public string BrandName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 货号
|
|||
/// </summary>
|
|||
public string ProductNo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// sku名称
|
|||
/// </summary>
|
|||
public string SkuName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// skuId(条形码号=POP+SkuId)
|
|||
/// </summary>
|
|||
public string SkuId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 条形码模板
|
|||
/// </summary>
|
|||
public BarcodeLabelModel LabelModel { get; set; } |
|||
|
|||
} |
|||
} |
@ -0,0 +1,79 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace BBWYB.Client.Models.APIModel |
|||
{ |
|||
public class CerRequest |
|||
{ |
|||
|
|||
public string SpuId { get; set; } |
|||
/// <summary>
|
|||
/// skuid
|
|||
/// </summary>
|
|||
public string SkuId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 品牌
|
|||
/// </summary>
|
|||
public string Brand { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 品名
|
|||
/// </summary>
|
|||
public string BrandName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 材质
|
|||
/// </summary>
|
|||
public string Shader { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 执行标准
|
|||
/// </summary>
|
|||
public string ExcuteStander { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 生产商
|
|||
/// </summary>
|
|||
public string ProductShop { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 地址
|
|||
/// </summary>
|
|||
public string ProductAdress { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 型号(货号)
|
|||
/// </summary>
|
|||
public string ProductNo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 是否含3cLogo(0是 ,1否)
|
|||
/// </summary>
|
|||
public int IsLogo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 工厂编号
|
|||
/// </summary>
|
|||
public string FactoryNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 合格证模板
|
|||
/// </summary>
|
|||
public int LabelModel { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 适用年龄
|
|||
/// </summary>
|
|||
public string ApplyAge { get; set; } |
|||
|
|||
public int GoodsNumber { get; set; } |
|||
|
|||
public string ProduceDate { get; set; } |
|||
|
|||
public string PurchaseSkuId { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,141 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace BBWYB.Client.Models.APIModel |
|||
{ |
|||
/// <summary>
|
|||
/// 修改采购单任务
|
|||
/// </summary>
|
|||
public class UpdatePurchaseTaskRequest |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// sku数量
|
|||
/// </summary>
|
|||
public int SkuCount { get; set; } |
|||
/// <summary>
|
|||
/// 到货情况(已到货 = 0,部分到货 = 1,未到货 = 2)
|
|||
/// </summary>
|
|||
public int Availability { get; set; } |
|||
/// <summary>
|
|||
/// 落仓(本地仓=0,齐越仓=1,京东仓=2)
|
|||
/// </summary>
|
|||
public int PositionType { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 打包类型(单件=0,多件=1)
|
|||
/// </summary>
|
|||
public int PackType { get; set; } |
|||
/// <summary>
|
|||
/// 配件数量
|
|||
/// </summary>
|
|||
public int GoodsNumber { get; set; } |
|||
/// <summary>
|
|||
/// sku配件名称
|
|||
/// </summary>
|
|||
public string SkuGoodsTitle { get; set; } |
|||
/// <summary>
|
|||
/// 基础包装(快递袋=0,纸箱=1,麻袋=2)
|
|||
/// </summary>
|
|||
public int BasicPack { get; set; } |
|||
/// <summary>
|
|||
/// 增量耗材
|
|||
/// </summary>
|
|||
public string Increment1 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 注意事项
|
|||
/// </summary>
|
|||
public string MarkMessage { get; set; } |
|||
|
|||
/// <summary>
|
|||
///条形码Id
|
|||
/// </summary>
|
|||
public long? BarCodeId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 合格证Id 格式: id,id 186,187
|
|||
/// </summary>
|
|||
public string CerId { get; set; } |
|||
/// <summary>
|
|||
/// 是否需要条形码
|
|||
/// </summary>
|
|||
public bool? NeedBar { get; set; } |
|||
/// <summary>
|
|||
/// 是否需要合格证
|
|||
/// </summary>
|
|||
public bool? NeedCer { get; set; } |
|||
/// <summary>
|
|||
/// 合格证位置
|
|||
/// </summary>
|
|||
public int? CertificatePosition { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 加急
|
|||
/// </summary>
|
|||
public int IsWorry { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 拳探订单id
|
|||
/// </summary>
|
|||
public string OrderId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// skuId
|
|||
/// </summary>
|
|||
public string SkuId { get; set; } |
|||
|
|||
#region 更新数据
|
|||
/// <summary>
|
|||
/// 品名
|
|||
/// </summary>
|
|||
public string BrandName { get; set; } |
|||
/// <summary>
|
|||
/// 货号
|
|||
/// </summary>
|
|||
public string ProductNo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 图
|
|||
/// </summary>
|
|||
public string Logo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 名称
|
|||
/// </summary>
|
|||
public string SkuName { get; set; } |
|||
/// <summary>
|
|||
/// 品牌
|
|||
/// </summary>
|
|||
public string Brand { get; set; } |
|||
#endregion
|
|||
|
|||
/// <summary>
|
|||
/// 采购方案id
|
|||
/// </summary>
|
|||
public string SkuPurchaseSchemeId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 保存 配置商品合格证状态配置信息
|
|||
/// </summary>
|
|||
public PurchaseSkuSpec[] PurchaseSkuSpecs { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 配置商品合格证状态
|
|||
/// </summary>
|
|||
public class PurchaseSkuSpec |
|||
{ |
|||
/// <summary>
|
|||
/// 商品配件id
|
|||
/// </summary>
|
|||
public string PurchaseSkuId { get; set; } |
|||
/// <summary>
|
|||
/// 合格证配置状态
|
|||
/// </summary>
|
|||
public bool IsNeedCer { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,101 @@ |
|||
using BBWYB.Client.Models.PackPurchaseTask; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace BBWYB.Client.Models.APIModel |
|||
{ |
|||
/// <summary>
|
|||
/// 配置打包信息数据
|
|||
/// </summary>
|
|||
public class ConfigPackResponse |
|||
{ |
|||
/// <summary>
|
|||
/// 货号品名
|
|||
/// </summary>
|
|||
public string BrandName { get; set; } |
|||
/// <summary>
|
|||
/// 组合类型(单件=0,多件=1)
|
|||
/// </summary>
|
|||
public int PackType { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 基础包装(快递袋=0,纸箱=1,麻袋=2)
|
|||
/// </summary>
|
|||
public int BasicPack { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 增量耗材
|
|||
/// </summary>
|
|||
public string Increment1 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 合格证位置(外部包装=0,产品包装=1)
|
|||
/// </summary>
|
|||
public int? CertificatePosition { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// sku配件商品名称
|
|||
/// </summary>
|
|||
public string SkuGoodsTitle { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 配件数量
|
|||
/// </summary>
|
|||
public int GoodsNumber { get; set; } |
|||
/// <summary>
|
|||
/// 是否需要条形码
|
|||
/// </summary>
|
|||
public bool? NeedBar { get; set; } |
|||
/// <summary>
|
|||
/// 是否需要合格证
|
|||
/// </summary>
|
|||
public bool? NeedCer { get; set; } |
|||
/// <summary>
|
|||
/// 配件列表
|
|||
/// </summary>
|
|||
public PurchaseSku[] PurchaseSkus { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 条形码
|
|||
/// </summary>
|
|||
public BarCodeModel BarCode { get; set; } |
|||
|
|||
public PackConfig PackConfig { get; set; } |
|||
} |
|||
/// <summary>
|
|||
/// 配件sku
|
|||
/// </summary>
|
|||
public class PurchaseSku |
|||
{ |
|||
/// <summary>
|
|||
/// 配件图
|
|||
/// </summary>
|
|||
public string Logo { get; set; } |
|||
/// <summary>
|
|||
/// 配件商品Id
|
|||
/// </summary>
|
|||
public string PurchaseSkuId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 配件商品spuId
|
|||
/// </summary>
|
|||
public string PurchaseProductId { get; set; } |
|||
/// <summary>
|
|||
/// 配件名称
|
|||
/// </summary>
|
|||
public string Title { get; set; } |
|||
/// <summary>
|
|||
/// 是否需要配置合格证
|
|||
/// </summary>
|
|||
public bool IsNeedCer { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 合格证配置信息
|
|||
/// </summary>
|
|||
public CertificateModel CerDTO { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,136 @@ |
|||
using BBWYB.Client.Models.PackPurchaseTask; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace BBWYB.Client.Models.APIModel |
|||
{ |
|||
public class ProductSkuResponse |
|||
{ |
|||
/// <summary>
|
|||
/// skuId
|
|||
/// </summary>
|
|||
public string Id { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 图片链接
|
|||
/// </summary>
|
|||
public string Logo { get; set; } |
|||
/// <summary>
|
|||
/// SKU标题
|
|||
/// </summary>
|
|||
public string Title { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 品名
|
|||
/// </summary>
|
|||
public string BrandName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 商品id
|
|||
/// </summary>
|
|||
public long ShopId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 货号
|
|||
/// </summary>
|
|||
public string ProductItemNum { get; set; } |
|||
/// <summary>
|
|||
/// spuId
|
|||
/// </summary>
|
|||
public string ProductId { get; set; } |
|||
|
|||
|
|||
public PackConfig PackConfig { get; set; } |
|||
|
|||
|
|||
public BarCodeModel BarCodeModel { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 合格证信息
|
|||
/// </summary>
|
|||
public CertificateModel[] Cers { get; set; } |
|||
/// <summary>
|
|||
/// 合格证信息
|
|||
/// </summary>
|
|||
public CertificateModel SpuCertificate { get; set; } |
|||
|
|||
} |
|||
public class PackConfig |
|||
{ |
|||
|
|||
|
|||
/// <summary>
|
|||
/// skuid
|
|||
/// </summary>
|
|||
[Key] |
|||
public string SkuId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 货号品名(手写上传)
|
|||
/// </summary>
|
|||
public string BrandName { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 组合类型(单件=0,多件=1)
|
|||
/// </summary>
|
|||
public int PackType { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 基础包装(快递袋=0,纸箱=1,麻袋=2)
|
|||
/// </summary>
|
|||
public int BasicPack { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 增量1()
|
|||
/// </summary>
|
|||
public string Increment1 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 条形码id
|
|||
/// </summary>
|
|||
public long? BarcodeId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 合格证
|
|||
/// </summary>
|
|||
public string CertificateId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 合格证位置(外部包装=0,产品包装=1)
|
|||
/// </summary>
|
|||
public int? CertificatePosition { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// sku配件名称
|
|||
/// </summary>
|
|||
public string SkuGoodsTitle { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 配件数
|
|||
/// </summary>
|
|||
public int GoodsNumber { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 注意事项(对接备注)
|
|||
/// </summary>
|
|||
public string MarkMessage { get; set; } |
|||
/// <summary>
|
|||
/// 到货情况(待收货=2,部分收货=1,已到货=0)
|
|||
/// </summary>
|
|||
public int Availability { get; set; } |
|||
|
|||
|
|||
public bool NeedBar { get; set; } |
|||
|
|||
public bool NeedCer { get; set; } |
|||
} |
|||
|
|||
} |
@ -0,0 +1,59 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace BBWYB.Client.Models.APIModel |
|||
{ |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 采购Sku基础信息对象
|
|||
/// </summary>
|
|||
public class PurchaseSkuBasicInfoResponse |
|||
{ |
|||
/// <summary>
|
|||
/// 采购SKU基础信息列表
|
|||
/// </summary>
|
|||
public IList<PurchaseSkuItemBasicInfoResponse> ItemList { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购商
|
|||
/// </summary>
|
|||
public Purchaser Purchaser { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 采购Sku基础信息对象
|
|||
/// </summary>
|
|||
public class PurchaseSkuItemBasicInfoResponse |
|||
{ |
|||
/// <summary>
|
|||
/// 采购SPU
|
|||
/// </summary>
|
|||
public string PurchaseProductId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购SKU
|
|||
/// </summary>
|
|||
public string PurchaseSkuId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购SPEC 1688独有属性 下单需要
|
|||
/// </summary>
|
|||
public string PurchaseSkuSpecId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// SKU标题
|
|||
/// </summary>
|
|||
public string Title { get; set; } |
|||
|
|||
public string Logo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 单价
|
|||
/// </summary>
|
|||
public decimal Price { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,70 @@ |
|||
using CommunityToolkit.Mvvm.ComponentModel; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace BBWYB.Client.Models.PackPurchaseTask |
|||
{ |
|||
/// <summary>
|
|||
/// 条形码
|
|||
/// </summary>
|
|||
public class BarCodeModel : ObservableObject |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 条形码id
|
|||
/// </summary>
|
|||
public long Id { get; set; } |
|||
|
|||
|
|||
private string brand; |
|||
/// <summary>
|
|||
/// 品牌
|
|||
/// </summary>
|
|||
public string Brand { get => brand; set { SetProperty(ref brand, value); } } |
|||
|
|||
private string brandName; |
|||
/// <summary>
|
|||
/// 品名
|
|||
/// </summary>
|
|||
public string BrandName { get => brandName; set { SetProperty(ref brandName, value); } } |
|||
|
|||
|
|||
private string producNo; |
|||
/// <summary>
|
|||
/// 货号
|
|||
/// </summary>
|
|||
public string ProductNo { get => producNo; set { SetProperty(ref producNo, value); } } |
|||
|
|||
private string skuName; |
|||
/// <summary>
|
|||
/// sku名称
|
|||
/// </summary>
|
|||
public string SkuName { get => skuName; set { SetProperty(ref skuName, value); } } |
|||
|
|||
|
|||
private string skuId; |
|||
/// <summary>
|
|||
/// skuId(条形码号=POP+SkuId)
|
|||
/// </summary>
|
|||
public string SkuId { get => skuId; set { SetProperty(ref skuId, value); } } |
|||
|
|||
|
|||
private string modelNo; |
|||
/// <summary>
|
|||
/// 型号
|
|||
/// </summary>
|
|||
public string ModelNo { get => modelNo; set { SetProperty(ref modelNo, value); } } |
|||
|
|||
|
|||
|
|||
|
|||
private BarcodeLabelModel labelModel = BarcodeLabelModel.精简模板; |
|||
/// <summary>
|
|||
/// 模板标签
|
|||
/// </summary>
|
|||
public BarcodeLabelModel LabelModel { get => labelModel; set { SetProperty (ref labelModel, value); } } |
|||
} |
|||
} |
@ -0,0 +1,162 @@ |
|||
using CommunityToolkit.Mvvm.ComponentModel; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace BBWYB.Client.Models.PackPurchaseTask |
|||
{ |
|||
/// <summary>
|
|||
/// 合格证
|
|||
/// </summary>
|
|||
public class CertificateModel : ObservableObject |
|||
{ |
|||
/// <summary>
|
|||
/// 合格证id
|
|||
/// </summary>
|
|||
public long Id { get; set; } |
|||
|
|||
public string PurchaseSkuId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// skuid
|
|||
/// </summary>
|
|||
public string SkuId { get; set; } |
|||
|
|||
|
|||
private string spuId; |
|||
/// <summary>
|
|||
/// 品牌
|
|||
/// </summary>
|
|||
public string SpuId { get => spuId; set { SetProperty (ref spuId, value); } } |
|||
|
|||
|
|||
private string brand; |
|||
/// <summary>
|
|||
/// 品牌
|
|||
/// </summary>
|
|||
public string Brand { get => brand; set { SetProperty(ref brand, value); } } |
|||
|
|||
|
|||
private string brandName; |
|||
/// <summary>
|
|||
/// 品名
|
|||
/// </summary>
|
|||
public string BrandName { get => brandName; set { SetProperty(ref brandName, value); } } |
|||
|
|||
private string shader; |
|||
/// <summary>
|
|||
/// 材质
|
|||
/// </summary>
|
|||
public string Shader { get => shader; set { SetProperty(ref shader, value); } } |
|||
|
|||
private string excuteStander; |
|||
/// <summary>
|
|||
/// 执行标准
|
|||
/// </summary>
|
|||
public string ExcuteStander |
|||
{ |
|||
get => excuteStander; set |
|||
{ |
|||
SetProperty(ref excuteStander, value); |
|||
GetExcuteStanderFormat(); |
|||
} |
|||
} |
|||
|
|||
|
|||
private string excuteStanderFormat; |
|||
/// <summary>
|
|||
/// 执行标准 (,=>换行)
|
|||
/// </summary>
|
|||
public string ExcuteStanderFormat { get => excuteStanderFormat; set { SetProperty(ref excuteStanderFormat, value); } } |
|||
|
|||
private string productShop; |
|||
/// <summary>
|
|||
/// 生产商
|
|||
/// </summary>
|
|||
public string ProductShop { get => productShop; set { SetProperty(ref productShop, value); } } |
|||
|
|||
private string productAdress; |
|||
/// <summary>
|
|||
/// 地址
|
|||
/// </summary>
|
|||
public string ProductAdress { get => productAdress; set { SetProperty(ref productAdress, value); } } |
|||
|
|||
private string productNo; |
|||
/// <summary>
|
|||
/// 型号(货号)
|
|||
/// </summary>
|
|||
public string ProductNo { get => productNo; set { SetProperty(ref productNo, value); } } |
|||
|
|||
///// <summary>
|
|||
///// 生产日期
|
|||
///// </summary>
|
|||
//public DateTime ProductDate { get; set; }
|
|||
|
|||
/// <summary>
|
|||
/// 经销商
|
|||
/// </summary>
|
|||
public string Reseller { get; set; } |
|||
|
|||
private int isLogo; |
|||
/// <summary>
|
|||
/// 是否含3cLogo(0没有 ,1有)
|
|||
/// </summary>
|
|||
public int IsLogo { get => isLogo; set { SetProperty(ref isLogo, value); } } |
|||
|
|||
private string factoryNumber; |
|||
/// <summary>
|
|||
/// 工厂编号
|
|||
/// </summary>
|
|||
public string FactoryNumber { get => factoryNumber; set { SetProperty(ref factoryNumber, value); } } |
|||
private string applyAge; |
|||
/// <summary>
|
|||
/// 适用年龄
|
|||
/// </summary>
|
|||
public string ApplyAge { get => applyAge; set { SetProperty(ref applyAge, value); } } |
|||
|
|||
|
|||
private CertificateLabelModel labelModel; |
|||
public CertificateLabelModel LabelModel { get => labelModel; set { SetProperty(ref labelModel, value); } } |
|||
|
|||
void GetExcuteStanderFormat() |
|||
{ |
|||
StringBuilder sb = new StringBuilder(); |
|||
if (!string.IsNullOrEmpty(ExcuteStander)) |
|||
if (this.ExcuteStander.Contains(",") || this.ExcuteStander.Contains(","))//有逗号就拆分
|
|||
{ |
|||
var excutes = this.ExcuteStander.Split(new string[] { ",", "," }, StringSplitOptions.RemoveEmptyEntries); |
|||
for (int i = 0; i < excutes.Length; i++) |
|||
{ |
|||
if (i % 2 == 0 && i > 0)//间隔两个换行
|
|||
{ |
|||
sb.Append("\r\n"); |
|||
} |
|||
sb.Append(excutes[i]).Append(" "); |
|||
} |
|||
sb.Remove(sb.Length - 3, 3); |
|||
this.ExcuteStanderFormat = sb.ToString(); |
|||
return; |
|||
} |
|||
this.ExcuteStanderFormat = ExcuteStander; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
private int goodsNumber = 1; |
|||
/// <summary>
|
|||
/// 配件序号
|
|||
/// </summary>
|
|||
public int GoodsNumber { get => goodsNumber; set { SetProperty(ref goodsNumber, value); } } |
|||
|
|||
private string produceDate; |
|||
/// <summary>
|
|||
/// 生产日期
|
|||
/// </summary>
|
|||
public string ProduceDate { get => produceDate; set { SetProperty(ref produceDate, value); } } |
|||
|
|||
} |
|||
} |
@ -0,0 +1,23 @@ |
|||
using CommunityToolkit.Mvvm.ComponentModel; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace BBWYB.Client.Models |
|||
{ |
|||
public class IncreateModel : ObservableObject |
|||
{ |
|||
private string increateName; |
|||
public string IncreateName { get => increateName; set { SetProperty(ref increateName, value); } } |
|||
private bool isSelected; |
|||
public bool IsSelected { get => isSelected; set { SetProperty(ref isSelected, value); } } |
|||
|
|||
public override string ToString() |
|||
{ |
|||
return IncreateName; |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,68 @@ |
|||
using CommunityToolkit.Mvvm.ComponentModel; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace BBWYB.Client.Models.PackPurchaseTask |
|||
{ |
|||
/// <summary>
|
|||
/// 配件sku
|
|||
/// </summary>
|
|||
public class PurchaseSku:ObservableObject |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 配件图
|
|||
/// </summary>
|
|||
private string logo; |
|||
/// <summary>
|
|||
/// 配件商品Id
|
|||
/// </summary>
|
|||
private string purchaseSkuId; |
|||
/// <summary>
|
|||
/// 配件名称
|
|||
/// </summary>
|
|||
private string title; |
|||
/// <summary>
|
|||
/// 是否需要配置合格证
|
|||
/// </summary>
|
|||
private bool isNeedCer; |
|||
/// <summary>
|
|||
/// 配件图
|
|||
/// </summary>
|
|||
public string Logo { get=>logo; set { SetProperty(ref logo, value); } } |
|||
/// <summary>
|
|||
/// 配件商品Id
|
|||
/// </summary>
|
|||
public string PurchaseSkuId { get => purchaseSkuId; set { SetProperty(ref purchaseSkuId, value); } } |
|||
/// <summary>
|
|||
/// 配件名称
|
|||
/// </summary>
|
|||
public string Title { get => title; set { SetProperty(ref title, value); } } |
|||
/// <summary>
|
|||
/// 是否需要配置合格证
|
|||
/// </summary>
|
|||
public bool IsNeedCer { get => isNeedCer; set { SetProperty(ref isNeedCer, value); } } |
|||
/// <summary>
|
|||
/// 合格证配置信息
|
|||
/// </summary>
|
|||
public CertificateModel CerDTO { get ; set ; } |
|||
|
|||
private bool isSetCertificate; |
|||
/// <summary>
|
|||
/// 设置显示(合格证)
|
|||
/// </summary>
|
|||
public bool IsSetCertificate |
|||
{ |
|||
get => isSetCertificate; set |
|||
{ |
|||
|
|||
SetProperty(ref isSetCertificate, value); |
|||
//IsNeedCertificateModel = IsSetCertificate ? Need.不需要 : Need.需要;
|
|||
} |
|||
} |
|||
|
|||
} |
|||
} |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 2.8 KiB |
@ -0,0 +1,753 @@ |
|||
using BBWYB.Client.APIServices; |
|||
using BBWYB.Client.Models; |
|||
using BBWYB.Common.Models; |
|||
using CommunityToolkit.Mvvm.Input; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.Linq; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using System.Windows.Input; |
|||
using System.Windows; |
|||
using BBWYB.Client.Models.PackPurchaseTask; |
|||
using BBWYB.Client.Views.PackPurchaseTask; |
|||
using BBWYB.Client.Models.APIModel; |
|||
|
|||
namespace BBWYB.Client.ViewModels |
|||
{ |
|||
public class UpdatePurchaseTaskViewModel : BaseVM, IDenpendency |
|||
{ |
|||
|
|||
#region 属性
|
|||
|
|||
private ObservableCollection<Models.PackPurchaseTask.PurchaseSku> purchaseSkuList; |
|||
public ObservableCollection<Models.PackPurchaseTask.PurchaseSku> PurchaseSkuList { get => purchaseSkuList; set { SetProperty(ref purchaseSkuList, value); } } |
|||
|
|||
private string searchSkuId; |
|||
public string SearchSkuId { get => searchSkuId; set { SetProperty(ref searchSkuId, value); } } |
|||
|
|||
// public long TaskId { get; set; }
|
|||
//private bool isSelected;
|
|||
//public bool IsSelected { get => isSelected; set { Set(ref isSelected, value); } }
|
|||
|
|||
private ObservableCollection<string> worryList = new ObservableCollection<string> { |
|||
"否","是" |
|||
}; |
|||
public ObservableCollection<string> WorryList { get => worryList; set { SetProperty(ref worryList, value); } } |
|||
|
|||
private ObservableCollection<string> positionTypeList = new ObservableCollection<string> { |
|||
"商家仓","齐越仓", "京东仓","聚水潭仓"}; |
|||
public ObservableCollection<string> PositionTypeList { get => positionTypeList; set { SetProperty(ref positionTypeList, value); } } |
|||
|
|||
private ObservableCollection<string> packTypeList = new ObservableCollection<string> { |
|||
"单件","多件" |
|||
}; |
|||
public ObservableCollection<string> PackTypeList { get => packTypeList; set { SetProperty(ref packTypeList, value); } } |
|||
|
|||
private ObservableCollection<string> basicPackList = new ObservableCollection<string> { |
|||
"快递袋","纸箱","麻袋" |
|||
}; |
|||
public ObservableCollection<string> BasicPackList { get => basicPackList; set { SetProperty(ref basicPackList, value); } } |
|||
|
|||
private ObservableCollection<string> isNeedBarCodeList = new ObservableCollection<string> { |
|||
"需要", "不需要" }; |
|||
public ObservableCollection<string> IsNeedBarCodeList { get => isNeedBarCodeList; set { SetProperty(ref isNeedBarCodeList, value); } } |
|||
|
|||
private ObservableCollection<string> isNeedCerList = new ObservableCollection<string> { |
|||
"需要", "不需要" }; |
|||
public ObservableCollection<string> IsNeedCerList { get => isNeedCerList; set { SetProperty(ref isNeedCerList, value); } } |
|||
|
|||
|
|||
private ObservableCollection<string> certificatePositionList = new ObservableCollection<string> { |
|||
"无","外部包装","产品包装" |
|||
}; |
|||
public ObservableCollection<string> CertificatePositionList { get => certificatePositionList; set { SetProperty(ref certificatePositionList, value); } } |
|||
|
|||
private ObservableCollection<string> availabilityList = new ObservableCollection<string> { |
|||
"已到货","部分到货","未到货" |
|||
}; |
|||
public ObservableCollection<string> AvailabilityList { get => availabilityList; set { SetProperty(ref availabilityList, value); } } |
|||
|
|||
private int skuCount; |
|||
/// <summary>
|
|||
/// Sku任务数
|
|||
/// </summary>
|
|||
public int SkuCount { get => skuCount; set { SetProperty(ref skuCount, value); } } |
|||
|
|||
private string skuId; |
|||
/// <summary>
|
|||
/// Sku
|
|||
/// </summary>
|
|||
public string SkuId { get => skuId; set { SetProperty(ref skuId, value); } } |
|||
|
|||
|
|||
|
|||
public string OrderId { get; set; } |
|||
|
|||
private string logo; |
|||
/// <summary>
|
|||
/// 店铺Sku图链接
|
|||
/// </summary>
|
|||
public string Logo { get => logo; set { SetProperty(ref logo, value); } } |
|||
|
|||
private string skuName; |
|||
/// <summary>
|
|||
/// 采购Sku名称
|
|||
/// </summary>
|
|||
public string SkuName { get => skuName; set { SetProperty(ref skuName, value); } } |
|||
|
|||
private string brand; |
|||
/// <summary>
|
|||
/// 品牌
|
|||
/// </summary>
|
|||
public string Brand { get => brand; set { SetProperty(ref brand, value); } } |
|||
|
|||
|
|||
private string productNo; |
|||
/// <summary>
|
|||
/// 货号
|
|||
/// </summary>
|
|||
public string ProductNo { get => productNo; set { SetProperty(ref productNo, value); } } |
|||
|
|||
private string brandName; |
|||
/// <summary>
|
|||
/// 品名(手写上传)
|
|||
/// </summary>
|
|||
public string BrandName { get => brandName; set { SetProperty(ref brandName, value); } } |
|||
|
|||
|
|||
private int goodsNumber; |
|||
/// <summary>
|
|||
/// 配件数
|
|||
/// </summary>
|
|||
public int GoodsNumber { get => goodsNumber; set { SetProperty(ref goodsNumber, value); } } |
|||
private Worry isWorry; |
|||
/// <summary>
|
|||
/// 是否加急
|
|||
/// </summary>
|
|||
public Worry IsWorry { get => isWorry; set { SetProperty(ref isWorry, value); } } |
|||
|
|||
private TaskState availability; |
|||
/// <summary>
|
|||
/// 到货情况(待收货=0,部分收货=1,已到货=2)
|
|||
/// </summary>
|
|||
public TaskState Availability { get => availability; set { SetProperty(ref availability, value); } } |
|||
|
|||
private PackType packType; |
|||
/// <summary>
|
|||
/// 打包类型(单件=0,多件=1)
|
|||
/// </summary>
|
|||
public PackType PackType { get => packType; set { SetProperty(ref packType, value); } } |
|||
|
|||
private BasicPack basicPack; |
|||
/// <summary>
|
|||
/// 基础包装(快递袋=0,纸箱=1,麻袋=2)
|
|||
/// </summary>
|
|||
public BasicPack BasicPack { get => basicPack; set { SetProperty(ref basicPack, value); } } |
|||
|
|||
private PositionType positionType; |
|||
/// <summary>
|
|||
/// 落仓(商家仓=0,齐越仓=1,京东仓=2,聚水潭仓=3)
|
|||
/// </summary>
|
|||
public PositionType PositionType { get => positionType; set { SetProperty(ref positionType, value); } } |
|||
|
|||
private string skuTitle; |
|||
/// <summary>
|
|||
/// sku配件商品名称
|
|||
/// </summary>
|
|||
public string SkuTitle { get => skuTitle; set { SetProperty(ref skuTitle, value); } } |
|||
|
|||
private Need isNeedBarCode; |
|||
/// <summary>
|
|||
/// 是否需要合格证
|
|||
/// </summary>
|
|||
public Need IsNeedBarCode { get => isNeedBarCode; set { SetProperty(ref isNeedBarCode, value); } } |
|||
|
|||
|
|||
private Need isNeedCertificateModel; |
|||
/// <summary>
|
|||
/// 是否需要条形码
|
|||
/// </summary>
|
|||
public Need IsNeedCertificateModel { get => isNeedCertificateModel; set { SetProperty(ref isNeedCertificateModel, value); } } |
|||
|
|||
|
|||
private BarCodeModel barCodeModel; |
|||
/// <summary>
|
|||
/// 条形码
|
|||
/// </summary>
|
|||
public BarCodeModel BarCodeModel { get => barCodeModel; set { SetProperty(ref barCodeModel, value); } } |
|||
|
|||
|
|||
private bool isSetBarCode; |
|||
/// <summary>
|
|||
/// 设置显示(条形码)
|
|||
/// </summary>
|
|||
public bool IsSetBarCode |
|||
{ |
|||
get => isSetBarCode; |
|||
set |
|||
{ |
|||
|
|||
SetProperty(ref isSetBarCode, value); |
|||
// IsNeedBarCode = IsSetBarCode ? Need.不需要 : Need.需要;
|
|||
} |
|||
} |
|||
|
|||
private bool isSetCertificate; |
|||
/// <summary>
|
|||
/// 设置显示(合格证)
|
|||
/// </summary>
|
|||
public bool IsSetCertificate |
|||
{ |
|||
get => isSetCertificate; set |
|||
{ |
|||
|
|||
SetProperty(ref isSetCertificate, value); |
|||
//IsNeedCertificateModel = IsSetCertificate ? Need.不需要 : Need.需要;
|
|||
} |
|||
} |
|||
private string setSpuCerStatus; |
|||
|
|||
public string SetSpuCerStatus { get => setSpuCerStatus; set { SetProperty(ref setSpuCerStatus, value); } } |
|||
private bool isSetSpuCertificate = true; |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 设置spu显示(合格证)
|
|||
/// </summary>
|
|||
public bool IsSetSpuCertificate |
|||
{ |
|||
get => isSetSpuCertificate; set |
|||
{ |
|||
|
|||
SetProperty(ref isSetSpuCertificate, value); |
|||
SetSpuCerStatus = IsSetSpuCertificate ? "设置spu模板" : "修改spu模板"; |
|||
} |
|||
} |
|||
|
|||
|
|||
private string saveTask; |
|||
|
|||
/// <summary>
|
|||
/// 设置显示(合格证)
|
|||
/// </summary>
|
|||
public string SaveTask { get => saveTask; set { SetProperty(ref saveTask, value); } } |
|||
|
|||
|
|||
private string spuId; |
|||
/// <summary>
|
|||
/// 合格证
|
|||
/// </summary>
|
|||
public string SpuId { get => spuId; set { SetProperty(ref spuId, value); } } |
|||
|
|||
private CertificateModel spuCertificateModel; |
|||
/// <summary>
|
|||
/// spu合格证
|
|||
/// </summary>
|
|||
public CertificateModel SpuCertificateModel { get => spuCertificateModel; set { SetProperty(ref spuCertificateModel, value); } } |
|||
|
|||
|
|||
|
|||
private CertificateModel certificateModel; |
|||
/// <summary>
|
|||
/// 合格证
|
|||
/// </summary>
|
|||
public CertificateModel CertificateModel { get => certificateModel; set { SetProperty(ref certificateModel, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 合格证位置(外部包装=0,产品包装=1)
|
|||
/// </summary>
|
|||
private CertificatePosition certificatePosition; |
|||
/// <summary>
|
|||
/// 合格证位置(外部包装=0,产品包装=1)
|
|||
/// </summary>
|
|||
public CertificatePosition CertificatePosition { get => certificatePosition; set { SetProperty(ref certificatePosition, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 注意事项(对接备注)
|
|||
/// </summary>
|
|||
private string markMessage; |
|||
/// <summary>
|
|||
/// 注意事项(对接备注)
|
|||
/// </summary>
|
|||
public string MarkMessage { get => markMessage; set { SetProperty(ref markMessage, value); } } |
|||
|
|||
|
|||
private ObservableCollection<IncreateModel> increateList; |
|||
/// <summary>
|
|||
/// 增量耗材查询关键字
|
|||
/// </summary>
|
|||
public ObservableCollection<IncreateModel> IncreateList { get => increateList; set { SetProperty(ref increateList, value); } } |
|||
string[] increates = new string[] { "气泡纸", "气泡袋", "POP袋", "折纸箱", "气泡纸封边", "彩盒", "剪胶", "剪彩带", "快递袋", "收纳盒", "纸箱子", "装纸箱", "封边", "胶带", "折彩盒" }; |
|||
|
|||
PackPurchaseTaskService packPurchaseTaskService; |
|||
|
|||
ProductService productService; |
|||
GlobalContext globalContext; |
|||
private bool isLoading = false; |
|||
public bool IsLoading { get => isLoading; set { SetProperty(ref isLoading, value); } } |
|||
#endregion
|
|||
|
|||
public UpdatePurchaseTaskViewModel(ProductService productService, GlobalContext globalContext, PackPurchaseTaskService packPurchaseTaskService, PurchaseService purchaseService) |
|||
{ |
|||
this.packPurchaseTaskService = packPurchaseTaskService; |
|||
this.productService = productService; |
|||
this.globalContext = globalContext; |
|||
CreateTaskCommand = new RelayCommand<object>(CreateTask); |
|||
OpenSkuDetailCommand = new RelayCommand<object>(OpenSkuDetail); |
|||
SetBarCodeCommand = new RelayCommand(SetBarCode); |
|||
SetCertificateCommand = new RelayCommand<Models.PackPurchaseTask.PurchaseSku>(SetCertificate); |
|||
LookBarCommand = new RelayCommand(LookBar); |
|||
LookCerCommand = new RelayCommand<string>(LookCer); |
|||
SearchSkuCommand = new RelayCommand<object>(SearchSku); |
|||
IncreateList = new ObservableCollection<IncreateModel>(); |
|||
foreach (var item in increates) |
|||
{ |
|||
IncreateList.Add(new IncreateModel |
|||
{ |
|||
IncreateName = item, |
|||
IsSelected = false |
|||
}); |
|||
} |
|||
|
|||
this.purchaseService = purchaseService; |
|||
#if DEBUG
|
|||
|
|||
//Test();
|
|||
#endif
|
|||
} |
|||
PurchaseService purchaseService; |
|||
public string OriginShopName { get; set; } |
|||
public string SkuPurchaseSchemeId { get; set; } |
|||
public Platform Platform { get; set; } |
|||
public string ShopId { get; set; } |
|||
|
|||
public string UserName { get; set; } |
|||
public void Test(Order order) |
|||
{ |
|||
SearchSku(order); |
|||
|
|||
|
|||
} |
|||
|
|||
#region 方法
|
|||
public ICommand SetBarCodeCommand { get; set; } |
|||
public ICommand SetCertificateCommand { get; set; } |
|||
public ICommand LookBarCommand { get; set; } |
|||
public ICommand LookCerCommand { get; set; } |
|||
|
|||
public ICommand OpenSkuDetailCommand { get; set; } |
|||
public ICommand CreateTaskCommand { get; set; } |
|||
|
|||
public ICommand SearchSkuCommand { get; set; } |
|||
|
|||
private void SetBarCode() |
|||
{ |
|||
if (string.IsNullOrEmpty(SkuId)) |
|||
{ |
|||
return; |
|||
} |
|||
//if (TaskId > 0 && string.IsNullOrEmpty(SpuId))//修改界面刷新配置数据
|
|||
//{
|
|||
// SearchSku(SkuId);
|
|||
//}
|
|||
|
|||
if (BarCodeModel == null) |
|||
{ |
|||
BarCodeModel = new BarCodeModel(); |
|||
BarCodeModel.ProductNo = ProductNo; |
|||
BarCodeModel.Brand = Brand; |
|||
BarCodeModel.SkuId = SkuId; |
|||
BarCodeModel.SkuName = SkuName; |
|||
} |
|||
if (!string.IsNullOrEmpty(BrandName)) |
|||
BarCodeModel.BrandName = BrandName; |
|||
|
|||
SetBarCodeWindow setBarCodeWindow = new SetBarCodeWindow(); |
|||
setBarCodeWindow.LoadData(BarCodeModel, packPurchaseTaskService); |
|||
setBarCodeWindow.SaveResult = b => |
|||
{ |
|||
BarCodeModel = b; |
|||
IsSetBarCode = false; |
|||
IsNeedBarCode = Need.需要; |
|||
}; |
|||
setBarCodeWindow.Show(); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 设置合格证
|
|||
/// </summary>
|
|||
private void SetCertificate(Models.PackPurchaseTask.PurchaseSku model) |
|||
{ |
|||
|
|||
if (model.CerDTO == null) |
|||
{ |
|||
model.CerDTO = new CertificateModel{ |
|||
ProductNo = ProductNo, |
|||
Brand = Brand, |
|||
SkuId = SkuId, |
|||
PurchaseSkuId =model.PurchaseSkuId |
|||
|
|||
}; |
|||
} |
|||
if (!string.IsNullOrEmpty(BrandName)) |
|||
model.CerDTO.BrandName = BrandName; |
|||
|
|||
SetCerWindow setCerWindow = new SetCerWindow(); |
|||
setCerWindow.LoadData(model.IsNeedCer,model.CerDTO, packPurchaseTaskService, spuCertificateModel, IsSetSpuCertificate); |
|||
setCerWindow.SaveResult = (s, PackCerState) => |
|||
{ |
|||
var skus = PurchaseSkuList.SingleOrDefault(p => p.PurchaseSkuId == s.PurchaseSkuId); |
|||
skus.CerDTO = s; |
|||
skus.IsSetCertificate =false; |
|||
skus.IsNeedCer = PackCerState == PackCerState.合格证信息; |
|||
IsNeedCertificateModel = Need.需要; |
|||
}; |
|||
setCerWindow.Show(); |
|||
} |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 查看合格证
|
|||
/// </summary>
|
|||
private void LookCer(string id) |
|||
{ |
|||
LookCerWindow lookCerWindow = new LookCerWindow(PurchaseSkuList.SingleOrDefault(p => p.PurchaseSkuId == id).CerDTO); |
|||
lookCerWindow.Show(); |
|||
} |
|||
/// <summary>
|
|||
/// 查看条形码
|
|||
/// </summary>
|
|||
private void LookBar() |
|||
{ |
|||
LookBarCodeWindow look = new LookBarCodeWindow(); |
|||
look.SetData(BarCodeModel); |
|||
look.Show(); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 搜索 skuId(todo:)
|
|||
/// </summary>
|
|||
public void SearchSku(object obj) |
|||
{ |
|||
|
|||
Order order = (Order)obj; |
|||
|
|||
SkuId = order.SourceSku; |
|||
OrderId = order.Id; |
|||
SkuPurchaseSchemeId = "416647656341573"; |
|||
OriginShopName = order.SourceShopName; |
|||
//string PurchaseProductId = "687352811674";
|
|||
Platform = order.Platform; |
|||
ShopId = "11"; |
|||
UserName = order.BuyerAccount; |
|||
var shopList = globalContext.User.ShopList; |
|||
var shop = shopList.SingleOrDefault(s => s.ShopName == OriginShopName); |
|||
Logo = order.ItemList[0].Logo; |
|||
SkuName = order.ItemList[0].Title; |
|||
if (string.IsNullOrEmpty(SkuId)) |
|||
return; |
|||
|
|||
ApiResponse<ProductListResponse> productApiResponse = null; |
|||
var skuResponse = productService.GetProductSkuList(string.Empty, SkuId, shop.Platform, shop.AppKey, shop.AppSecret, shop.AppToken); |
|||
if (skuResponse.Success) |
|||
{ |
|||
if (skuResponse.Data.Count() == 0) |
|||
{ |
|||
return; |
|||
} |
|||
Logo = skuResponse.Data[0].Logo.Replace("80x80", "200x200"); |
|||
SkuName = skuResponse.Data[0].Title; |
|||
|
|||
SpuId = skuResponse.Data[0].ProductId; |
|||
|
|||
productApiResponse = productService.GetProductList(skuResponse.Data[0].ProductId, string.Empty, string.Empty, 1, |
|||
shop.Platform, shop.AppKey, shop.AppSecret, shop.AppToken); |
|||
|
|||
if (productApiResponse.Success) |
|||
{ |
|||
if (productApiResponse.Data.Count == 0) |
|||
{ |
|||
|
|||
return; |
|||
} |
|||
|
|||
ProductNo = productApiResponse.Data.Items[0].ProductItemNum; |
|||
Brand = productApiResponse.Data.Items[0].BrandName; |
|||
|
|||
} |
|||
var productSku = packPurchaseTaskService.GetConfigPack(SkuId, SkuPurchaseSchemeId); |
|||
if (productSku == null || !productSku.Success || productSku.Data == null) |
|||
return; |
|||
BrandName = productSku.Data.BrandName; |
|||
|
|||
BarCodeModel = productSku.Data.BarCode; |
|||
if (BarCodeModel == null) |
|||
{ |
|||
BarCodeModel = new BarCodeModel(); |
|||
|
|||
} |
|||
if (!string.IsNullOrEmpty(Brand)) |
|||
BarCodeModel.Brand = Brand; |
|||
if (!string.IsNullOrEmpty(BrandName)) |
|||
BarCodeModel.BrandName = BrandName; |
|||
BarCodeModel.ProductNo = ProductNo; |
|||
BarCodeModel.SkuId = SkuId; |
|||
BarCodeModel.SkuName = SkuName; |
|||
PurchaseSkuList = new ObservableCollection<Models.PackPurchaseTask.PurchaseSku>(); |
|||
foreach (var item in productSku.Data.PurchaseSkus) |
|||
{ |
|||
var list = purchaseService.GetPurchaseSkuBasicInfo(item.PurchaseProductId); |
|||
if (list == null) continue; |
|||
var skuItem = list.Data.ItemList.FirstOrDefault(f => f.PurchaseSkuId == item.PurchaseSkuId); |
|||
App.Current.Dispatcher.Invoke(new Action(() => { |
|||
PurchaseSkuList.Add(new Models.PackPurchaseTask.PurchaseSku { |
|||
Logo=skuItem.Logo, |
|||
Title=skuItem.Title, |
|||
IsNeedCer=item.IsNeedCer, |
|||
PurchaseSkuId=item.PurchaseSkuId, |
|||
CerDTO=item.CerDTO, |
|||
IsSetCertificate= item.CerDTO==null?true:false , |
|||
}); |
|||
})); |
|||
} |
|||
|
|||
IsNeedBarCode = Need.需要; |
|||
IsSetBarCode = true; |
|||
IsSetCertificate = true; |
|||
if (productSku.Data.PackConfig != null) |
|||
{ |
|||
var config = productSku.Data.PackConfig; |
|||
SkuTitle = config.SkuGoodsTitle; |
|||
brandName = config.BrandName; |
|||
GoodsNumber = config.GoodsNumber; |
|||
PackType = (PackType)config.PackType; |
|||
BasicPack = (BasicPack)config.BasicPack; |
|||
Availability = (TaskState)config.Availability; |
|||
MarkMessage = config.MarkMessage; |
|||
CertificatePosition = config.CertificatePosition == null ? CertificatePosition.无 : (CertificatePosition)config.CertificatePosition.Value; |
|||
// Increment1 = config.Increment1;
|
|||
string[] increateDatas = config.Increment1.Split(','); |
|||
IsNeedBarCode = config.NeedBar ? Need.需要 : Need.不需要; |
|||
IsNeedCertificateModel = config.NeedCer ? Need.需要 : Need.不需要; |
|||
|
|||
IsSetBarCode = !config.NeedBar; |
|||
IsSetCertificate = !config.NeedCer; |
|||
|
|||
bool isSelected = false; |
|||
foreach (var item in increates) |
|||
{ |
|||
isSelected = false; |
|||
if (increateDatas.Contains(item)) |
|||
{ |
|||
isSelected = true; |
|||
} |
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
IncreateList.Add(new IncreateModel |
|||
{ |
|||
IncreateName = item, |
|||
IsSelected = isSelected |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
} |
|||
} |
|||
else |
|||
{ |
|||
|
|||
App.Current.Dispatcher.Invoke(() => MessageBox.Show(skuResponse.Msg, "加载sku")); |
|||
return; |
|||
} |
|||
|
|||
//加载配置文件
|
|||
} |
|||
|
|||
//public void SearSpuCer()
|
|||
//{
|
|||
// if (string.IsNullOrEmpty(SpuId))
|
|||
// {
|
|||
// SearchSku(SkuId);
|
|||
// return;
|
|||
// }
|
|||
// SpuId = SpuId.Trim();//去掉空格 避免数据异常
|
|||
|
|||
|
|||
// var productSku = packPurchaseTaskService.GetSpuCer(SpuId);
|
|||
// if (productSku == null || !productSku.Success)
|
|||
// {
|
|||
// IsSetSpuCertificate = true;
|
|||
|
|||
// 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;
|
|||
|
|||
// }
|
|||
|
|||
|
|||
//}
|
|||
|
|||
public Action ReflashWindow { get; set; } |
|||
public void InitData() |
|||
{ |
|||
|
|||
//IncreateList = new ObservableCollection<IncreateModel>();
|
|||
//SpuId = string.Empty;
|
|||
|
|||
//SaveTask = "保存";
|
|||
//Logo = model.ItemList[0].Logo;
|
|||
//SearchSkuId = model.SkuId;
|
|||
//SkuId = model.SkuId;
|
|||
//SkuCount = model.SkuCount;
|
|||
//SkuName = model.ItemList[0].SkuName;
|
|||
//ProductNo = model.ItemList[0].GoodsNo;
|
|||
//Brand = model.Brand;
|
|||
//BrandName = model.ItemList[0].BrandName;
|
|||
//this.MarkMessage = model.MarkMessage;
|
|||
//IsSetBarCode = model.BarCodeModel != null ? false : true;
|
|||
//IsSetCertificate = model.CertificateModel != null ? false : true;
|
|||
//BarCodeModel = model.BarCodeModel;
|
|||
//CertificateModel = model.CertificateModel;
|
|||
//SkuTitle = model.SkuTitle;
|
|||
//GoodsNumber = model.GoodsNumber;
|
|||
//Availability = model.Availability;
|
|||
//IsWorry = model.IsWorry;
|
|||
//PositionType = model.PositionType;
|
|||
//PackType = model.PackType;
|
|||
//BasicPack = model.BasicPack;
|
|||
//IsNeedBarCode = model.BarCodeModel == null ? Need.不需要 : Need.需要;
|
|||
//IsNeedCertificateModel = model.CertificateModel == null ? Need.不需要 : Need.需要;
|
|||
//CertificatePosition = model.CertificatePosition;
|
|||
//TaskId = model.TaskId;
|
|||
//string[] increateDatas = model.Increment1.Split(',');
|
|||
|
|||
//bool isTrue = false;
|
|||
//foreach (var item in increates)
|
|||
//{
|
|||
// isTrue = false;
|
|||
// if (increateDatas.Contains(item))
|
|||
// {
|
|||
// isTrue = true;
|
|||
// }
|
|||
// App.Current.Dispatcher.Invoke(() =>
|
|||
// {
|
|||
// IncreateList.Add(new IncreateModel
|
|||
// {
|
|||
// IncreateName = item,
|
|||
// IsSelected = isTrue
|
|||
// });
|
|||
// });
|
|||
//}
|
|||
// SearchSku(SkuId);
|
|||
|
|||
} |
|||
private void OpenSkuDetail(object param) |
|||
{ |
|||
var paramList = (object[])param; |
|||
// var orderId = paramList[0].ToString();
|
|||
var skuId = paramList[0].ToString(); |
|||
|
|||
|
|||
var url = $"https://item.jd.com/{skuId}.html"; |
|||
try |
|||
{ |
|||
System.Diagnostics.Process.Start("explorer.exe", url); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
Clipboard.SetText(url); |
|||
MessageBox.Show($"{ex.Message}\r\n调用浏览器失败,网页链接已复制到剪切板,请手动打开浏览器访问", "提示"); |
|||
} |
|||
|
|||
} |
|||
private void CreateTask(object obj) |
|||
{ |
|||
|
|||
string increateStr = ""; |
|||
var increates = IncreateList.Where(i => i.IsSelected).Select(i => i.IncreateName); |
|||
if (increates != null && increates.Count() > 0) |
|||
{ |
|||
increateStr = string.Join(",", increates); |
|||
} |
|||
var createTaskModel = new UpdatePurchaseTaskRequest |
|||
{ |
|||
ProductNo = ProductNo, |
|||
Logo = Logo, |
|||
SkuName = SkuName, |
|||
OrderId = OrderId, |
|||
BrandName = BrandName, |
|||
Availability = (int)Availability, |
|||
BasicPack = (int)BasicPack, |
|||
SkuId = SkuId, |
|||
//CreateTime = DateTime.Now,
|
|||
Increment1 = increateStr, |
|||
//Increment2 = (int)Increment2,
|
|||
CertificatePosition = (int)CertificatePosition, |
|||
PackType = (int)PackType, |
|||
MarkMessage = MarkMessage, |
|||
PositionType = (int)PositionType, |
|||
GoodsNumber = GoodsNumber, |
|||
SkuGoodsTitle = SkuTitle, |
|||
SkuCount = SkuCount, |
|||
NeedBar = IsNeedBarCode == Need.需要, |
|||
NeedCer = IsNeedCertificateModel == Need.需要, |
|||
SkuPurchaseSchemeId = SkuPurchaseSchemeId, |
|||
Brand = Brand, |
|||
PurchaseSkuSpecs = PurchaseSkuList.Select(p => new PurchaseSkuSpec { |
|||
IsNeedCer=p.IsNeedCer, PurchaseSkuId=p.PurchaseSkuId, |
|||
}).ToArray() |
|||
|
|||
//IsWorry = IsWorry
|
|||
}; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
if (IsNeedBarCode == Need.需要) |
|||
{ |
|||
if (BarCodeModel == null || IsSetBarCode || BarCodeModel.Id <= 0) |
|||
{ |
|||
new TipsWindow("请设置条形码模板").Show(); |
|||
return; |
|||
} |
|||
createTaskModel.BarCodeId = BarCodeModel.Id; |
|||
} |
|||
if (IsNeedCertificateModel == Need.需要) |
|||
{ |
|||
var cerList = purchaseSkuList.Where(p => p.IsNeedCer).Select(p => p.CerDTO).Select(c=>c.Id).Where(c => c > 0).ToList(); |
|||
if ( purchaseSkuList.Count() <= 0|| cerList.Count<=0) |
|||
{ |
|||
new TipsWindow("请设置合格证模板").Show(); |
|||
return; |
|||
} |
|||
createTaskModel.CerId = string.Join(",", cerList);//
|
|||
} |
|||
ApiResponse<long> res = null; |
|||
|
|||
res = packPurchaseTaskService.UpdatePurchaseTask(createTaskModel); |
|||
|
|||
if (res.Success) |
|||
{ |
|||
if (ReflashWindow != null) ReflashWindow();//刷新主界面
|
|||
|
|||
var win = obj as System.Windows.Window; |
|||
win.Close(); |
|||
} |
|||
} |
|||
#endregion
|
|||
} |
|||
} |
@ -0,0 +1,162 @@ |
|||
<UserControl x:Class="BBWYB.Client.Views.PackPurchaseTask.CerControl" |
|||
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:SJ.Controls;assembly=SJ.Controls" |
|||
xmlns:local="clr-namespace:BBWYB.Client.Views.PackPurchaseTask" |
|||
mc:Ignorable="d" Background="White" |
|||
d:DesignHeight="300" d:DesignWidth="382"> |
|||
<Grid DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:CerControl}}}"> |
|||
<DockPanel Grid.Row="1"> |
|||
|
|||
<Border Visibility="{Binding model.LabelModel,Converter={StaticResource objConverter}, ConverterParameter=无型号:Visible:Collapsed}" BorderBrush="Black" BorderThickness="1" Width="380" Height="298" Margin="1" VerticalAlignment="Top" HorizontalAlignment="Left"> |
|||
|
|||
<StackPanel Orientation="Vertical"> |
|||
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Center" Text="合格证" FontSize="18" Margin="0 10 0 10" /> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="品牌:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding model.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<TextBlock Text="品名:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding model.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="材质:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding model.Shader,Mode=TwoWay}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left"/> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="6 5 0 0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" WaterRemark="如多个标准请使用逗号分隔" Height="50" Text="{Binding model.ExcuteStanderFormat,Mode=TwoWay}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Visibility="{Binding model.ProduceDate,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}" Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="生产日期:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6 0 0 0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" WaterRemark="不填则不打印" Height="25" Text="{Binding model.ProduceDate,Mode=TwoWay}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="生产商:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="18 0 0 0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding model.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 0"> |
|||
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="30 5 0 0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" TextWrapping ="Wrap" AcceptsReturn="True" Height="48" Text="{Binding model.ProductAdress,Mode=TwoWay}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
|
|||
</Border> |
|||
|
|||
|
|||
<Border Name="shiyongnianling" Visibility="{Binding model.LabelModel,Converter={StaticResource objConverter}, ConverterParameter=适用年龄:Visible:Collapsed}" BorderBrush="Black" BorderThickness="1" Width="380" Height="298" Margin="1" VerticalAlignment="Top" HorizontalAlignment="Left"> |
|||
|
|||
<StackPanel Orientation="Vertical"> |
|||
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Center" Text="合格证" FontSize="18" Margin="0 10 0 10" /> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="品牌:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding model.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<TextBlock Text="品名:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding model.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="材质:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding model.Shader,Mode=TwoWay}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left"/> |
|||
<TextBlock Text="适用年龄:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding model.ApplyAge}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="6 5 0 0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" WaterRemark="如多个标准请使用逗号分隔" Height="50" Text="{Binding model.ExcuteStanderFormat,Mode=TwoWay}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Visibility="{Binding model.ProduceDate,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}" Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="生产日期:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6 0 0 0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" WaterRemark="不填则不打印" Height="25" Text="{Binding model.ProduceDate,Mode=TwoWay}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="生产商:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="18 0 0 0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding model.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 0"> |
|||
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="30 5 0 0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" TextWrapping ="Wrap" AcceptsReturn="True" Height="48" Text="{Binding model.ProductAdress,Mode=TwoWay}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
|
|||
</Border> |
|||
<Border Visibility="{Binding model.LabelModel,Converter={StaticResource objConverter}, ConverterParameter=标准无3c:Visible:Collapsed}" BorderBrush="Black" BorderThickness="1" Width="380" Height="298" Margin="1" VerticalAlignment="Top" HorizontalAlignment="Left"> |
|||
<StackPanel Orientation="Vertical"> |
|||
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Center" Text="合格证" FontSize="18" Margin="0 10 0 10" /> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="品牌:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding model.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<TextBlock Text="型号:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding model.ProductNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="品名:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding model.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<TextBlock Text="材质:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding model.Shader,Mode=TwoWay}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left"/> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="6 5 0 0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" WaterRemark="如多个标准请使用逗号分隔" Height="50" Text="{Binding model.ExcuteStanderFormat,Mode=TwoWay}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Visibility="{Binding model.ProduceDate,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}" Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="生产日期:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6 0 0 0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" WaterRemark="不填则不打印" Height="25" Text="{Binding model.ProduceDate,Mode=TwoWay}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="生产商:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="18 0 0 0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding model.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 0"> |
|||
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="30 5 0 0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" TextWrapping ="Wrap" AcceptsReturn="True" Height="48" Text="{Binding model.ProductAdress,Mode=TwoWay}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</Border> |
|||
<Border Visibility="{Binding model.LabelModel,Converter={StaticResource objConverter}, ConverterParameter=标准有3c:Visible:Collapsed}" BorderBrush="Black" BorderThickness="1" Width="380" Height="298" Margin="1" VerticalAlignment="Top" HorizontalAlignment="Left"> |
|||
<StackPanel Orientation="Vertical"> |
|||
<StackPanel Orientation="Horizontal" > |
|||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="合格证" FontSize="18" Margin="157 0 70 0" /> |
|||
<Image Source="/Resources/Images/3c.png" Width="54" Height="40" VerticalAlignment="Top" Margin="0 5 0 0" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 2 0 2"> |
|||
<TextBlock Text="工厂编号:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="223,0,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Text="{Binding model.FactoryNumber,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="100" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="品牌:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding model.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<TextBlock Text="型号:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding model.ProductNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 5 0 5"> |
|||
<TextBlock Text="品名:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding model.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
|
|||
<TextBlock Text="材质:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding model.Shader,Mode=TwoWay}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left"/> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="执行标准:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="6 5 0 0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" WaterRemark="如多个标准请使用逗号分隔" Height="50" Text="{Binding model.ExcuteStanderFormat,Mode=TwoWay}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Visibility="{Binding model.ProduceDate,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}" Orientation="Horizontal" Margin="0 5 0 0"> |
|||
<TextBlock Text="生产日期:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6 0 0 0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" WaterRemark="不填则不打印" Height="25" Text="{Binding model.ProduceDate,Mode=TwoWay}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 5 0 0"> |
|||
<TextBlock Text="生产商:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="18 0 0 0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" Height="25" Text="{Binding model.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 5 0 0"> |
|||
<TextBlock Text="地址:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="30 5 0 0" /> |
|||
<c:BTextBox IsReadOnly="True" BorderBrush="Transparent" TextWrapping ="Wrap" AcceptsReturn="True" Height="48" Text="{Binding model.ProductAdress,Mode=TwoWay}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
|
|||
</Border> |
|||
|
|||
|
|||
</DockPanel> |
|||
</Grid> |
|||
</UserControl> |
@ -0,0 +1,47 @@ |
|||
using BBWYB.Client.Models.PackPurchaseTask; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
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 BBWYB.Client.Views.PackPurchaseTask |
|||
{ |
|||
/// <summary>
|
|||
/// CerControl.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class CerControl : UserControl |
|||
{ |
|||
public CerControl() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
public CertificateModel model |
|||
{ |
|||
get { return (CertificateModel)GetValue(modelProperty); } |
|||
set |
|||
{ |
|||
SetValue(modelProperty, value); |
|||
} |
|||
} |
|||
public static readonly DependencyProperty modelProperty = |
|||
DependencyProperty.Register("model", typeof(CertificateModel), typeof(CerControl), new PropertyMetadata(ChangedProperty)); |
|||
|
|||
private static void ChangedProperty(DependencyObject d, DependencyPropertyChangedEventArgs e) |
|||
{ |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,102 @@ |
|||
<c:BWindow x:Class="BBWYB.Client.Views.PackPurchaseTask.LookBarCodeWindow" |
|||
xmlns:c="clr-namespace:SJ.Controls;assembly=SJ.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" |
|||
mc:Ignorable="d" |
|||
Style="{StaticResource bwstyle}" |
|||
Height="245" Width="320" |
|||
CloseButtonVisibility="Visible" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
RightButtonGroupMargin="0,5,5,0" |
|||
Title="LookBarCodeWindow" |
|||
> |
|||
<!-- DataContext="{Binding CreateSetBarCodeView,Source={StaticResource Locator}}"--> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="20"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
<DockPanel Grid.Row="1"> |
|||
<Border Name="jingjian" Visibility="{Binding LabelModel,Converter={StaticResource objConverter},ConverterParameter=精简模板:Visible:Collapsed}" BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" Height="220" Margin="1"> |
|||
<StackPanel Orientation="Vertical" > |
|||
<TextBlock Margin="10,25,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="品名:"/> |
|||
<Run Text="{Binding BrandName}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,25,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="规格:"/> |
|||
<Run Text="{Binding SkuName}"/> |
|||
</TextBlock> |
|||
<Image Source="/resources/images/barcode.png" Margin="10,25,10,0"/> |
|||
<TextBlock Text="POP" HorizontalAlignment="Center" Margin="10,0,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="{Binding SkuId}"/> |
|||
</TextBlock> |
|||
</StackPanel> |
|||
</Border> |
|||
<Border Name="biaozhun" Visibility="{Binding LabelModel,Converter={StaticResource objConverter},ConverterParameter=标准模板:Visible:Collapsed}" BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" Height="220" Margin="1"> |
|||
<StackPanel Orientation="Vertical" > |
|||
|
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="品牌:"/> |
|||
<Run Text="{Binding Brand}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="品名:"/> |
|||
<Run Text="{Binding BrandName}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="型号:"/> |
|||
<Run Text="{Binding ProductNo}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="规格:"/> |
|||
<Run Text="{Binding SkuName}"/> |
|||
</TextBlock> |
|||
<Image Source="/resources/images/barcode.png" Margin="10,10,10,0"/> |
|||
<TextBlock Text="POP" HorizontalAlignment="Center" Margin="10,0,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="{Binding SkuId}"/> |
|||
</TextBlock> |
|||
|
|||
|
|||
|
|||
|
|||
</StackPanel> |
|||
</Border> |
|||
<Border Name="wuxinghao" Visibility="{Binding LabelModel,Converter={StaticResource objConverter},ConverterParameter=无型号模板:Visible:Collapsed}" BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" Height="220" Margin="1"> |
|||
<StackPanel Orientation="Vertical" > |
|||
|
|||
<TextBlock Margin="10,10,10,5" FontSize="15" FontWeight="Black" > |
|||
<Run Text="品牌:"/> |
|||
<Run Text="{Binding Brand}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,10,10,5" FontSize="15" FontWeight="Black" > |
|||
<Run Text="品名:"/> |
|||
<Run Text="{Binding BrandName}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,10,10,5" FontSize="15" FontWeight="Black" > |
|||
<Run Text="规格:"/> |
|||
<Run Text="{Binding SkuName}"/> |
|||
</TextBlock> |
|||
<Image Source="/resources/images/barcode.png" Margin="10,10,10,0"/> |
|||
<TextBlock Text="POP" HorizontalAlignment="Center" Margin="10,0,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="{Binding SkuId}"/> |
|||
</TextBlock> |
|||
|
|||
|
|||
|
|||
|
|||
</StackPanel> |
|||
</Border> |
|||
</DockPanel> |
|||
|
|||
|
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,33 @@ |
|||
using BBWYB.Client.Models.PackPurchaseTask; |
|||
using SJ.Controls; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
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 BBWYB.Client.Views.PackPurchaseTask |
|||
{ |
|||
/// <summary>
|
|||
/// LookBarCodeWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class LookBarCodeWindow : BWindow |
|||
{ |
|||
public LookBarCodeWindow() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
public void SetData(BarCodeModel BarCodeModel) |
|||
{ |
|||
this.DataContext = BarCodeModel; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,35 @@ |
|||
<c:BWindow x:Class="BBWYB.Client.Views.PackPurchaseTask.LookCerWindow" |
|||
xmlns:c="clr-namespace:SJ.Controls;assembly=SJ.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:BBWYB.Client.Views.PackPurchaseTask" |
|||
mc:Ignorable="d" |
|||
xmlns:hc="https://handyorg.github.io/handycontrol" |
|||
Style="{StaticResource bwstyle}" |
|||
Height="373" Width="386" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
xmlns:ctr="clr-namespace:BBWYB.Client.Converters" |
|||
xmlns:cmodel="clr-namespace:BBWYB.Client.Models" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
CloseButtonVisibility="Visible" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
RightButtonGroupMargin="0,5,5,0" |
|||
|
|||
> |
|||
<!-- ResizeMode="NoResize" DataContext="{Binding CreateSetBarCodeView,Source={StaticResource Locator}}"--> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="40"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="查看合格证" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
<local:CerControl Grid.Row="1" model="{Binding CertificateModel,Mode=TwoWay}"/> |
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,37 @@ |
|||
using BBWYB.Client.Extensions; |
|||
using BBWYB.Client.Models.PackPurchaseTask; |
|||
using SJ.Controls; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
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 BBWYB.Client.Views.PackPurchaseTask |
|||
{ |
|||
/// <summary>
|
|||
/// LookCerWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class LookCerWindow : BWindow |
|||
{ |
|||
public LookCerWindow(CertificateModel certificate) |
|||
{ |
|||
CertificateModel= certificate.Copy(); |
|||
InitializeComponent(); |
|||
this.DataContext = this; |
|||
} |
|||
|
|||
|
|||
|
|||
public CertificateModel CertificateModel { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,139 @@ |
|||
<c:BWindow x:Class="BBWYB.Client.Views.PackPurchaseTask.SetBarCodeWindow" |
|||
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" |
|||
Style="{StaticResource bwstyle}" |
|||
Height="651" Width="577" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
xmlns:c="clr-namespace:SJ.Controls;assembly=SJ.Controls" |
|||
xmlns:ctr="clr-namespace:BBWYB.Client.Converters" |
|||
xmlns:cmodel="clr-namespace:BBWYB.Client.Models" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
CloseButtonVisibility="Visible" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
RightButtonGroupMargin="0,5,5,0"> |
|||
<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="设置条形码" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
|
|||
<Grid Grid.Row="1"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<StackPanel Orientation="Vertical" > |
|||
<!--{Binding CertificateModel.IsLogo,Converter={StaticResource objConverter},ConverterParameter=1:true:false}--> |
|||
<RadioButton GroupName="bar" IsChecked="{Binding BarCodeModel.LabelModel,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:BarcodeLabelModel.精简模板}}" Command="{Binding BarLabelCheckCommand}" CommandParameter="{x:Static cmodel:BarcodeLabelModel.精简模板}" Content="精简" Margin="10,10,0,0" Height="30" VerticalAlignment="Top"/> |
|||
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" Height="220" Margin="5"> |
|||
<StackPanel Orientation="Vertical" > |
|||
<TextBlock Margin="10,25,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="品名:"/> |
|||
<Run Text="{Binding BarCodeModel.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
</TextBlock> |
|||
|
|||
<TextBlock Margin="10,25,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="规格:"/> |
|||
<Run Text="{Binding BarCodeModel.SkuName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
</TextBlock> |
|||
<Image Source="/resources/images/barcode.png" Margin="10,25,10,0"/> |
|||
<TextBlock Text="POP" HorizontalAlignment="Center" Margin="10,0,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="{Binding BarCodeModel.SkuId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
</TextBlock> |
|||
|
|||
|
|||
|
|||
|
|||
</StackPanel> |
|||
</Border> |
|||
|
|||
</StackPanel> |
|||
<StackPanel Grid.Column="1" Orientation="Vertical" > |
|||
<RadioButton GroupName="bar" IsChecked="{Binding BarCodeModel.LabelModel,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:BarcodeLabelModel.标准模板}}" Content="标准" Command="{Binding BarLabelCheckCommand}" CommandParameter="{x:Static cmodel:BarcodeLabelModel.标准模板}" Margin="10,10,0,0" Height="30" VerticalAlignment="Top"/> |
|||
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" Height="220" Margin="5"> |
|||
<StackPanel Orientation="Vertical" > |
|||
|
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="品牌:"/> |
|||
<Run Text="{Binding BarCodeModel.Brand}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="品名:"/> |
|||
<Run Text="{Binding BarCodeModel.BrandName}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="型号:"/> |
|||
<Run Text="{Binding BarCodeModel.ProductNo}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="规格:"/> |
|||
<Run Text="{Binding BarCodeModel.SkuName}"/> |
|||
</TextBlock> |
|||
<Image Source="/resources/images/barcode.png" Margin="10,10,10,0"/> |
|||
<TextBlock Text="POP" HorizontalAlignment="Center" Margin="10,0,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="{Binding BarCodeModel.SkuId}"/> |
|||
</TextBlock> |
|||
|
|||
|
|||
|
|||
|
|||
</StackPanel> |
|||
</Border> |
|||
|
|||
</StackPanel> |
|||
|
|||
<StackPanel Grid.Column="0" Grid.Row="1" Orientation="Vertical" > |
|||
<RadioButton GroupName="bar" IsChecked="{Binding BarCodeModel.LabelModel,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:BarcodeLabelModel.无型号模板}}" Content="无型号" Command="{Binding BarLabelCheckCommand}" CommandParameter="{x:Static cmodel:BarcodeLabelModel.无型号模板}" Margin="10,10,0,0" Height="30" VerticalAlignment="Top"/> |
|||
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" Height="220" Margin="5"> |
|||
<StackPanel Orientation="Vertical" > |
|||
|
|||
<TextBlock Margin="10,10,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="品牌:"/> |
|||
<Run Text="{Binding BarCodeModel.Brand}"/> |
|||
</TextBlock> |
|||
<TextBlock Margin="10,20,10,10" FontSize="15" FontWeight="Black" > |
|||
<Run Text="品名:"/> |
|||
<Run Text="{Binding BarCodeModel.BrandName}"/> |
|||
</TextBlock> |
|||
|
|||
<TextBlock Margin="10" FontSize="15" FontWeight="Black" > |
|||
<Run Text="规格:"/> |
|||
<Run Text="{Binding BarCodeModel.SkuName}"/> |
|||
</TextBlock> |
|||
<Image Source="/resources/images/barcode.png" Margin="10,10,10,0"/> |
|||
<TextBlock Text="POP" HorizontalAlignment="Center" Margin="10,0,10,0" FontSize="15" FontWeight="Black" > |
|||
<Run Text="{Binding BarCodeModel.SkuId}"/> |
|||
</TextBlock> |
|||
|
|||
|
|||
|
|||
|
|||
</StackPanel> |
|||
</Border> |
|||
|
|||
</StackPanel> |
|||
|
|||
</Grid> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<Border Grid.Row="2" Height="1" VerticalAlignment="Top" BorderBrush="{StaticResource Border.Background}" BorderThickness="1"/> |
|||
<c:BButton Background="{StaticResource Button.Selected.Background}" Grid.Row="2" Content="保存" HorizontalAlignment="Right" Width="100" VerticalAlignment="Stretch" |
|||
Click="BButton_Click" /> |
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,96 @@ |
|||
using BBWYB.Client.Models.PackPurchaseTask; |
|||
using BBWYB.Client.Models; |
|||
using CommunityToolkit.Mvvm.Input; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
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; |
|||
using SJ.Controls; |
|||
using BBWYB.Client.APIServices; |
|||
using BBWYB.Client.Models.APIModel; |
|||
|
|||
namespace BBWYB.Client.Views.PackPurchaseTask |
|||
{ |
|||
/// <summary>
|
|||
/// SetBarCode.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class SetBarCodeWindow : BWindow |
|||
{ |
|||
public SetBarCodeWindow() |
|||
{ |
|||
InitializeComponent(); |
|||
BarLabelCheckCommand = new RelayCommand<BarcodeLabelModel>(BarLabelCheck); |
|||
} |
|||
public void LoadData(BarCodeModel barCodeModel, PackPurchaseTaskService PackTaskService) |
|||
{ |
|||
BarCodeModel = barCodeModel; packTaskService = PackTaskService; |
|||
this.DataContext = this; |
|||
} |
|||
|
|||
public BarCodeModel BarCodeModel { get; set; } |
|||
public PackPurchaseTaskService packTaskService { get; set; } |
|||
public Action<BarCodeModel> SaveResult { get; set; } |
|||
|
|||
|
|||
|
|||
|
|||
private void BButton_Click(object sender, RoutedEventArgs e) |
|||
{ |
|||
if (BarCodeModel.LabelModel == BarcodeLabelModel.标准模板)//标准版 判断数据是否异常
|
|||
{ |
|||
if (string.IsNullOrEmpty(BarCodeModel.ProductNo) || BarCodeModel.ProductNo == "待填写") |
|||
{ |
|||
TipsWindow tips = new TipsWindow("该SKU无货号信息,将影响条形码打印\r\n请先设置好货号信息或调整打印模板类型"); |
|||
tips.Show(); |
|||
return; |
|||
} |
|||
} |
|||
|
|||
//保存到服务器中 返回id
|
|||
var resData = packTaskService.SaveBarCode(new BarCodeRequest |
|||
{ |
|||
Brand = BarCodeModel.Brand, |
|||
BrandName = BarCodeModel.BrandName, |
|||
ProductNo = BarCodeModel.ProductNo, |
|||
SkuId = BarCodeModel.SkuId, |
|||
SkuName = BarCodeModel.SkuName, |
|||
LabelModel = BarCodeModel.LabelModel |
|||
|
|||
}); |
|||
if (resData == null || !resData.Success) |
|||
{ |
|||
return; |
|||
} |
|||
|
|||
BarCodeModel.Id = resData.Data; |
|||
if (SaveResult != null) |
|||
SaveResult(BarCodeModel); |
|||
|
|||
this.Close(); |
|||
} |
|||
|
|||
public ICommand BarLabelCheckCommand { get; set; } |
|||
public void BarLabelCheck(BarcodeLabelModel labelModel) |
|||
{ |
|||
if (labelModel == BarcodeLabelModel.标准模板)//标准版 判断数据是否异常
|
|||
{ |
|||
if (string.IsNullOrEmpty(BarCodeModel.ProductNo) || BarCodeModel.ProductNo == "待填写") |
|||
{ |
|||
TipsWindow tips = new TipsWindow("该SKU无货号信息,将影响条形码打印\r\n请先设置好货号信息或调整打印模板类型"); |
|||
tips.ShowDialog(); |
|||
} |
|||
} |
|||
|
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,184 @@ |
|||
<UserControl x:Class="BBWYB.Client.Views.PackPurchaseTask.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:local="clr-namespace:BBWYB.Client.Views.PackPurchaseTask" |
|||
xmlns:cmodel="clr-namespace:BBWYB.Client.Models" |
|||
xmlns:c="clr-namespace:SJ.Controls;assembly=SJ.Controls" |
|||
mc:Ignorable="d" Background="White" |
|||
|
|||
d:DesignHeight="700" d:DesignWidth="820"> |
|||
<Grid DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:SetCerControl}}}"> |
|||
<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" HorizontalAlignment="Left" VerticalContentAlignment="Center" IsChecked="{Binding model.LabelModel,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:CertificateLabelModel.标准无3c}}" Checked="RadioButton_Checked" 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"> |
|||
<StackPanel Orientation="Vertical"> |
|||
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Center" Text="合格证" FontSize="18" Margin="0 10 0 25" /> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="品牌:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0" /> |
|||
<c:BTextBox Height="25" Text="{Binding model.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<TextBlock Text="型号:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox Height="25" Text="{Binding model.ProductNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="品名:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox Height="25" Text="{Binding model.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<TextBlock Text="材质:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox Height="25" Text="{Binding model.Shader,Mode=TwoWay}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left"/> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="执行标准:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6 0 0 0" /> |
|||
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Height="25" Text="{Binding model.ExcuteStander,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="生产日期:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6 0 0 0" /> |
|||
<c:BTextBox WaterRemark="不填则不打印" Height="25" Text="{Binding model.ProduceDate,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="生产商:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="18 0 0 0" /> |
|||
<c:BTextBox Height="25" Text="{Binding model.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 0"> |
|||
<TextBlock Text="地址:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30 0 0 0" /> |
|||
<c:BTextBox TextWrapping ="Wrap" AcceptsReturn="True" Height="44" Text="{Binding model.ProductAdress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</Border> |
|||
</Grid> |
|||
<Grid Grid.Column="1"> |
|||
<!--IsChecked="{Binding IsLogo,Converter={StaticResource objConverter},ConverterParameter=1:true:false}"--> |
|||
<RadioButton GroupName="cer" HorizontalAlignment="Left" VerticalContentAlignment="Center" IsChecked="{Binding model.LabelModel,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:CertificateLabelModel.标准有3c}}" Checked="RadioButton_Checked" 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"> |
|||
<StackPanel Orientation="Vertical"> |
|||
|
|||
<StackPanel Orientation="Horizontal" > |
|||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="合格证" FontSize="18" Margin="157 0 70 0" /> |
|||
<Image Source="/resources/images/3c.png" Width="54" Height="40" VerticalAlignment="Top" Margin="0 5 0 0" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 2 0 5"> |
|||
<TextBlock Text="工厂编号:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="203,0,0,0" /> |
|||
<c:BTextBox Text="{Binding model.FactoryNumber,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="100" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="品牌:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0" /> |
|||
<c:BTextBox Height="25" Text="{Binding model.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<TextBlock Text="型号:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox Height="25" Text="{Binding model.ProductNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="品名:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox Height="25" Text="{Binding model.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<TextBlock Text="材质:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox Height="25" Text="{Binding model.Shader,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left"/> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="执行标准:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6 0 0 0" /> |
|||
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Height="25" Text="{Binding model.ExcuteStander,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="生产日期:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6 0 0 0" /> |
|||
<c:BTextBox WaterRemark="不填则不打印" Height="25" Text="{Binding model.ProduceDate,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="生产商:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="18 0 0 0" /> |
|||
<c:BTextBox Height="25" Text="{Binding model.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 5 0 0"> |
|||
<TextBlock Text="地址:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30 0 0 0" /> |
|||
<c:BTextBox TextWrapping ="Wrap" AcceptsReturn="True" Height="44" Text="{Binding model.ProductAdress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</Border> |
|||
|
|||
</Grid> |
|||
|
|||
<Grid Grid.Row="1"> |
|||
<!--IsChecked="{Binding IsLogo,Converter={StaticResource objConverter},ConverterParameter=0:true:false}"--> |
|||
<RadioButton GroupName="cer" HorizontalAlignment="Left" VerticalContentAlignment="Center" IsChecked="{Binding model.LabelModel,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:CertificateLabelModel.无型号}}" Checked="RadioButton_Checked" 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"> |
|||
|
|||
<StackPanel Orientation="Vertical"> |
|||
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Center" Text="合格证" FontSize="18" Margin="0 10 0 25" /> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="品牌:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0" /> |
|||
<c:BTextBox Height="25" Text="{Binding model.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<TextBlock Text="品名:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox Height="25" Text="{Binding model.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
|
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="材质:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox Height="25" Text="{Binding model.Shader,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left"/> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="执行标准:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6 0 0 0" /> |
|||
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Height="25" Text="{Binding model.ExcuteStander,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="生产日期:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6 0 0 0" /> |
|||
<c:BTextBox WaterRemark="不填则不打印" Height="25" Text="{Binding model.ProduceDate,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="生产商:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="18 0 0 0" /> |
|||
<c:BTextBox Height="25" Text="{Binding model.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 0"> |
|||
<TextBlock Text="地址:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30 0 0 0" /> |
|||
<c:BTextBox TextWrapping ="Wrap" AcceptsReturn="True" Height="44" Text="{Binding model.ProductAdress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
|
|||
</Border> |
|||
</Grid> |
|||
<Grid Grid.Column="1" Grid.Row="1"> |
|||
<!--IsChecked="{Binding IsLogo,Converter={StaticResource objConverter},ConverterParameter=0:true:false}"--> |
|||
<RadioButton GroupName="cer" HorizontalAlignment="Left" VerticalContentAlignment="Center" IsChecked="{Binding model.LabelModel,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:CertificateLabelModel.适用年龄 }}" Checked="RadioButton_Checked" 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"> |
|||
|
|||
<StackPanel Orientation="Vertical"> |
|||
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Center" Text="合格证" FontSize="18" Margin="0 10 0 25" /> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="品牌:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0" /> |
|||
<c:BTextBox Height="25" Text="{Binding model.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<TextBlock Text="品名:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox Height="25" Text="{Binding model.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
|
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="材质:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox Height="25" Text="{Binding model.Shader,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left"/> |
|||
<TextBlock Text="适用年龄:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6,0,0,0" /> |
|||
<c:BTextBox Height="25" Text="{Binding model.ApplyAge,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="124" VerticalAlignment="Top" HorizontalAlignment="Left"/> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="执行标准:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6 0 0 0" /> |
|||
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Height="25" Text="{Binding model.ExcuteStander,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="生产日期:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6 0 0 0" /> |
|||
<c:BTextBox WaterRemark="不填则不打印" Height="25" Text="{Binding model.ProduceDate,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="生产商:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="18 0 0 0" /> |
|||
<c:BTextBox Height="25" Text="{Binding model.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 0"> |
|||
<TextBlock Text="地址:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30 0 0 0" /> |
|||
<c:BTextBox TextWrapping ="Wrap" AcceptsReturn="True" Height="44" Text="{Binding model.ProductAdress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
|
|||
</Border> |
|||
</Grid> |
|||
</Grid> |
|||
</UserControl> |
@ -0,0 +1,82 @@ |
|||
using BBWYB.Client.Models.PackPurchaseTask; |
|||
using BBWYB.Client.Models; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
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 BBWYB.Client.Views.PackPurchaseTask |
|||
{ |
|||
/// <summary>
|
|||
/// SetCerControl.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class SetCerControl : UserControl |
|||
{ |
|||
public SetCerControl() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
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; |
|||
} |
|||
} |
|||
|
|||
private void RadioButton_Checked(object sender, RoutedEventArgs e) |
|||
{ |
|||
var rabtn = sender as RadioButton; |
|||
if (rabtn != null && rabtn.CommandParameter != null) |
|||
{ |
|||
var labModel = Enum.Parse<CertificateLabelModel>(rabtn.CommandParameter.ToString()); |
|||
model.LabelModel = labModel; |
|||
model.IsLogo = labModel == CertificateLabelModel.标准有3c ? 1 : 0; |
|||
} |
|||
|
|||
var data = e.Source as string; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,62 @@ |
|||
<c:BWindow x:Class="BBWYB.Client.Views.PackPurchaseTask.SetCerWindow" |
|||
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:BBWYB.Client.Views.PackPurchaseTask" |
|||
xmlns:c="clr-namespace:SJ.Controls;assembly=SJ.Controls" |
|||
mc:Ignorable="d" |
|||
Style="{StaticResource bwstyle}" |
|||
xmlns:hc="https://handyorg.github.io/handycontrol" |
|||
Height="900" Width="850" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
xmlns:ctr="clr-namespace:BBWYB.Client.Converters" |
|||
xmlns:cmodel="clr-namespace:BBWYB.Client.Models" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
CloseButtonVisibility="Visible" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
RightButtonGroupMargin="0,5,5,0"> |
|||
<!-- DataContext="{Binding CreateSetBarCodeView,Source={StaticResource Locator}}"--> |
|||
<Window.Resources> |
|||
|
|||
</Window.Resources> |
|||
<Grid DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:SetCerWindow}}}"> |
|||
|
|||
<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="设置合格证" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
|
|||
<Grid Grid.Row="1"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="60"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="20 10 0 0"> |
|||
<c:BButton Content="合格证信息" Width="100" |
|||
Background="{Binding PackCerState,Mode=TwoWay,Converter={StaticResource objConverter},ConverterParameter=合格证信息:#8080FF:#F2F2F2}" |
|||
Foreground="{Binding PackCerState,Mode=TwoWay,Converter={StaticResource objConverter},ConverterParameter=合格证信息:White:#4A4A4A}" |
|||
Command="{Binding SetPackCerStateCommand}" CommandParameter="{x:Static cmodel:PackCerState.合格证信息}"/> |
|||
<c:BButton Content="无需合格证" Width="100" |
|||
Background="{Binding PackCerState,Mode=TwoWay,Converter={StaticResource objConverter},ConverterParameter=无需合格证:#8080FF:#F2F2F2}" |
|||
Foreground="{Binding PackCerState,Mode=TwoWay,Converter={StaticResource objConverter},ConverterParameter=无需合格证:White:#4A4A4A}" |
|||
Command="{Binding SetPackCerStateCommand}" CommandParameter="{x:Static cmodel:PackCerState.无需合格证}"/> |
|||
</StackPanel> |
|||
|
|||
<Grid Grid.Row="1" Visibility="{Binding PackCerState,Mode=TwoWay,Converter={StaticResource objConverter},ConverterParameter=合格证信息:Visible:Collapsed}"> |
|||
<local:SetCerControl model="{Binding CertificateModel,Mode=TwoWay}"/> |
|||
</Grid> |
|||
|
|||
</Grid> |
|||
<Border Grid.Row="2" Height="1" VerticalAlignment="Top" BorderBrush="{StaticResource Border.Background}" BorderThickness="1"/> |
|||
<c:BButton x:Name="save_btn" Background="{StaticResource Button.Selected.Background}" Grid.Row="2" Content="保存" HorizontalAlignment="Right" Width="100" VerticalAlignment="Stretch" |
|||
Click="save_btn_Click" /> |
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,139 @@ |
|||
using BBWYB.Client.APIServices; |
|||
using BBWYB.Client.Extensions; |
|||
using BBWYB.Client.Models; |
|||
using BBWYB.Client.Models.APIModel; |
|||
using BBWYB.Client.Models.PackPurchaseTask; |
|||
using CommunityToolkit.Mvvm.Input; |
|||
using SJ.Controls; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.Linq; |
|||
using System.Net; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
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 BBWYB.Client.Views.PackPurchaseTask |
|||
{ |
|||
/// <summary>
|
|||
/// SetCerWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class SetCerWindow : BWindow |
|||
{ |
|||
public SetCerWindow() |
|||
{ |
|||
InitializeComponent(); |
|||
SetPackCerStateCommand = new RelayCommand<PackCerState>(SetPackCerState); |
|||
} |
|||
|
|||
private void SetPackCerState(PackCerState obj) |
|||
{ |
|||
PackCerState = obj; |
|||
} |
|||
|
|||
public void LoadData( bool isNeedCer,CertificateModel CertificateModel, PackPurchaseTaskService packTaskService, CertificateModel SpuCertificateModel, bool IsSetSpuCertificate) |
|||
{ |
|||
this.CertificateModel = CertificateModel.Copy(); |
|||
this.packTaskService = packTaskService; |
|||
PackCerState = isNeedCer ? PackCerState.合格证信息 : PackCerState.无需合格证; |
|||
this.DataContext = this; |
|||
} |
|||
|
|||
public ICommand SetPackCerStateCommand { get; set; } |
|||
//public PackCerState PackCerState { get; set; }
|
|||
|
|||
|
|||
public PackCerState PackCerState |
|||
{ |
|||
get |
|||
{ |
|||
return (PackCerState)GetValue(PackCerStateProperty); |
|||
|
|||
} |
|||
set |
|||
{ |
|||
SetValue(PackCerStateProperty, value); |
|||
|
|||
} |
|||
} |
|||
|
|||
|
|||
public static readonly DependencyProperty PackCerStateProperty = |
|||
DependencyProperty.Register("PackCerState", typeof(PackCerState), typeof(SetCerWindow)); |
|||
|
|||
public bool IsSetSpuCertificate { get; set; } |
|||
public PackPurchaseTaskService packTaskService { get; set; } |
|||
public CertificateModel CertificateModel { get; set; } |
|||
public CertificateModel SpuCertificateModel { get; set; } |
|||
|
|||
public Action<CertificateModel, PackCerState> SaveResult { get; set; } |
|||
|
|||
|
|||
private void save_btn_Click(object sender, RoutedEventArgs e) |
|||
{ |
|||
|
|||
|
|||
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("参数出错!请重新填写!").Show();
|
|||
return; |
|||
} |
|||
var standers = CertificateModel.ExcuteStander.Split(',', StringSplitOptions.RemoveEmptyEntries); |
|||
|
|||
var resData = packTaskService.SaveCer(new CerRequest |
|||
{ |
|||
Brand = CertificateModel.Brand, |
|||
BrandName = CertificateModel.BrandName, |
|||
ProductNo = CertificateModel.ProductNo, |
|||
SkuId = CertificateModel.SkuId, |
|||
ExcuteStander = CertificateModel.ExcuteStander, |
|||
LabelModel = (int)CertificateModel.LabelModel, |
|||
FactoryNumber = CertificateModel.FactoryNumber, |
|||
IsLogo = CertificateModel.IsLogo, |
|||
ProductAdress = CertificateModel.ProductAdress, |
|||
ProductShop = CertificateModel.ProductShop, |
|||
Shader = CertificateModel.Shader, |
|||
ApplyAge = CertificateModel.ApplyAge, |
|||
GoodsNumber = CertificateModel.GoodsNumber, |
|||
ProduceDate = CertificateModel.ProduceDate, |
|||
PurchaseSkuId = CertificateModel.PurchaseSkuId |
|||
|
|||
}); |
|||
if (resData == null || !resData.Success) |
|||
{ |
|||
|
|||
return; |
|||
} |
|||
|
|||
CertificateModel.Id = resData.Data; |
|||
if (SaveResult != null) SaveResult(CertificateModel, PackCerState); |
|||
|
|||
|
|||
|
|||
this.Close(); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
public class GoodsNumberCer |
|||
{ |
|||
/// <summary>
|
|||
/// 配件序号
|
|||
/// </summary>
|
|||
// public int GoodsNumber { get; set; }
|
|||
public CertificateModel CertificateModel { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,38 @@ |
|||
<c:BWindow x:Class="BBWYB.Client.Views.PackPurchaseTask.TipsWindow" |
|||
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" |
|||
mc:Ignorable="d" |
|||
Title="TipsWindow" Height="200" Width="321" |
|||
xmlns:c="clr-namespace:SJ.Controls;assembly=SJ.Controls" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
xmlns:ctr="clr-namespace:BBWYB.Client.Converters" |
|||
xmlns:cmodel="clr-namespace:BBWYB.Client.Models" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
|
|||
WindowStartupLocation="CenterScreen" |
|||
|
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
CloseButtonVisibility ="Collapsed" |
|||
RightButtonGroupMargin="0,5,5,0"> |
|||
<!--CloseButtonColor="{StaticResource WindowButtonColor}" --> |
|||
<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="提示" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
<TextBox Name="tbContent" IsReadOnly="True" AcceptsReturn="True" TextWrapping="Wrap" Grid.Row="1" Margin="10" |
|||
Text="请设置合格证内容 请设置合格证内容" BorderBrush="White" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
|
|||
|
|||
<!--<c:BButton Grid.Row="2" Content="确定" HorizontalAlignment="Right" Width="100" VerticalAlignment="Stretch" Click="BButton_Click" />--> |
|||
|
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,47 @@ |
|||
using SJ.Controls; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
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; |
|||
using System.Windows.Threading; |
|||
|
|||
namespace BBWYB.Client.Views.PackPurchaseTask |
|||
{ |
|||
/// <summary>
|
|||
/// TipsWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class TipsWindow : BWindow |
|||
{ |
|||
private DispatcherTimer timer; |
|||
public TipsWindow(string Content, int waitTime = 2) |
|||
{ |
|||
InitializeComponent(); |
|||
tbContent.Text = Content; |
|||
this.WindowStartupLocation = WindowStartupLocation.CenterScreen; |
|||
timer = new DispatcherTimer(); |
|||
timer.Interval = TimeSpan.FromSeconds(waitTime); |
|||
timer.Tick += OnTimerTick; |
|||
timer.Start(); |
|||
|
|||
} |
|||
|
|||
private void OnTimerTick(object sender, EventArgs e) |
|||
{ |
|||
timer.Stop(); |
|||
Close(); |
|||
} |
|||
private void BButton_Click(object sender, RoutedEventArgs e) |
|||
{ |
|||
this.Close(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,350 @@ |
|||
<c:BWindow x:Class="BBWYB.Client.Views.PackPurchaseTaska.UpdatePurchaseTaskWindow" |
|||
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:c="clr-namespace:SJ.Controls;assembly=SJ.Controls" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
xmlns:ctr="clr-namespace:BBWYB.Client.Converters" |
|||
xmlns:cmodel="clr-namespace:BBWYB.Client.Models" |
|||
xmlns:hc="https://handyorg.github.io/handycontrol" |
|||
mc:Ignorable="d" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
CloseButtonVisibility="Visible" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
DataContext="{Binding UpdatePurchaseTask,Source={StaticResource Locator}}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
RightButtonGroupMargin="0,5,5,0" |
|||
Height="450" Width="1305"> |
|||
<Window.Resources> |
|||
<ResourceDictionary> |
|||
<ResourceDictionary.MergedDictionaries> |
|||
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/> |
|||
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/> |
|||
</ResourceDictionary.MergedDictionaries> |
|||
<!--<ObjectDataProvider x:Key="storageTypeProvider" MethodName="GetValues" ObjectType="{x:Type sys:Enum}"> |
|||
<ObjectDataProvider.MethodParameters> |
|||
<x:Type TypeName="cmodel:StorageType"/> |
|||
</ObjectDataProvider.MethodParameters> |
|||
</ObjectDataProvider>--> |
|||
<ctr:MultiParameterTransferConverter x:Key="mptConverter"/> |
|||
</ResourceDictionary> |
|||
|
|||
</Window.Resources> |
|||
|
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="40"/> |
|||
<RowDefinition Height="60"/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="40"/> |
|||
</Grid.RowDefinitions> |
|||
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999"/> |
|||
<Grid Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="配置打包信息" VerticalAlignment="Center" HorizontalAlignment="Center" /> |
|||
</Grid> |
|||
|
|||
<Grid Grid.Row="1" VerticalAlignment="Center"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="370"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="下单店铺商品信息" FontWeight="Bold" FontSize="13" Height="20" Width="110" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="19 0 0 0" /> |
|||
<TextBlock Grid.Column="1" Text="配件商品信息" FontWeight="Bold" FontSize="13" Height="20" Width="110" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="19 0 0 0" /> |
|||
|
|||
</Grid> |
|||
<Grid Grid.Row="2" > |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition /> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
|
|||
<Grid Grid.Row="0" VerticalAlignment="Center"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="370"/> |
|||
<ColumnDefinition Width="auto"/> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<StackPanel Orientation="Horizontal"> |
|||
<c:BAsyncImage UrlSource="{Binding Logo}" |
|||
Width="150" Height="150" |
|||
VerticalAlignment="Top" Margin="25 0 0 0" |
|||
Cursor="Hand"> |
|||
<b:Interaction.Triggers> |
|||
<b:EventTrigger EventName="PreviewMouseLeftButtonDown"> |
|||
<b:InvokeCommandAction Command="{Binding DataContext.OpenSkuDetailCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Window}}}"> |
|||
<b:InvokeCommandAction.CommandParameter> |
|||
<MultiBinding Converter="{StaticResource mptConverter}"> |
|||
<Binding Path="SkuId"/> |
|||
</MultiBinding> |
|||
</b:InvokeCommandAction.CommandParameter> |
|||
</b:InvokeCommandAction> |
|||
</b:EventTrigger> |
|||
</b:Interaction.Triggers> |
|||
</c:BAsyncImage> |
|||
<StackPanel Orientation="Vertical" Width="190"> |
|||
|
|||
<TextBlock Margin="10 10 0 0" TextTrimming="CharacterEllipsis"> |
|||
<TextBlock.ToolTip> |
|||
<ToolTip Style="{StaticResource OrderCouponToolipStyle}"> |
|||
<TextBlock Text="{Binding SkuId}"/> |
|||
</ToolTip> |
|||
</TextBlock.ToolTip> |
|||
<Run Text="SKU:"/> |
|||
<Run Text="{Binding SkuId}"/> |
|||
</TextBlock > |
|||
<TextBlock Margin="10 10 0 10" TextTrimming="CharacterEllipsis"> |
|||
<TextBlock.ToolTip> |
|||
<ToolTip Style="{StaticResource OrderCouponToolipStyle}"> |
|||
<TextBlock Text="{Binding SkuName}"/> |
|||
</ToolTip> |
|||
</TextBlock.ToolTip> |
|||
<Run Text="名称:"/> |
|||
<Run Text="{Binding SkuName}"/> |
|||
</TextBlock > |
|||
<TextBlock Margin="10 0 0 10"> |
|||
<Run Text="货号:"/> |
|||
<Run Text="{Binding ProductNo}"/> |
|||
</TextBlock> |
|||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="10 0 0 10" Height="30"> |
|||
<TextBlock Text="品名:" VerticalAlignment="Center"/> |
|||
<c:BTextBox Text="{Binding BrandName}" Height="30" Width="140" WaterRemark="请输入品名"/> |
|||
|
|||
</StackPanel> |
|||
<StackPanel Margin="10 0 0 10" Orientation="Horizontal"> |
|||
<TextBlock Text="条形码:"/> |
|||
<c:BButton Content="待设置" Style="{StaticResource LinkButton}" Width="35" Height="15" Command="{Binding SetBarCodeCommand}" |
|||
Visibility="{Binding IsSetBarCode, Converter={StaticResource objConverter}, ConverterParameter=true:Visible:Collapsed }" |
|||
/> |
|||
<StackPanel Visibility="{Binding IsSetBarCode, Converter={StaticResource objConverter}, ConverterParameter=false:Visible:Collapsed }" Orientation="Horizontal" HorizontalAlignment="Center" > |
|||
<c:BButton Content="查看" Style="{StaticResource LinkButton}" Width="35" Height="15" Command="{Binding LookBarCommand}"/> |
|||
<c:BButton Content="修改" Style="{StaticResource LinkButton}" Width="35" Height="15" Command="{Binding SetBarCodeCommand}"/> |
|||
</StackPanel > |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
<Grid Grid.Column="1"> |
|||
<ListBox x:Name="listbox_order" HorizontalAlignment="Left" |
|||
Height="155" Width="900" Margin="0" ScrollViewer.HorizontalScrollBarVisibility="Auto" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
ItemsSource="{Binding PurchaseSkuList,Mode=TwoWay}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="0" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="Horizontal" IsItemsHost="True"/> |
|||
</ItemsPanelTemplate> |
|||
</ListBox.ItemsPanel> |
|||
|
|||
|
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid |
|||
MinHeight="100"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<c:BAsyncImage UrlSource="{Binding Logo}" |
|||
Width="150" Height="150" |
|||
VerticalAlignment="Top" Margin="25 0 0 0" |
|||
Cursor="Hand"> |
|||
<b:Interaction.Triggers> |
|||
<b:EventTrigger EventName="PreviewMouseLeftButtonDown"> |
|||
<b:InvokeCommandAction Command="{Binding DataContext.OpenSkuDetailCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Window}}}"> |
|||
<b:InvokeCommandAction.CommandParameter> |
|||
<MultiBinding Converter="{StaticResource mptConverter}"> |
|||
<Binding Path="SkuId"/> |
|||
</MultiBinding> |
|||
</b:InvokeCommandAction.CommandParameter> |
|||
</b:InvokeCommandAction> |
|||
</b:EventTrigger> |
|||
</b:Interaction.Triggers> |
|||
</c:BAsyncImage> |
|||
<DockPanel VerticalAlignment="Top" Width="190" Height="150"> |
|||
|
|||
<TextBlock Margin="10 10 0 0" DockPanel.Dock="Top" TextTrimming="CharacterEllipsis"> |
|||
<TextBlock.ToolTip> |
|||
<ToolTip Style="{StaticResource OrderCouponToolipStyle}"> |
|||
<TextBlock Text="{Binding PurchaseSkuId}"/> |
|||
</ToolTip> |
|||
</TextBlock.ToolTip> |
|||
<Run Text="配件商品ID:"/> |
|||
<Run Text="{Binding PurchaseSkuId}"/> |
|||
</TextBlock > |
|||
<TextBlock Margin="10 10 0 10" DockPanel.Dock="Top" TextTrimming="CharacterEllipsis"> |
|||
<TextBlock.ToolTip> |
|||
<ToolTip Style="{StaticResource OrderCouponToolipStyle}"> |
|||
<TextBlock Text="{Binding Title}"/> |
|||
</ToolTip> |
|||
</TextBlock.ToolTip> |
|||
<Run Text="SKU名称:"/> |
|||
<Run Text="{Binding Title}"/> |
|||
</TextBlock > |
|||
|
|||
|
|||
<StackPanel Margin="10 0 0 5" Height="25" VerticalAlignment="Bottom" DockPanel.Dock="Bottom" Orientation="Horizontal"> |
|||
<TextBlock Text="合格证:" VerticalAlignment="Center"/> |
|||
|
|||
<StackPanel Orientation="Horizontal" |
|||
Visibility="{Binding IsNeedCer, Converter={StaticResource objConverter}, ConverterParameter=true:Visible:Collapsed }"> |
|||
|
|||
<c:BButton Content="待设置" Style="{StaticResource LinkButton}" Width="35" Height="15" |
|||
Command="{Binding DataContext. SetCertificateCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}" |
|||
CommandParameter="{Binding }" |
|||
Visibility="{Binding IsSetCertificate, Converter={StaticResource objConverter}, ConverterParameter=true:Visible:Collapsed }"/> |
|||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" |
|||
Visibility="{Binding IsSetCertificate, Converter={StaticResource objConverter}, ConverterParameter=false:Visible:Collapsed }"> |
|||
<c:BButton Content="查看" Style="{StaticResource LinkButton}" Width="35" Height="15" |
|||
CommandParameter="{Binding PurchaseSkuId}" |
|||
Command="{Binding DataContext. LookCerCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}"/> |
|||
<c:BButton Content="修改" Style="{StaticResource LinkButton}" Width="35" Height="15" CommandParameter="{Binding }" |
|||
Command="{Binding DataContext.SetCertificateCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}" |
|||
/> |
|||
</StackPanel > |
|||
|
|||
</StackPanel> |
|||
|
|||
|
|||
<StackPanel Orientation="Horizontal" |
|||
Visibility="{Binding IsNeedCer, Converter={StaticResource objConverter}, ConverterParameter=true:Collapsed:Visible }"> |
|||
|
|||
<!--<c:BButton Content="" Style="{StaticResource LinkButton}" Width="35" Height="15" |
|||
Command="{Binding DataContext. SetCertificateCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}" |
|||
CommandParameter="{Binding }" |
|||
Visibility="{Binding IsSetCertificate, Converter={StaticResource objConverter}, ConverterParameter=true:Visible:Collapsed }"/>--> |
|||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" |
|||
Visibility="{Binding IsSetCertificate, Converter={StaticResource objConverter}, ConverterParameter=false:Visible:Collapsed }"> |
|||
<c:BButton Content="无需设置" Style="{StaticResource LinkButton}" Height="15" Margin="5 0 0 0" |
|||
CommandParameter="{Binding PurchaseSkuId}" |
|||
Command="{Binding DataContext. LookCerCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}"/> |
|||
<c:BButton Content="修改" Style="{StaticResource LinkButton}" Width="35" Height="15" CommandParameter="{Binding }" |
|||
Command="{Binding DataContext.SetCertificateCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}" |
|||
/> |
|||
</StackPanel > |
|||
</StackPanel> |
|||
|
|||
|
|||
|
|||
</StackPanel> |
|||
|
|||
|
|||
|
|||
|
|||
</DockPanel> |
|||
</StackPanel> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
</Grid> |
|||
</Grid> |
|||
<Grid Grid.Row="1"> |
|||
<TextBlock Text="打包配置" FontWeight="Bold" FontSize="13" Margin="19 23 " HorizontalAlignment="Left" VerticalAlignment="Top"/> |
|||
<Grid Height="70" Margin="20 54 20 0"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="77"/> |
|||
<ColumnDefinition Width="77"/> |
|||
<ColumnDefinition MinWidth="77"/> |
|||
<ColumnDefinition Width="90"/> |
|||
<ColumnDefinition Width="140"/> |
|||
<ColumnDefinition Width="86"/> |
|||
<ColumnDefinition Width="86"/> |
|||
<ColumnDefinition Width="100"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="35"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border Grid.Row="0" Grid.ColumnSpan="8" VerticalAlignment="Top" Height="1" Background="{StaticResource Border.Brush}"/> |
|||
<Border Grid.Row="0" Grid.ColumnSpan="8" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/> |
|||
<Border Grid.Row="1" Grid.ColumnSpan="8" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/> |
|||
|
|||
<Border Grid.RowSpan="2" Grid.Column="0" HorizontalAlignment="Left" Width="1" Background="{StaticResource Border.Brush}"/> |
|||
<Border Grid.RowSpan="2" Grid.Column="0" HorizontalAlignment="Right" Width="1" Background="{StaticResource Border.Brush}"/> |
|||
<Border Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Right" Width="1" Background="{StaticResource Border.Brush}"/> |
|||
<Border Grid.RowSpan="2" Grid.Column="2" HorizontalAlignment="Right" Width="1" Background="{StaticResource Border.Brush}"/> |
|||
<Border Grid.RowSpan="2" Grid.Column="3" HorizontalAlignment="Right" Width="1" Background="{StaticResource Border.Brush}"/> |
|||
<Border Grid.RowSpan="2" Grid.Column="4" HorizontalAlignment="Right" Width="1" Background="{StaticResource Border.Brush}"/> |
|||
<Border Grid.RowSpan="2" Grid.Column="5" HorizontalAlignment="Right" Width="1" Background="{StaticResource Border.Brush}"/> |
|||
<Border Grid.RowSpan="2" Grid.Column="6" HorizontalAlignment="Right" Width="1" Background="{StaticResource Border.Brush}"/> |
|||
<Border Grid.RowSpan="2" Grid.Column="7" HorizontalAlignment="Right" Width="1" Background="{StaticResource Border.Brush}"/> |
|||
|
|||
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="0" Text="组合类型"/> |
|||
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="1" Text="配件数量"/> |
|||
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="2" Text="SKU配件商品"/> |
|||
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="3" Text="基础包装"/> |
|||
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="4" Text="增量耗材"/> |
|||
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="5" Text="条码标签"/> |
|||
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="6" Text="合格证"/> |
|||
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="7" Text="合格证位置"/> |
|||
|
|||
|
|||
<Grid Grid.Row="1" Grid.Column="0" > |
|||
<ComboBox VerticalContentAlignment="Center" BorderThickness="0" Margin="1" ItemsSource="{Binding PackTypeList}" Text="{Binding PackType}" > |
|||
|
|||
</ComboBox> |
|||
</Grid> |
|||
<c:BTextBox BorderBrush="Transparent" Grid.Row="1" Grid.Column="1" Height="30" Margin="5" Text="{Binding GoodsNumber,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
<c:BTextBox BorderBrush="Transparent" Grid.Row="1" Grid.Column="2" Height="30" Margin="5" Text="{Binding SkuTitle,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
<Grid Grid.Row="1" Grid.Column="3" > |
|||
<ComboBox VerticalContentAlignment="Center" BorderThickness="0" Margin="1" ItemsSource="{Binding BasicPackList}" Text="{Binding BasicPack}" > |
|||
|
|||
</ComboBox> |
|||
</Grid> |
|||
|
|||
|
|||
<Grid Grid.Row="1" Grid.Column="4"> |
|||
<Grid.Resources> |
|||
|
|||
</Grid.Resources> |
|||
<hc:CheckComboBox BorderThickness="0" IsTextSearchEnabled="True" ItemsSource="{Binding IncreateList}" |
|||
ShowClearButton="True" |
|||
MinWidth="90" |
|||
Height="25" |
|||
Margin="5,0,5,0"> |
|||
<hc:CheckComboBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<StackPanel Orientation="Horizontal" Margin="5,2.5"> |
|||
<CheckBox Content="{Binding IncreateName}" IsChecked="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
</StackPanel> |
|||
</DataTemplate> |
|||
</hc:CheckComboBox.ItemTemplate> |
|||
<hc:CheckComboBox.ItemContainerStyle> |
|||
<Style TargetType="{x:Type hc:CheckComboBoxItem}" BasedOn="{StaticResource NoBgListBoxItemStyle}"> |
|||
<Setter Property="IsSelected" Value="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
|||
</Style> |
|||
</hc:CheckComboBox.ItemContainerStyle> |
|||
</hc:CheckComboBox> |
|||
</Grid> |
|||
|
|||
<Grid Grid.Row="1" Grid.Column="5" > |
|||
<ComboBox VerticalContentAlignment="Center" BorderThickness="0" Margin="1" ItemsSource="{Binding IsNeedBarCodeList}" Text="{Binding IsNeedBarCode,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"> |
|||
|
|||
</ComboBox> |
|||
</Grid> |
|||
<Grid Grid.Row="1" Grid.Column="6" > |
|||
<ComboBox VerticalContentAlignment="Center" BorderThickness="0" Margin="1" ItemsSource="{Binding IsNeedCerList}" Text="{Binding IsNeedCertificateModel,Mode=TwoWay}"> |
|||
|
|||
</ComboBox> |
|||
</Grid> |
|||
<Grid Grid.Row="1" Grid.Column="7" > |
|||
<ComboBox VerticalContentAlignment="Center" BorderThickness="0" Margin="1" ItemsSource="{Binding CertificatePositionList}" Text="{Binding CertificatePosition}"> |
|||
|
|||
</ComboBox> |
|||
</Grid> |
|||
</Grid> |
|||
</Grid> |
|||
|
|||
</Grid> |
|||
<Grid Grid.Row="3"> |
|||
|
|||
<c:BButton Content="保存" Width="100" HorizontalAlignment="Right" VerticalAlignment="Stretch" Margin="0,2,19,2" |
|||
Command="{Binding CreateTaskCommand}" |
|||
CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
Background="{StaticResource Button.Selected.Background}" BorderThickness="0" Foreground="White"/> |
|||
</Grid> |
|||
|
|||
</Grid> |
|||
</c:BWindow> |
|||
|
@ -0,0 +1,37 @@ |
|||
using SJ.Controls; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
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 BBWYB.Client.Views.PackPurchaseTaska |
|||
{ |
|||
/// <summary>
|
|||
/// UpdatePurchaseTaskWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class UpdatePurchaseTaskWindow : BWindow |
|||
{ |
|||
public UpdatePurchaseTaskWindow() |
|||
{ |
|||
InitializeComponent(); |
|||
this.Loaded += UpdatePurchaseTaskWindow_Loaded; |
|||
} |
|||
|
|||
private void UpdatePurchaseTaskWindow_Loaded(object sender, RoutedEventArgs e) |
|||
{ |
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
} |
|||
} |
@ -1,5 +1,9 @@ |
|||
{ |
|||
//"BBWYApiHost": "http://localhost:5000", |
|||
"BBWYApiHost": "http://bbwyb.qiyue666.com", |
|||
"MDSApiHost": "http://mdsapi.qiyue666.com" |
|||
"BBWYApiHost": "http://localhost:5000", |
|||
//"BBWYApiHost": "http://bbwyb.qiyue666.com", |
|||
"MDSApiHost": "http://mdsapi.qiyue666.com", |
|||
"BBWYCApiHost": "http://bbwytest.qiyue666.com", |
|||
"QKApiHost": "http://localhost:8080" |
|||
//"QKApiHost": "http://qiku.qiyue666.com" |
|||
|
|||
} |
@ -0,0 +1,40 @@ |
|||
using FreeSql.DataAnnotations; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using System.Xml.Linq; |
|||
|
|||
namespace BBWYB.Server.Model.Db.PurchaseScheme |
|||
{ |
|||
[Table(Name = "orderpurchaserelationinfo", DisableSyncStructure = true)] |
|||
public class OrderPurchaseRelationInfo |
|||
{ |
|||
[Column( IsPrimary = true)] |
|||
public long Id { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购单Id
|
|||
/// </summary>
|
|||
public string PurchaseOrderId { get; set; } |
|||
/// <summary>
|
|||
/// 订单Id
|
|||
/// </summary>
|
|||
public string OrderId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购方案Id
|
|||
/// </summary>
|
|||
public string SchemeId { get; set; } |
|||
/// <summary>
|
|||
/// 采购spu
|
|||
/// </summary>
|
|||
public string PurchaseProductId { get; set; } |
|||
/// <summary>
|
|||
/// 采购sku
|
|||
/// </summary>
|
|||
public string PurchaseSkuId { get; set; } |
|||
} |
|||
} |
Loading…
Reference in new issue