From 0e6a034d5fe4dd5abf6e6611be8968eeab23d415 Mon Sep 17 00:00:00 2001 From: wule Date: Fri, 19 Sep 2025 09:31:34 +0800 Subject: [PATCH] =?UTF-8?q?pxx=E4=B8=8A=E8=B4=A7=E5=8A=9F=E8=83=BD=20temu?= =?UTF-8?q?=E5=A4=87=E8=B4=A7=E7=AE=A1=E7=90=86=E5=8F=AF=E4=BB=A5=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=95=86=E5=93=81=E5=94=AE=E5=90=8E=E7=8E=87=E5=B9=B6?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E5=94=AE=E5=90=8E=E7=8E=87=E5=A4=84=E7=90=86?= =?UTF-8?q?=E5=A4=87=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AllBase/AllBase.csproj | 2 + AllBase/BaseClass.cs | 4 +- .../PDDProdParam/PDDProductUploadParam.cs | 15 + AllBase/Model/Result/KJDDBProduct.cs | 6 + .../Result/PDDResult/PDDChanceProductInfo.cs | 32 + .../Result/PDDResult/PDDProductDetailInfo.cs | 2 +- .../Model/Result/PDDResult/PDDProductInfo.cs | 1 + .../PDDResult/PDDProductTemplateInfo.cs | 87 +- .../Model/Result/PDDResult/PDDSizeSpecInfo.cs | 119 ++ AllBase/Model/Result/TemuGoodsQualityInfo.cs | 18 + AllBase/Model/Result/TemuStockInfo.cs | 8 + .../BLL/BXX/BXXProductManage.cs | 126 +- .../KJD_WebService/BXXProductService.asmx.cs | 12 + .../Model/DBProductResultParam.cs | 3 + TEMUKJD/BaseForms/BaseForm.cs | 15 +- TEMUKJD/KJD.csproj | 9 + .../ProductForms/SaleStockUpForm.Designer.cs | 362 ++-- .../KJDForms/ProductForms/SaleStockUpForm.cs | 24 +- .../ProductForms/SaleStockUpForm.resx | 6 + .../DbProductUserSelectForm.cs | 2 +- .../ProductThirdUserSelectForm.cs | 2 +- .../ShopForms/ReturnPackageDetailForm.cs | 2 +- .../PDDAdminShopLoginForm.Designer.cs | 8 +- .../AdminForms/PDDAdminShopLoginForm.cs | 16 + .../PDDDBProdUserSelectForm.Designer.cs | 1248 ++++++++----- .../PDDDBProdUserSelectForm.cs | 1628 ++++++++++++++--- .../PDDDBProdUserSelectForm.resx | 3 + .../ProductSelectForms/UcAddPrice.Designer.cs | 223 +++ .../PDDForms/ProductSelectForms/UcAddPrice.cs | 202 ++ .../ProductSelectForms/UcAddPrice.resx | 120 ++ .../ShopForms/PDDShopBrowserObject.cs | 93 +- .../ShopForms/PDDShopLoginForm.Designer.cs | 45 +- .../PDDForms/ShopForms/PDDShopLoginForm.cs | 15 +- TEMUKJD/StartUp.cs | 3 + 34 files changed, 3568 insertions(+), 893 deletions(-) create mode 100644 AllBase/Model/Result/PDDResult/PDDChanceProductInfo.cs create mode 100644 AllBase/Model/Result/PDDResult/PDDSizeSpecInfo.cs create mode 100644 TEMUKJD/PDDForms/ProductSelectForms/UcAddPrice.Designer.cs create mode 100644 TEMUKJD/PDDForms/ProductSelectForms/UcAddPrice.cs create mode 100644 TEMUKJD/PDDForms/ProductSelectForms/UcAddPrice.resx diff --git a/AllBase/AllBase.csproj b/AllBase/AllBase.csproj index d154b98..ee8ab38 100644 --- a/AllBase/AllBase.csproj +++ b/AllBase/AllBase.csproj @@ -194,11 +194,13 @@ + + diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index 7171425..f3436fe 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,8 +27,8 @@ namespace AllBase /// /// 版本ID /// - public static int VersionCount = 589; - //public static int VersionCount = 589; + public static int VersionCount = 593; + //public static int VersionCount = 593; /// /// 版本号 diff --git a/AllBase/Model/Param/PDDProdParam/PDDProductUploadParam.cs b/AllBase/Model/Param/PDDProdParam/PDDProductUploadParam.cs index be11317..abd438c 100644 --- a/AllBase/Model/Param/PDDProdParam/PDDProductUploadParam.cs +++ b/AllBase/Model/Param/PDDProdParam/PDDProductUploadParam.cs @@ -185,6 +185,17 @@ namespace AllBase.Model.Param.PDDProdParam public string value { get; set; } public string value_unit { get; set; } public string content { get; set; } + + } + + public class goods_spec_property_param : goods_property_param + { + // 以下为sku属性 + public long? parent_spec_id { get; set; } + public long? spec_id { get; set; } + public string note { get; set; } + public string img_url { get; set; } + public int? group_id { get; set; } } public class gallery_param @@ -223,9 +234,11 @@ namespace AllBase.Model.Param.PDDProdParam public class sku_param { public long? id { get; set; } + public long? sku_id { get; set; } public int? limit_quantity { get; set; } public string out_sku_sn { get; set; } public int? is_onsale { get; set; } + public int? pre_sale_time { get; set; } public string multi_price_in_yuan { get { return (multi_price.ParseToInt() * 0.01).ParseToString(); } @@ -240,8 +253,10 @@ namespace AllBase.Model.Param.PDDProdParam public int? price { get; set; } public int? quantity_delta { get; set; } public string thumb_url { get; set; } + public long? thumb_url_file_id { get; set; } public int? weight { get; set; } public List spec { get; set; } + public object length { get; set; } public object oversea_sku { get; set; } public string sku_srv_templates { get; set; } public List shipment_limit_second_list { get; set; } diff --git a/AllBase/Model/Result/KJDDBProduct.cs b/AllBase/Model/Result/KJDDBProduct.cs index 88fc845..d4c99c4 100644 --- a/AllBase/Model/Result/KJDDBProduct.cs +++ b/AllBase/Model/Result/KJDDBProduct.cs @@ -15,8 +15,11 @@ namespace AllBase.Model.Result public string from_shop_id { get; set; } public string spu_id { get; set; } public string skc_id { get; set; } + public string main_cat_id { get; set; } public string cat_id { get; set; } + public string main_cat_name { get; set; } public string cat_name { get; set; } + public string price_text { get; set; } public string ext_code { get; set; } public string product_name { get; set; } public string product_json { get; set; } @@ -33,5 +36,8 @@ namespace AllBase.Model.Result public string head_words { get; set; } public string end_words { get; set; } public string fission_words { get; set; } + + // 是否拼多多上传成功 + public bool isPddUpLoad { get; set; } = false; } } diff --git a/AllBase/Model/Result/PDDResult/PDDChanceProductInfo.cs b/AllBase/Model/Result/PDDResult/PDDChanceProductInfo.cs new file mode 100644 index 0000000..4cba65a --- /dev/null +++ b/AllBase/Model/Result/PDDResult/PDDChanceProductInfo.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AllBase.Model.Result.PDDResult +{ + /// + /// 机会商品列表 + /// + public class PDDChanceProductInfo + { + public string chance_id { get; set; } //4e456b7ed5c30be0cfdb979c42e55715 + public string keywords { get; set; } //背心吊带女珍珠性感 + public int? refer_price { get; set; } //9310 + public object mall_id { get; set; } //null + public int? price_label { get; set; } //0 + public string pic_url { get; set; } //https://img.pddpic.com/mms-material-img/2025-04-21/8bde3c11-aeef-424d-88df-0ec7a73db26e.jpeg.a.jpeg + public object is_collection { get; set; } //null + public int? hot_index { get; set; } //88 + public int? mms_hot_index { get; set; } //88 + public object mms_oprty_index { get; set; } //null + public int? mms_index_target { get; set; } //0 + public List labels { get; set; } //[] + public List gallery_img_url_list { get; set; } //["https://img.pddpic.com/mms-material-img/2025-04-21/8bde3c11-aeef-424d-88df-0ec7a73db26e.jpeg.a.jpeg","https://img.pddpic.com/mms-material-img/2025-04-21/964e12a2-c6b1-43fa-ac99-c01241db3c85.jpeg.a.jpeg","https://img.pddpic.com/mms-material-img/2025-04-21/01d5363a-0121-4e7f-a0dd-3adf58d81ca6.jpeg.a.jpeg","https://img.pddpic.com/mms-material-img/2025-04-21/f9173580-d8ae-437f-a45c-2e40cbec2cba.jpeg.a.jpeg","https://img.pddpic.com/mms-material-img/2025-04-21/51654697-27ad-490f-9108-f40f08dc5535.jpeg.a.jpeg"] + public int? potential_index { get; set; } //7480 + public int? cat_id_1 { get; set; } //17412 + public int? cat_id_2 { get; set; } //17421 + public int? cat_id_3 { get; set; } //17445 + } +} diff --git a/AllBase/Model/Result/PDDResult/PDDProductDetailInfo.cs b/AllBase/Model/Result/PDDResult/PDDProductDetailInfo.cs index bccf320..7e1fa2c 100644 --- a/AllBase/Model/Result/PDDResult/PDDProductDetailInfo.cs +++ b/AllBase/Model/Result/PDDResult/PDDProductDetailInfo.cs @@ -244,7 +244,7 @@ namespace AllBase.Model.Result.PDDResult public int? reserve_quantity { get; set; } public int? weight { get; set; } public string thumb_url { get; set; } - public object thumb_url_file_id { get; set; } + public long? thumb_url_file_id { get; set; } public object thumb_url_status { get; set; } public object thumb_url_is_deleted { get; set; } public int? quantity_delta { get; set; } diff --git a/AllBase/Model/Result/PDDResult/PDDProductInfo.cs b/AllBase/Model/Result/PDDResult/PDDProductInfo.cs index 96d09ca..dd6156b 100644 --- a/AllBase/Model/Result/PDDResult/PDDProductInfo.cs +++ b/AllBase/Model/Result/PDDResult/PDDProductInfo.cs @@ -9,6 +9,7 @@ namespace AllBase.Model.Result.PDDResult public class PDDProductInfo { public PDDProductDetailInfo detail { get; set; } + public PDDSizeSpecInfo size { get; set; } public PDDProductDecorationInfo decoration { get; set; } public PDDProductPropertyInfo property { get; set; } } diff --git a/AllBase/Model/Result/PDDResult/PDDProductTemplateInfo.cs b/AllBase/Model/Result/PDDResult/PDDProductTemplateInfo.cs index bccf011..d82f8a6 100644 --- a/AllBase/Model/Result/PDDResult/PDDProductTemplateInfo.cs +++ b/AllBase/Model/Result/PDDResult/PDDProductTemplateInfo.cs @@ -28,12 +28,97 @@ namespace AllBase.Model.Result.PDDResult public int? channel { get; set; } public int? type { get; set; } public List modules { get; set; } - public object spec_module { get; set; } + public spec_module_item spec_module { get; set; } public bool? is_spec { get; set; } + public bool? can_edit { get; set; } + public bool? has_change { get; set; } public int? max_sku_num { get; set; } public bool? custom_upload_pic { get; set; } } + public class spec_module_item + { + public long? id { get; set; } + public List properties { get; set; } + public List custom_properties { get; set; } + public List removed_properties { get; set; } + } + + public class spec_module_property_item + { + public long? id { get; set; } // 471233 + public string name_alias { get; set; } // "颜色分类" + public int? pid { get; set; } // 232 + public string bottom_tip { get; set; } // "选择标准颜色可增加搜索/导购机会,标准颜色还可填写颜色备注信息(偏深、偏亮等)!" + public List values { get; set; } + public List value_ids { get; set; } + public List goods_properties { get; set; } + public int? ref_pid { get; set; } // 843 + + public int? input_max_num { get; set; } // 100 + public bool? can_note { get; set; } // true + public long? spec_id { get; set; } // 8640 + public bool? upload_pic { get; set; } // true + public int? feature { get; set; } // 1 + public List custom_goods_properties { get; set; } + + + public bool? is_all_value { get; set; } // true, + public int? value_type { get; set; } // 0, + public int? control_type { get; set; } // 3, + public string value_unit { get; set; } // "", + public int? value_precision { get; set; } // 0, + public string max_value { get; set; } // "64", + public string min_value { get; set; } // "", + public int? sort_order { get; set; } // 0, + public bool? value_can_sort { get; set; } // true, + public bool? required { get; set; } // false, + public long? choose_max_num { get; set; } // 2147483647, + public string spec_tip { get; set; } // "", + public bool? is_key { get; set; } // false, + public int? mask_rule_type { get; set; } // 0, + public int? show_type { get; set; } // 0, + public List template_property_value_parent_vos { get; set; } // [], + public int? parent_template_pid { get; set; } // 0, + public bool? unit_same { get; set; } // false + + + } + + public class spec_module_goods_property_item + { + public string p_unit { get; set; } // "" + public int? vid { get; set; } // 60465 + public string v_value { get; set; } // "黑色" + public int? parent_spec_id { get; set; } // 8640 + public long? spec_id { get; set; } // 49751 + public string note { get; set; } // "" + public string img_url { get; set; } // "" + public group_vo_item group_vo { get; set; } + } + + public class group_vo_item + { + public int? id { get; set; } // 2 + public string name { get; set; } // "灰色系" + } + + public class spec_module_property_value_item + { + public int? id { get; set; } // 0 + public int? vid { get; set; } // 59500 + public string value { get; set; } // "白色" + public value_group_item group { get; set; } + public string extend_info { get; set; } // "(255,255,255,1)" + public long? spec_id { get; set; } // 54780 + } + + public class value_group_item + { + public int? id { get; set; } // 1 + public string name { get; set; } // "白色系" + } + public class pdd_module_item { public int? id { get; set; } diff --git a/AllBase/Model/Result/PDDResult/PDDSizeSpecInfo.cs b/AllBase/Model/Result/PDDResult/PDDSizeSpecInfo.cs new file mode 100644 index 0000000..a1f0acc --- /dev/null +++ b/AllBase/Model/Result/PDDResult/PDDSizeSpecInfo.cs @@ -0,0 +1,119 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AllBase.Model.Result.PDDResult +{ + //public class PDDSizeSpecInfo + //{ + // public long? id { get; set; } + // public int? extendType { get; set; } + //} + //public class SizeContentItem + //{ + // public string picUrl { get; set; } + //} + + public class GroupsItem + { + /// + /// + /// + public int? id { get; set; } + /// + /// 中国码 + /// + public string name { get; set; } + /// + /// + /// + public bool? required { get; set; } + } + + public class ElementItem + { + /// + /// + /// + public int? id { get; set; } + /// + /// 肩宽(cm) + /// + public string name { get; set; } + /// + /// + /// + public bool? required { get; set; } + } + + public class MetaItem + { + /// + /// + /// + public List groups { get; set; } + /// + /// + /// + public List elements { get; set; } + /// + /// + /// + public List batchableElementIds { get; set; } + } + + + public class RecordItem + { + /// + /// + /// + public Dictionary values { get; set; } + } + + public class ContentItem + { + /// + /// + /// + public MetaItem meta { get; set; } + /// + /// + /// + public List records { get; set; } + /// + /// + /// + public string picUrl { get; set; } + } + + public class PDDSizeSpecInfo + { + /// + /// + /// + public long? id { get; set; } + /// + /// + /// + public int? extendType { get; set; } + /// + /// + /// + public ContentItem content { get; set; } + /// + /// + /// + public int? classId { get; set; } + /// + /// + /// + public bool? reusable { get; set; } + /// + /// + /// + public int? status { get; set; } + } +} diff --git a/AllBase/Model/Result/TemuGoodsQualityInfo.cs b/AllBase/Model/Result/TemuGoodsQualityInfo.cs index bd88dd6..b6eeced 100644 --- a/AllBase/Model/Result/TemuGoodsQualityInfo.cs +++ b/AllBase/Model/Result/TemuGoodsQualityInfo.cs @@ -18,15 +18,33 @@ namespace AllBase.Model.Result public string carouselImageUrl { get; set; } public long? cateId { get; set; } public string categoryName { get; set; } + /// + /// 品质分 + /// public decimal? goodsAfsScore { get; set; } + /// + /// 品质售后率 + /// public decimal? qltyAfsOrdrRate { get; set; } + /// + /// 品质售后次数 + /// public int? qltyAfsOrdCnt { get; set; } public decimal? sizeAfsOrdrRate { get; set; } public decimal? largeSizeAfsOrdrRate { get; set; } public decimal? smallSizeAfsOrdrRate { get; set; } + /// + /// 尺码售后次数 + /// public decimal? sizeAfsOrdrCnt { get; set; } public List problAfsItemList { get; set; } + /// + /// 评价数 + /// public decimal? revCnt { get; set; } + /// + /// 评价分 + /// public decimal? avgRevScr { get; set; } public decimal? trueRevRate { get; set; } public decimal? largeRevRate { get; set; } diff --git a/AllBase/Model/Result/TemuStockInfo.cs b/AllBase/Model/Result/TemuStockInfo.cs index d213272..5b4e55a 100644 --- a/AllBase/Model/Result/TemuStockInfo.cs +++ b/AllBase/Model/Result/TemuStockInfo.cs @@ -119,6 +119,14 @@ namespace AllBase.Model.Result /// public decimal? goodsAfsScore { get; set; } = null; /// + /// 品质售后率 + /// + public decimal? qltyAfsOrdrRate { get; set; } = null; + /// + /// 品质售后次数 + /// + public int? qltyAfsOrdCnt { get; set; } = null; + /// /// 获取评价分错误 /// public string getAfsScoreError { get; set; } = ""; diff --git a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs index 86af603..941bec1 100644 --- a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs +++ b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs @@ -27,6 +27,9 @@ namespace KJD_Web.BLL.BXX string from_shop_id = RegexUtils.GetStringQuery(ref inputData, "from_shop_id"); string spu_id = RegexUtils.GetStringQuery(ref inputData, "spu_id"); string skc_id = RegexUtils.GetStringQuery(ref inputData, "skc_id"); + string price_text = RegexUtils.GetStringQuery(ref inputData, "price_text"); + string main_cat_id = RegexUtils.GetStringQuery(ref inputData, "main_cat_id"); + string main_cat_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "main_cat_name"))?.Replace("'", "\\'"); string cat_id = RegexUtils.GetStringQuery(ref inputData, "cat_id"); string cat_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "cat_name"))?.Replace("'", "\\'"); string ext_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "ext_code"))?.Replace("'", "\\'"); @@ -45,9 +48,11 @@ namespace KJD_Web.BLL.BXX MysqlUtils mySql = new MysqlUtils(conn); string sql = ""; - sql = "insert into bxx.product (from_shop_id,spu_id,skc_id,cat_id,cat_name,product_name,ext_code,main_img,product_json,size_json,notes,add_time,mdy_time) " + - "values ('" + from_shop_id + "','" + spu_id + "','" + skc_id + "','" + cat_id + "','" + cat_name + "','" + product_name + "','" + - ext_code + "','" + main_img + "','" + product_json + "','" + size_json + "','" + notes + "','" + + sql = "insert into bxx.product (from_shop_id,spu_id,skc_id,main_cat_id,main_cat_name,cat_id,cat_name,price_text," + + "product_name,ext_code,main_img,product_json,size_json,notes,add_time,mdy_time) " + + "values ('" + from_shop_id + "','" + spu_id + "','" + skc_id + "','" + main_cat_id + "','" + main_cat_name + "','" + + cat_id + "','" + cat_name + "','" + price_text + "','" + product_name + "','" + ext_code + "','" + main_img + "','" + + product_json + "','" + size_json + "','" + notes + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');"; var rst = mySql.ExecuteNonQuery(sql); @@ -78,6 +83,9 @@ namespace KJD_Web.BLL.BXX string from_shop_id = RegexUtils.GetStringQuery(ref inputData, "from_shop_id"); string spu_id = RegexUtils.GetStringQuery(ref inputData, "spu_id"); string skc_id = RegexUtils.GetStringQuery(ref inputData, "skc_id"); + string price_text = RegexUtils.GetStringQuery(ref inputData, "price_text"); + string main_cat_id = RegexUtils.GetStringQuery(ref inputData, "main_cat_id"); + string main_cat_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "main_cat_name"))?.Replace("'", "\\'"); string cat_id = RegexUtils.GetStringQuery(ref inputData, "cat_id"); string cat_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "cat_name"))?.Replace("'", "\\'"); string ext_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "ext_code"))?.Replace("'", "\\'"); @@ -99,10 +107,16 @@ namespace KJD_Web.BLL.BXX sql = "update bxx.product set"; if (from_shop_id != null) sql += " from_shop_id='" + from_shop_id + "',"; + if (main_cat_id != null) + sql += " main_cat_id='" + main_cat_id + "',"; + if (main_cat_name != null) + sql += " main_cat_name='" + main_cat_name + "',"; if (cat_id != null) sql += " cat_id='" + cat_id + "',"; if (cat_name != null) sql += " cat_name='" + cat_name + "',"; + if (price_text != null) + sql += " price_text='" + price_text + "',"; if (product_name != null) sql += " product_name='" + product_name + "',"; if (ext_code != null) @@ -191,10 +205,10 @@ namespace KJD_Web.BLL.BXX if (isDetail) sql = "select * from bxx.product p where 1=1"; else if (string.IsNullOrEmpty(get_select_count)) - sql = "select p.id,p.from_shop_id,p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img,p.notes," + + sql = "select p.id,p.from_shop_id,p.spu_id,p.skc_id,p.main_cat_id,p.main_cat_name,p.cat_id,p.cat_name,p.price_text,p.ext_code,p.product_name,p.main_img,p.notes," + "p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words from bxx.product p where 1=1"; else - sql = "SELECT p.id,p.from_shop_id,p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img,p.notes," + + sql = "SELECT p.id,p.from_shop_id,p.spu_id,p.skc_id,p.main_cat_id,p.main_cat_name,p.cat_id,p.cat_name,p.price_text,p.ext_code,p.product_name,p.main_img,p.notes," + "p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,COUNT(s.id) AS select_count " + "FROM bxx.product p LEFT JOIN bxx.product_select s ON p.id=s.out_product_id AND s.shop_id='" + select_shop_id + "' " + "WHERE 1=1"; @@ -267,6 +281,108 @@ namespace KJD_Web.BLL.BXX return "{\"code\":19999,\"msg\":\"输入为空\"}"; } + public string GetProductListRandom(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); + string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); + if (time1 != EncrypUtil.Encryption(time)) + return "{\"code\":50000,\"msg\":\"校验失败\"}"; + + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); + var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'"); + var is_detail = RegexUtils.GetStringQuery(ref inputData, "is_detail")?.Replace("'", "\\'"); + + int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); + int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + + string sql = "select count(id) from bxx.product p where 1=1"; + + string where = ""; + sql += where; + + var count = mySql.ExecuteRowCount(sql); + + DataTable dt; + if (count == 0) + { + dt = new DataTable(); + } + else + { + if (is_detail == "true") + sql = "select * from bxx.product p where 1=1"; + else + sql = "select p.id,p.from_shop_id,p.spu_id,p.skc_id,p.main_cat_id,p.main_cat_name,p.cat_id,p.cat_name,p.price_text,p.ext_code,p.product_name,p.main_img,p.notes," + + "p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words from bxx.product p where 1=1"; + + //where子句 + sql += where; + + sql += " ORDER BY RAND()"; + sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size; + dt = mySql.ExecuteDataTable(sql); + } + + mySql.Close(); + if (dt != null) + { + try + { + List productLst = new List(); + foreach (DataRow row in dt.Rows) + { + DBProductResultParam prod = new DBProductResultParam + { + id = Convert.ToInt32(row["id"]), + from_shop_id = row["from_shop_id"].ToString(), + skc_id = row["skc_id"].ToString(), + spu_id = row["spu_id"].ToString(), + cat_id = row["cat_id"].ToString(), + cat_name = row["cat_name"].ToString(), + main_cat_id = row["main_cat_id"].ToString(), + main_cat_name = row["main_cat_name"].ToString(), + price_text = row["price_text"].ToString(), + product_name = row["product_name"].ToString(), + main_img = row["main_img"].ToString(), + ext_code = row["ext_code"].ToString(), + //product_json = row["product_json"].ToString(), + //size_json = row["size_json"].ToString(), + add_time = Convert.ToDateTime(row["add_time"]), + mdy_time = Convert.ToDateTime(row["mdy_time"]), + notes = row["notes"].ToString(), + select_total_count = row["select_total_count"].ParseToInt(), + end_words = row["end_words"].ParseToString(), + fission_words = row["fission_words"].ParseToString(), + head_words = row["head_words"].ParseToString(), + }; + if (is_detail == "true") + { + prod.product_json = row["product_json"].ToString(); + prod.size_json = row["size_json"].ToString(); + } + productLst.Add(prod); + } + var data = JsonUtils.SerializerObjectToString(productLst); + return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; + } + catch (Exception ex) + { + return "{\"code\":500,\"msg\":\"" + ex.Message + "\",\"data\":[],\"count\":" + 0 + "}"; + } + } + else + { + return "{\"code\":500,\"msg\":\"" + mySql.Message + "\",\"data\":[],\"count\":" + 0 + "}"; + } + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + public string DelDbProd(string inputData) { if (!string.IsNullOrEmpty(inputData)) diff --git a/KJDService/KJD_WebService/BXXProductService.asmx.cs b/KJDService/KJD_WebService/BXXProductService.asmx.cs index 18b90f1..10e8b2e 100644 --- a/KJDService/KJD_WebService/BXXProductService.asmx.cs +++ b/KJDService/KJD_WebService/BXXProductService.asmx.cs @@ -72,6 +72,18 @@ namespace KJD_Web Context.Response.End(); } + [WebMethod] + public void get_product_list_random() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetProductListRandom(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + [WebMethod] public void add_product() { diff --git a/KJDService/KJD_WebService/Model/DBProductResultParam.cs b/KJDService/KJD_WebService/Model/DBProductResultParam.cs index 7f89550..cf6ee1e 100644 --- a/KJDService/KJD_WebService/Model/DBProductResultParam.cs +++ b/KJDService/KJD_WebService/Model/DBProductResultParam.cs @@ -14,8 +14,11 @@ namespace KJD_Web.Model public string from_shop_id { get; set; } = ""; public string spu_id { get; set; } public string skc_id { get; set; } + public string main_cat_id { get; set; } public string cat_id { get; set; } + public string main_cat_name { get; set; } public string cat_name { get; set; } + public string price_text { get; set; } public string change_cat_id { get; set; } public string change_cat_name { get; set; } public string ext_code { get; set; } diff --git a/TEMUKJD/BaseForms/BaseForm.cs b/TEMUKJD/BaseForms/BaseForm.cs index adf66a7..ee97bf9 100644 --- a/TEMUKJD/BaseForms/BaseForm.cs +++ b/TEMUKJD/BaseForms/BaseForm.cs @@ -13,6 +13,16 @@ namespace TemuKJD.BaseForms { public partial class BaseForm : Form { + public bool IsSetFontScaleNone { get; set; } = true; + public float FormDpi + { + get + { + return dpi; + } + } + private float dpi = 96; + public BaseForm() { InitializeComponent(); @@ -22,12 +32,13 @@ namespace TemuKJD.BaseForms { using (Graphics graphics = Graphics.FromHwnd(IntPtr.Zero)) { - float dpi = graphics.DpiX; + dpi = graphics.DpiX; // 或者使用 graphics.DpiY 获取垂直方向的DPI // float dpi = graphics.DpiY; // Console.WriteLine("Screen DPI: " + dpi); // winform程序会闪退 - SetFont(this, dpi); + if (IsSetFontScaleNone) + SetFont(this, dpi); } } diff --git a/TEMUKJD/KJD.csproj b/TEMUKJD/KJD.csproj index ee2f14d..6be2327 100644 --- a/TEMUKJD/KJD.csproj +++ b/TEMUKJD/KJD.csproj @@ -455,6 +455,12 @@ PDDThirdProdSelectAddShopForm.cs + + UserControl + + + UcAddPrice.cs + Form @@ -890,6 +896,9 @@ PDDThirdProdSelectAddShopForm.cs + + UcAddPrice.cs + CefForm.cs diff --git a/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.Designer.cs index 36f111f..5005131 100644 --- a/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.Designer.cs @@ -30,10 +30,11 @@ namespace TemuKJD.KJDForms.ProductForms private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.panel4 = new System.Windows.Forms.Panel(); @@ -42,7 +43,6 @@ namespace TemuKJD.KJDForms.ProductForms this.label20 = new System.Windows.Forms.Label(); this.txtMinQualityScore = new System.Windows.Forms.TextBox(); this.chkMinQualityScore = new System.Windows.Forms.CheckBox(); - this.ucCheckBox1 = new TemuKJD.UserComponent.UcCheckBox(this.components); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.lblMinBound = new System.Windows.Forms.Label(); this.txtMinBound = new System.Windows.Forms.TextBox(); @@ -59,6 +59,7 @@ namespace TemuKJD.KJDForms.ProductForms this.label17 = new System.Windows.Forms.Label(); this.label18 = new System.Windows.Forms.Label(); this.label19 = new System.Windows.Forms.Label(); + this.ucCheckBox1 = new TemuKJD.UserComponent.UcCheckBox(this.components); this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.btnCancelSubPurchaseOrder = new DevComponents.DotNetBar.PanelEx(); this.panelEx2 = new DevComponents.DotNetBar.PanelEx(); @@ -124,6 +125,10 @@ namespace TemuKJD.KJDForms.ProductForms this.btnStopAdd = new DevComponents.DotNetBar.PanelEx(); this.chkLimited = new System.Windows.Forms.CheckBox(); this.dgvStock = new TemuKJD.UserComponent.DataGridViewEx(); + this.splitContainer4 = new System.Windows.Forms.SplitContainer(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); + this.btnClear = new DevComponents.DotNetBar.PanelEx(); this.colUpId = new System.Windows.Forms.DataGridViewLinkColumn(); this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colSupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -144,12 +149,13 @@ namespace TemuKJD.KJDForms.ProductForms this.colSalesInventoryNum = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colWaitReceiveNum = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colQualityScore = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colQualityRate = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colQualityCount = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colNeedStockUp = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.splitContainer4 = new System.Windows.Forms.SplitContainer(); - this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); - this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); - this.btnClear = new DevComponents.DotNetBar.PanelEx(); + this.txtMaxQualityRate = new System.Windows.Forms.TextBox(); + this.chkMaxQualityRate = new System.Windows.Forms.CheckBox(); + this.label10 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -201,7 +207,7 @@ namespace TemuKJD.KJDForms.ProductForms // splitContainer1.Panel2 // this.splitContainer1.Panel2.Controls.Add(this.splitContainer3); - this.splitContainer1.Size = new System.Drawing.Size(1368, 589); + this.splitContainer1.Size = new System.Drawing.Size(1350, 589); this.splitContainer1.SplitterDistance = 120; this.splitContainer1.TabIndex = 9; // @@ -212,6 +218,9 @@ namespace TemuKJD.KJDForms.ProductForms | System.Windows.Forms.AnchorStyles.Right))); this.ucGroupBoxEx4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucGroupBoxEx4.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx4.Controls.Add(this.txtMaxQualityRate); + this.ucGroupBoxEx4.Controls.Add(this.chkMaxQualityRate); + this.ucGroupBoxEx4.Controls.Add(this.label10); this.ucGroupBoxEx4.Controls.Add(this.panel4); this.ucGroupBoxEx4.Controls.Add(this.txtMinQualityScore); this.ucGroupBoxEx4.Controls.Add(this.chkMinQualityScore); @@ -230,7 +239,7 @@ namespace TemuKJD.KJDForms.ProductForms this.ucGroupBoxEx4.Controls.Add(this.ucCheckBox1); this.ucGroupBoxEx4.Location = new System.Drawing.Point(417, 2); this.ucGroupBoxEx4.Name = "ucGroupBoxEx4"; - this.ucGroupBoxEx4.Size = new System.Drawing.Size(949, 120); + this.ucGroupBoxEx4.Size = new System.Drawing.Size(931, 120); this.ucGroupBoxEx4.TabIndex = 666; this.ucGroupBoxEx4.TabStop = false; this.ucGroupBoxEx4.Text = "创建备货单"; @@ -240,7 +249,7 @@ namespace TemuKJD.KJDForms.ProductForms this.panel4.Controls.Add(this.rbTodaySaleCount); this.panel4.Controls.Add(this.rbSevenDaysAvgSaleCount); this.panel4.Controls.Add(this.label20); - this.panel4.Location = new System.Drawing.Point(521, 27); + this.panel4.Location = new System.Drawing.Point(495, 27); this.panel4.Name = "panel4"; this.panel4.Size = new System.Drawing.Size(237, 23); this.panel4.TabIndex = 734; @@ -279,7 +288,7 @@ namespace TemuKJD.KJDForms.ProductForms // // txtMinQualityScore // - this.txtMinQualityScore.Location = new System.Drawing.Point(785, 85); + this.txtMinQualityScore.Location = new System.Drawing.Point(737, 61); this.txtMinQualityScore.Margin = new System.Windows.Forms.Padding(0); this.txtMinQualityScore.Name = "txtMinQualityScore"; this.txtMinQualityScore.Size = new System.Drawing.Size(32, 23); @@ -297,7 +306,7 @@ namespace TemuKJD.KJDForms.ProductForms this.chkMinQualityScore.FlatAppearance.CheckedBackColor = System.Drawing.Color.Blue; this.chkMinQualityScore.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Blue; this.chkMinQualityScore.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Blue; - this.chkMinQualityScore.Location = new System.Drawing.Point(703, 86); + this.chkMinQualityScore.Location = new System.Drawing.Point(655, 62); this.chkMinQualityScore.Margin = new System.Windows.Forms.Padding(15, 3, 3, 3); this.chkMinQualityScore.Name = "chkMinQualityScore"; this.chkMinQualityScore.Size = new System.Drawing.Size(87, 21); @@ -305,28 +314,15 @@ namespace TemuKJD.KJDForms.ProductForms this.chkMinQualityScore.Text = "品质分低于"; this.chkMinQualityScore.UseVisualStyleBackColor = false; // - // ucCheckBox1 - // - this.ucCheckBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ucCheckBox1.AutoSize = true; - this.ucCheckBox1.Location = new System.Drawing.Point(849, 58); - this.ucCheckBox1.Name = "ucCheckBox1"; - this.ucCheckBox1.Size = new System.Drawing.Size(87, 21); - this.ucCheckBox1.TabIndex = 713; - this.ucCheckBox1.Text = "使用新接口"; - this.ucCheckBox1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.ucCheckBox1.UseVisualStyleBackColor = true; - this.ucCheckBox1.CheckedChanged += new System.EventHandler(this.chkNewService_CheckedChanged); - // // flowLayoutPanel1 // this.flowLayoutPanel1.Controls.Add(this.lblMinBound); this.flowLayoutPanel1.Controls.Add(this.txtMinBound); this.flowLayoutPanel1.Controls.Add(this.label15); this.flowLayoutPanel1.Controls.Add(this.chkIfLessMakeZero); - this.flowLayoutPanel1.Location = new System.Drawing.Point(240, 83); + this.flowLayoutPanel1.Location = new System.Drawing.Point(217, 83); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(453, 31); + this.flowLayoutPanel1.Size = new System.Drawing.Size(417, 31); this.flowLayoutPanel1.TabIndex = 702; // // lblMinBound @@ -384,7 +380,7 @@ namespace TemuKJD.KJDForms.ProductForms // // txtScale2 // - this.txtScale2.Location = new System.Drawing.Point(452, 55); + this.txtScale2.Location = new System.Drawing.Point(426, 55); this.txtScale2.Margin = new System.Windows.Forms.Padding(0); this.txtScale2.Name = "txtScale2"; this.txtScale2.Size = new System.Drawing.Size(25, 23); @@ -394,7 +390,7 @@ namespace TemuKJD.KJDForms.ProductForms // // label102 // - this.label102.Location = new System.Drawing.Point(171, 58); + this.label102.Location = new System.Drawing.Point(145, 58); this.label102.Name = "label102"; this.label102.Size = new System.Drawing.Size(283, 17); this.label102.TabIndex = 679; @@ -403,7 +399,7 @@ namespace TemuKJD.KJDForms.ProductForms // // txtScale1 // - this.txtScale1.Location = new System.Drawing.Point(452, 27); + this.txtScale1.Location = new System.Drawing.Point(426, 27); this.txtScale1.Margin = new System.Windows.Forms.Padding(0); this.txtScale1.Name = "txtScale1"; this.txtScale1.Size = new System.Drawing.Size(25, 23); @@ -416,7 +412,7 @@ namespace TemuKJD.KJDForms.ProductForms this.panelEx3.CanvasColor = System.Drawing.SystemColors.Control; this.panelEx3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.panelEx3.DisabledBackColor = System.Drawing.Color.Empty; - this.panelEx3.Location = new System.Drawing.Point(27, 71); + this.panelEx3.Location = new System.Drawing.Point(21, 71); this.panelEx3.Name = "panelEx3"; this.panelEx3.Size = new System.Drawing.Size(115, 23); this.panelEx3.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -442,7 +438,7 @@ namespace TemuKJD.KJDForms.ProductForms this.btnListWarehouse.Cursor = System.Windows.Forms.Cursors.Hand; this.btnListWarehouse.DisabledBackColor = System.Drawing.Color.Empty; this.btnListWarehouse.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnListWarehouse.Location = new System.Drawing.Point(27, 32); + this.btnListWarehouse.Location = new System.Drawing.Point(21, 32); this.btnListWarehouse.Name = "btnListWarehouse"; this.btnListWarehouse.Size = new System.Drawing.Size(115, 23); this.btnListWarehouse.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -467,7 +463,7 @@ namespace TemuKJD.KJDForms.ProductForms this.btnStartStockUp.Cursor = System.Windows.Forms.Cursors.Hand; this.btnStartStockUp.DisabledBackColor = System.Drawing.Color.Empty; this.btnStartStockUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnStartStockUp.Location = new System.Drawing.Point(847, 32); + this.btnStartStockUp.Location = new System.Drawing.Point(829, 32); this.btnStartStockUp.Name = "btnStartStockUp"; this.btnStartStockUp.Size = new System.Drawing.Size(80, 23); this.btnStartStockUp.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -487,7 +483,7 @@ namespace TemuKJD.KJDForms.ProductForms // // label101 // - this.label101.Location = new System.Drawing.Point(171, 30); + this.label101.Location = new System.Drawing.Point(145, 30); this.label101.Name = "label101"; this.label101.Size = new System.Drawing.Size(283, 17); this.label101.TabIndex = 678; @@ -497,7 +493,7 @@ namespace TemuKJD.KJDForms.ProductForms // label16 // this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(475, 30); + this.label16.Location = new System.Drawing.Point(449, 30); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(44, 17); this.label16.TabIndex = 693; @@ -506,7 +502,7 @@ namespace TemuKJD.KJDForms.ProductForms // label17 // this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(475, 58); + this.label17.Location = new System.Drawing.Point(449, 58); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(44, 17); this.label17.TabIndex = 694; @@ -515,7 +511,7 @@ namespace TemuKJD.KJDForms.ProductForms // label18 // this.label18.AutoSize = true; - this.label18.Location = new System.Drawing.Point(170, 88); + this.label18.Location = new System.Drawing.Point(149, 88); this.label18.Name = "label18"; this.label18.Size = new System.Drawing.Size(80, 17); this.label18.TabIndex = 712; @@ -524,12 +520,25 @@ namespace TemuKJD.KJDForms.ProductForms // label19 // this.label19.AutoSize = true; - this.label19.Location = new System.Drawing.Point(817, 88); + this.label19.Location = new System.Drawing.Point(769, 64); this.label19.Name = "label19"; this.label19.Size = new System.Drawing.Size(44, 17); this.label19.TabIndex = 725; this.label19.Text = "不备货"; // + // ucCheckBox1 + // + this.ucCheckBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.ucCheckBox1.AutoSize = true; + this.ucCheckBox1.Location = new System.Drawing.Point(831, 58); + this.ucCheckBox1.Name = "ucCheckBox1"; + this.ucCheckBox1.Size = new System.Drawing.Size(87, 21); + this.ucCheckBox1.TabIndex = 713; + this.ucCheckBox1.Text = "使用新接口"; + this.ucCheckBox1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.ucCheckBox1.UseVisualStyleBackColor = true; + this.ucCheckBox1.CheckedChanged += new System.EventHandler(this.chkNewService_CheckedChanged); + // // ucGroupBoxEx3 // this.ucGroupBoxEx3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -698,7 +707,7 @@ namespace TemuKJD.KJDForms.ProductForms // splitContainer3.Panel2 // this.splitContainer3.Panel2.Controls.Add(this.splitContainer4); - this.splitContainer3.Size = new System.Drawing.Size(1368, 465); + this.splitContainer3.Size = new System.Drawing.Size(1350, 465); this.splitContainer3.SplitterDistance = 435; this.splitContainer3.TabIndex = 1; // @@ -726,7 +735,7 @@ namespace TemuKJD.KJDForms.ProductForms this.splitContainer2.Panel2.Controls.Add(this.ucGroupBoxEx99); this.splitContainer2.Panel2.Controls.Add(this.dgvStock); this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0); - this.splitContainer2.Size = new System.Drawing.Size(1368, 435); + this.splitContainer2.Size = new System.Drawing.Size(1350, 435); this.splitContainer2.SplitterDistance = 280; this.splitContainer2.TabIndex = 0; // @@ -813,18 +822,18 @@ namespace TemuKJD.KJDForms.ProductForms // this.dgvShop.AllowUserToAddRows = false; this.dgvShop.AllowUserToDeleteRows = false; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle6.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6; this.dgvShop.BackgroundColor = System.Drawing.Color.White; this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7; this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colSelect, @@ -931,7 +940,7 @@ namespace TemuKJD.KJDForms.ProductForms this.ucGroupBoxEx99.Controls.Add(this.chkLimited); this.ucGroupBoxEx99.Location = new System.Drawing.Point(296, 46); this.ucGroupBoxEx99.Name = "ucGroupBoxEx99"; - this.ucGroupBoxEx99.Size = new System.Drawing.Size(760, 180); + this.ucGroupBoxEx99.Size = new System.Drawing.Size(742, 180); this.ucGroupBoxEx99.TabIndex = 470; this.ucGroupBoxEx99.TabStop = false; this.ucGroupBoxEx99.Text = "创建备货单"; @@ -1212,7 +1221,7 @@ namespace TemuKJD.KJDForms.ProductForms this.panel2.Controls.Add(this.btnSetNotArea); this.panel2.Location = new System.Drawing.Point(151, 59); this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(505, 23); + this.panel2.Size = new System.Drawing.Size(487, 23); this.panel2.TabIndex = 638; // // textBox2 @@ -1222,7 +1231,7 @@ namespace TemuKJD.KJDForms.ProductForms this.textBox2.Location = new System.Drawing.Point(0, 0); this.textBox2.Name = "textBox2"; this.textBox2.ReadOnly = true; - this.textBox2.Size = new System.Drawing.Size(439, 23); + this.textBox2.Size = new System.Drawing.Size(421, 23); this.textBox2.TabIndex = 638; // // btnSetNotArea @@ -1232,7 +1241,7 @@ namespace TemuKJD.KJDForms.ProductForms this.btnSetNotArea.Cursor = System.Windows.Forms.Cursors.Hand; this.btnSetNotArea.DisabledBackColor = System.Drawing.Color.Empty; this.btnSetNotArea.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSetNotArea.Location = new System.Drawing.Point(445, 2); + this.btnSetNotArea.Location = new System.Drawing.Point(427, 2); this.btnSetNotArea.Name = "btnSetNotArea"; this.btnSetNotArea.Size = new System.Drawing.Size(56, 19); this.btnSetNotArea.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -1354,7 +1363,7 @@ namespace TemuKJD.KJDForms.ProductForms this.btnAdd.Cursor = System.Windows.Forms.Cursors.Hand; this.btnAdd.DisabledBackColor = System.Drawing.Color.Empty; this.btnAdd.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnAdd.Location = new System.Drawing.Point(664, 29); + this.btnAdd.Location = new System.Drawing.Point(646, 29); this.btnAdd.Name = "btnAdd"; this.btnAdd.Size = new System.Drawing.Size(80, 23); this.btnAdd.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -1377,7 +1386,7 @@ namespace TemuKJD.KJDForms.ProductForms this.btnStopAdd.CanvasColor = System.Drawing.SystemColors.Control; this.btnStopAdd.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnStopAdd.DisabledBackColor = System.Drawing.Color.Empty; - this.btnStopAdd.Location = new System.Drawing.Point(664, 59); + this.btnStopAdd.Location = new System.Drawing.Point(646, 59); this.btnStopAdd.Name = "btnStopAdd"; this.btnStopAdd.Size = new System.Drawing.Size(80, 23); this.btnStopAdd.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -1409,18 +1418,18 @@ namespace TemuKJD.KJDForms.ProductForms // this.dgvStock.AllowUserToAddRows = false; this.dgvStock.AllowUserToDeleteRows = false; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvStock.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle8.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvStock.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle8; this.dgvStock.BackgroundColor = System.Drawing.Color.White; this.dgvStock.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvStock.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvStock.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle9; this.dgvStock.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvStock.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colUpId, @@ -1443,6 +1452,8 @@ namespace TemuKJD.KJDForms.ProductForms this.colSalesInventoryNum, this.colWaitReceiveNum, this.colQualityScore, + this.colQualityRate, + this.colQualityCount, this.colNeedStockUp, this.colMsg}); this.dgvStock.Dock = System.Windows.Forms.DockStyle.Fill; @@ -1450,11 +1461,91 @@ namespace TemuKJD.KJDForms.ProductForms this.dgvStock.Name = "dgvStock"; this.dgvStock.ReadOnly = true; this.dgvStock.RowTemplate.Height = 23; - this.dgvStock.Size = new System.Drawing.Size(1080, 435); + this.dgvStock.Size = new System.Drawing.Size(1062, 435); this.dgvStock.TabIndex = 187; this.dgvStock.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvStock_CellContentClick); this.dgvStock.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvStock_Scroll); // + // splitContainer4 + // + this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer4.Location = new System.Drawing.Point(0, 0); + this.splitContainer4.Name = "splitContainer4"; + // + // splitContainer4.Panel1 + // + this.splitContainer4.Panel1.Controls.Add(this.statusBar); + // + // splitContainer4.Panel2 + // + this.splitContainer4.Panel2.Controls.Add(this.panelEx1); + this.splitContainer4.Panel2.Controls.Add(this.btnClear); + this.splitContainer4.Size = new System.Drawing.Size(1350, 26); + this.splitContainer4.SplitterDistance = 1072; + this.splitContainer4.TabIndex = 3; + // + // statusBar + // + this.statusBar.BackColor = System.Drawing.Color.White; + this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; + this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.statusBar.Location = new System.Drawing.Point(0, 0); + this.statusBar.Margin = new System.Windows.Forms.Padding(0); + this.statusBar.Name = "statusBar"; + this.statusBar.Size = new System.Drawing.Size(1072, 26); + this.statusBar.TabIndex = 2; + // + // panelEx1 + // + this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control; + this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty; + this.panelEx1.Location = new System.Drawing.Point(155, 0); + this.panelEx1.Name = "panelEx1"; + this.panelEx1.Size = new System.Drawing.Size(115, 21); + this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.panelEx1.Style.GradientAngle = 90; + this.panelEx1.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.panelEx1.TabIndex = 668; + this.panelEx1.Text = "停止当前操作"; + this.panelEx1.Click += new System.EventHandler(this.btnStop_Click); + // + // btnClear + // + this.btnClear.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnClear.DisabledBackColor = System.Drawing.Color.Empty; + this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnClear.Location = new System.Drawing.Point(47, 0); + this.btnClear.Name = "btnClear"; + this.btnClear.Size = new System.Drawing.Size(90, 21); + this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.Style.GradientAngle = 90; + this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.TabIndex = 440; + this.btnClear.Text = "清空结果"; + this.btnClear.Visible = false; + // // colUpId // this.colUpId.HeaderText = "上家Id"; @@ -1526,6 +1617,7 @@ namespace TemuKJD.KJDForms.ProductForms this.colProductId.Name = "colProductId"; this.colProductId.ReadOnly = true; this.colProductId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colProductId.Width = 90; // // colProdSkc // @@ -1539,10 +1631,12 @@ namespace TemuKJD.KJDForms.ProductForms // // colProdName // + dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProdName.DefaultCellStyle = dataGridViewCellStyle10; this.colProdName.HeaderText = "标题"; this.colProdName.Name = "colProdName"; this.colProdName.ReadOnly = true; - this.colProdName.Width = 200; + this.colProdName.Width = 180; // // colPrcie // @@ -1610,7 +1704,21 @@ namespace TemuKJD.KJDForms.ProductForms this.colQualityScore.HeaderText = "品质分"; this.colQualityScore.Name = "colQualityScore"; this.colQualityScore.ReadOnly = true; - this.colQualityScore.Width = 60; + this.colQualityScore.Width = 50; + // + // colQualityRate + // + this.colQualityRate.HeaderText = "售后率"; + this.colQualityRate.Name = "colQualityRate"; + this.colQualityRate.ReadOnly = true; + this.colQualityRate.Width = 50; + // + // colQualityCount + // + this.colQualityCount.HeaderText = "售后数"; + this.colQualityCount.Name = "colQualityCount"; + this.colQualityCount.ReadOnly = true; + this.colQualityCount.Width = 50; // // colNeedStockUp // @@ -1627,91 +1735,48 @@ namespace TemuKJD.KJDForms.ProductForms this.colMsg.ReadOnly = true; this.colMsg.Width = 400; // - // splitContainer4 + // txtMaxQualityRate // - this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; - this.splitContainer4.Location = new System.Drawing.Point(0, 0); - this.splitContainer4.Name = "splitContainer4"; + this.txtMaxQualityRate.Location = new System.Drawing.Point(737, 85); + this.txtMaxQualityRate.Margin = new System.Windows.Forms.Padding(0); + this.txtMaxQualityRate.Name = "txtMaxQualityRate"; + this.txtMaxQualityRate.Size = new System.Drawing.Size(32, 23); + this.txtMaxQualityRate.TabIndex = 745; + this.txtMaxQualityRate.Text = "2"; + this.txtMaxQualityRate.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; // - // splitContainer4.Panel1 + // chkMaxQualityRate // - this.splitContainer4.Panel1.Controls.Add(this.statusBar); + this.chkMaxQualityRate.AutoSize = true; + this.chkMaxQualityRate.Checked = true; + this.chkMaxQualityRate.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkMaxQualityRate.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.chkMaxQualityRate.FlatAppearance.BorderSize = 2; + this.chkMaxQualityRate.FlatAppearance.CheckedBackColor = System.Drawing.Color.Blue; + this.chkMaxQualityRate.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Blue; + this.chkMaxQualityRate.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Blue; + this.chkMaxQualityRate.Location = new System.Drawing.Point(655, 86); + this.chkMaxQualityRate.Margin = new System.Windows.Forms.Padding(15, 3, 3, 3); + this.chkMaxQualityRate.Name = "chkMaxQualityRate"; + this.chkMaxQualityRate.Size = new System.Drawing.Size(87, 21); + this.chkMaxQualityRate.TabIndex = 744; + this.chkMaxQualityRate.Text = "售后率高于"; + this.chkMaxQualityRate.UseVisualStyleBackColor = false; // - // splitContainer4.Panel2 + // label10 // - this.splitContainer4.Panel2.Controls.Add(this.panelEx1); - this.splitContainer4.Panel2.Controls.Add(this.btnClear); - this.splitContainer4.Size = new System.Drawing.Size(1368, 26); - this.splitContainer4.SplitterDistance = 1090; - this.splitContainer4.TabIndex = 3; - // - // statusBar - // - this.statusBar.BackColor = System.Drawing.Color.White; - this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; - this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.statusBar.Location = new System.Drawing.Point(0, 0); - this.statusBar.Margin = new System.Windows.Forms.Padding(0); - this.statusBar.Name = "statusBar"; - this.statusBar.Size = new System.Drawing.Size(1090, 26); - this.statusBar.TabIndex = 2; - // - // panelEx1 - // - this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control; - this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty; - this.panelEx1.Location = new System.Drawing.Point(155, 0); - this.panelEx1.Name = "panelEx1"; - this.panelEx1.Size = new System.Drawing.Size(115, 21); - this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.panelEx1.Style.GradientAngle = 90; - this.panelEx1.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.panelEx1.TabIndex = 668; - this.panelEx1.Text = "停止当前操作"; - this.panelEx1.Click += new System.EventHandler(this.btnStop_Click); - // - // btnClear - // - this.btnClear.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnClear.DisabledBackColor = System.Drawing.Color.Empty; - this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnClear.Location = new System.Drawing.Point(47, 0); - this.btnClear.Name = "btnClear"; - this.btnClear.Size = new System.Drawing.Size(90, 21); - this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnClear.Style.GradientAngle = 90; - this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.btnClear.TabIndex = 440; - this.btnClear.Text = "清空结果"; - this.btnClear.Visible = false; + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(769, 88); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(44, 17); + this.label10.TabIndex = 746; + this.label10.Text = "不备货"; // // SaleStockUpForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.ClientSize = new System.Drawing.Size(1368, 589); + this.ClientSize = new System.Drawing.Size(1350, 589); this.Controls.Add(this.splitContainer1); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Name = "SaleStockUpForm"; @@ -1880,7 +1945,12 @@ namespace TemuKJD.KJDForms.ProductForms private System.Windows.Forms.DataGridViewTextBoxColumn colSalesInventoryNum; private System.Windows.Forms.DataGridViewTextBoxColumn colWaitReceiveNum; private System.Windows.Forms.DataGridViewTextBoxColumn colQualityScore; + private System.Windows.Forms.DataGridViewTextBoxColumn colQualityRate; + private System.Windows.Forms.DataGridViewTextBoxColumn colQualityCount; private System.Windows.Forms.DataGridViewTextBoxColumn colNeedStockUp; private System.Windows.Forms.DataGridViewTextBoxColumn colMsg; + private System.Windows.Forms.TextBox txtMaxQualityRate; + private System.Windows.Forms.CheckBox chkMaxQualityRate; + private System.Windows.Forms.Label label10; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.cs b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.cs index 5734a03..3941b91 100644 --- a/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.cs @@ -938,13 +938,19 @@ namespace TemuKJD.KJDForms.ProductForms foreach(var order in subOrderInfoLstTmp) { order.goodsAfsScore = -1; + order.qltyAfsOrdCnt = -1; + order.qltyAfsOrdrRate = -1; } } foreach (var qualityInfo in qualityInfoLst) { var order = subOrderInfoLstTmp.FirstOrDefault(o => o.productId == qualityInfo.productId); if (order != null) + { order.goodsAfsScore = qualityInfo.goodsAfsScore; + order.qltyAfsOrdCnt = qualityInfo.qltyAfsOrdCnt; + order.qltyAfsOrdrRate = qualityInfo.qltyAfsOrdrRate; + } } //--------------------------------------------------------------------------------------- lstSubOrderInfo.AddRange(subOrderInfoLstTmp); @@ -973,6 +979,8 @@ namespace TemuKJD.KJDForms.ProductForms sInfo.skuQuantityTotalInfo.inventoryNumInfo.warehouseInventoryNum, sInfo.skuQuantityTotalInfo.inventoryNumInfo.waitReceiveNum, sInfo.goodsAfsScore == null ? "-" : (Math.Round(sInfo.goodsAfsScore.Value * 10) / 10).ToString(), + sInfo.qltyAfsOrdrRate == null ? "-" : (Math.Round(sInfo.qltyAfsOrdrRate.Value * 10000) / 100).ToString("0.00"), + sInfo.qltyAfsOrdCnt == null ? "-" : sInfo.qltyAfsOrdCnt.Value.ToString(), sInfo.needStockUp == false ? "无需备货" : "可备货", sInfo.goodsAfsScore == -1 ? "获取商品品质信息失败" : "" ); @@ -1047,9 +1055,12 @@ namespace TemuKJD.KJDForms.ProductForms ucGroupBoxEx4.Enabled = false; cancellationTokenSource = new CancellationTokenSource(); - var minQualityScore = this.txtMinQualityScore.Text.ParseToInt(); + var minQualityScore = this.txtMinQualityScore.Text.ParseToDecimal(); if (!chkMinQualityScore.Checked) // 没选最低品质分,即不考虑品质分上货。 minQualityScore = -100; + var maxQualityRate = this.txtMaxQualityRate.Text.ParseToDecimal(); + if (!chkMaxQualityRate.Checked) // 没选最高品质售后率,即不考虑品质售后率上货。 + maxQualityRate = 100; Task.Run(() => { int i = 0; @@ -1091,6 +1102,17 @@ namespace TemuKJD.KJDForms.ProductForms })); continue; } + if (stockUp.qltyAfsOrdrRate != null && stockUp.qltyAfsOrdrRate * 100 > maxQualityRate) + { + Invoke(new Action(() => + { + foreach (var row in rows) + { + row.Cells["colMsg"].Value = "商品品质售后率过高,请去网页手动备货"; + } + })); + continue; + } var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == stockUp.supplierId.ToString()); if (shop == null || shop.LoginStatus != "登录成功") diff --git a/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.resx b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.resx index 6d10277..1484d99 100644 --- a/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.resx +++ b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.resx @@ -195,6 +195,12 @@ True + + True + + + True + True diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductUserSelectForm.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductUserSelectForm.cs index a9b8ce2..33554af 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductUserSelectForm.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductUserSelectForm.cs @@ -86,6 +86,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms if (dgvSelectProduct.Rows.Count == 0) SearchDbProdSelect(1); } + isInit = true; } private void RefreshShop() @@ -145,7 +146,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms row.Cells["colCanUse"].Value = canUse; row.Cells["colRemaining"].Value = shopEntity.AddProductRemaining; } - isInit = false; } private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e) diff --git a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdUserSelectForm.cs b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdUserSelectForm.cs index 19aad4b..dcae5ec 100644 --- a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdUserSelectForm.cs +++ b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdUserSelectForm.cs @@ -89,6 +89,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms if (dgvSelectProduct.Rows.Count == 0) SearchDbProdSelect(1); } + isInit = true; } private void RefreshShop() @@ -148,7 +149,6 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms row.Cells["colCanUse"].Value = canUse; row.Cells["colRemaining"].Value = shopEntity.AddProductRemaining; } - isInit = false; } private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e) diff --git a/TEMUKJD/KJDForms/ShopForms/ReturnPackageDetailForm.cs b/TEMUKJD/KJDForms/ShopForms/ReturnPackageDetailForm.cs index 34ab3ac..b9faa44 100644 --- a/TEMUKJD/KJDForms/ShopForms/ReturnPackageDetailForm.cs +++ b/TEMUKJD/KJDForms/ShopForms/ReturnPackageDetailForm.cs @@ -82,7 +82,7 @@ namespace TemuKJD.KJDForms.ShopForms if (isBack) { endTime = this.dtpEndDate.Value.Date.AddDays(1); - startTime = endTime.AddMonths(-6); + startTime = endTime.AddMonths(-1); } cancellationTokenSource = new CancellationTokenSource(); var t = Task.Run(() => diff --git a/TEMUKJD/PDDForms/AdminForms/PDDAdminShopLoginForm.Designer.cs b/TEMUKJD/PDDForms/AdminForms/PDDAdminShopLoginForm.Designer.cs index da650fc..0f68e30 100644 --- a/TEMUKJD/PDDForms/AdminForms/PDDAdminShopLoginForm.Designer.cs +++ b/TEMUKJD/PDDForms/AdminForms/PDDAdminShopLoginForm.Designer.cs @@ -82,8 +82,8 @@ this.splitContainer1.Panel2.Controls.Add(this.btnStop); this.splitContainer1.Panel2.Controls.Add(this.btnReload); this.splitContainer1.Panel2.Controls.Add(this.chkCloseAfterLogin); - this.splitContainer1.Size = new System.Drawing.Size(1438, 736); - this.splitContainer1.SplitterDistance = 676; + this.splitContainer1.Size = new System.Drawing.Size(1438, 755); + this.splitContainer1.SplitterDistance = 694; this.splitContainer1.SplitterWidth = 3; this.splitContainer1.TabIndex = 4; // @@ -322,7 +322,7 @@ this.splitContainer2.BackColor = System.Drawing.Color.White; this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; - this.splitContainer2.Location = new System.Drawing.Point(1, 33); + this.splitContainer2.Location = new System.Drawing.Point(1, 14); this.splitContainer2.Name = "splitContainer2"; this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; // @@ -333,7 +333,7 @@ // splitContainer2.Panel2 // this.splitContainer2.Panel2.Controls.Add(this.splitContainer1); - this.splitContainer2.Size = new System.Drawing.Size(1438, 766); + this.splitContainer2.Size = new System.Drawing.Size(1438, 785); this.splitContainer2.SplitterDistance = 26; this.splitContainer2.TabIndex = 5; // diff --git a/TEMUKJD/PDDForms/AdminForms/PDDAdminShopLoginForm.cs b/TEMUKJD/PDDForms/AdminForms/PDDAdminShopLoginForm.cs index 5950799..0332838 100644 --- a/TEMUKJD/PDDForms/AdminForms/PDDAdminShopLoginForm.cs +++ b/TEMUKJD/PDDForms/AdminForms/PDDAdminShopLoginForm.cs @@ -32,6 +32,7 @@ namespace TemuKJD.PDDForms.AdminForms { public partial class PDDAdminShopLoginForm : LRBaseForm { + public static PDDAdminShopLoginForm adminShopLoginInstance { get; set; } = null; public int CloseAfterSecond { get; set; } public EnumOpenType openType = EnumOpenType.manage; public bool isMultiLogin = false; @@ -49,6 +50,12 @@ namespace TemuKJD.PDDForms.AdminForms public PDDAdminShopLoginForm(ShopLoginInfo shopInfo) { + if (adminShopLoginInstance != null && !adminShopLoginInstance.IsDisposed) + { + adminShopLoginInstance.Dispose(); + } + adminShopLoginInstance = this; + InitializeComponent(); this.shop = shopInfo; @@ -59,6 +66,8 @@ namespace TemuKJD.PDDForms.AdminForms private void ShopLoginForm_Load(object sender, EventArgs e) { //this.splitContainer1.SplitterDistance = 674; + this.splitContainer1.SplitterDistance = this.splitContainer1.Height - 62; + if (BaseClass.SaLevel == 1) this.btnReturnPackage.Visible = true; else @@ -767,6 +776,13 @@ namespace TemuKJD.PDDForms.AdminForms private void ShopLoginForm_FormClosed(object sender, FormClosedEventArgs e) { //OnSaveComplete(shop); + Task.Run(() => { + Thread.Sleep(500); + if (!this.IsDisposed) + { + MainForm.instance.Invoke(new Action(() => { this.Dispose(); })); + } + }); } private void txtAddress_KeyDown(object sender, KeyEventArgs e) diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.Designer.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.Designer.cs index b84b8bf..1ef01a6 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.Designer.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.Designer.cs @@ -30,44 +30,41 @@ namespace TemuKJD.PDDForms.ProductSelectForms private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); - this.btnStop = new DevComponents.DotNetBar.PanelEx(); + this.chkAddMorePriceFirst = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.btnClearDgv = new DevComponents.DotNetBar.PanelEx(); + this.label14 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.txtSinglePriceAdd = new System.Windows.Forms.TextBox(); + this.panel4 = new System.Windows.Forms.Panel(); + this.panel3 = new System.Windows.Forms.Panel(); + this.fPnlPriceRule = new System.Windows.Forms.FlowLayoutPanel(); + this.ucAddPrice1 = new TemuKJD.PDDForms.ProductSelectForms.UcAddPrice(); + this.ucAddPrice3 = new TemuKJD.PDDForms.ProductSelectForms.UcAddPrice(); this.label11 = new System.Windows.Forms.Label(); + this.lblNewAddPrice = new System.Windows.Forms.Label(); this.txtAddMorePrice = new System.Windows.Forms.TextBox(); - this.label10 = new System.Windows.Forms.Label(); this.txtAddTimes = new System.Windows.Forms.TextBox(); - this.label9 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.btnStop = new DevComponents.DotNetBar.PanelEx(); this.btnUpload = new DevComponents.DotNetBar.PanelEx(); this.txtStockNum = new System.Windows.Forms.TextBox(); this.label4 = new System.Windows.Forms.Label(); - this.btnDelSelect = new DevComponents.DotNetBar.PanelEx(); + this.label9 = new System.Windows.Forms.Label(); + this.chkStepAddPrice = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.chkChance = new TemuKJD.UserComponent.UcCheckBox(this.components); this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); - this.pnlEmpty = new DevComponents.DotNetBar.PanelEx(); - this.label5 = new System.Windows.Forms.Label(); - this.txtSKC = new System.Windows.Forms.TextBox(); - this.txtSPU = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.txtExtCode = new System.Windows.Forms.TextBox(); - this.label13 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); - this.cmbNotes = new System.Windows.Forms.ComboBox(); - this.txtShopId = new System.Windows.Forms.TextBox(); - this.label7 = new System.Windows.Forms.Label(); - this.txtShopName = new System.Windows.Forms.TextBox(); - this.label3 = new System.Windows.Forms.Label(); - this.txtProdName = new System.Windows.Forms.TextBox(); - this.cmbUserNotes = new System.Windows.Forms.ComboBox(); - this.label12 = new System.Windows.Forms.Label(); - this.cmbStatus = new System.Windows.Forms.ComboBox(); - this.label8 = new System.Windows.Forms.Label(); - this.btnSearch = new DevComponents.DotNetBar.PanelEx(); + this.btnClearUpload = new DevComponents.DotNetBar.PanelEx(); + this.lblWaitToUp = new System.Windows.Forms.Label(); + this.lblGoodsCount = new System.Windows.Forms.Label(); + this.txtAddCount = new System.Windows.Forms.TextBox(); + this.panelEx2 = new DevComponents.DotNetBar.PanelEx(); this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx(); this.splitContainer3 = new System.Windows.Forms.SplitContainer(); @@ -79,10 +76,32 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colSelectProduct = new System.Windows.Forms.DataGridViewLinkColumn(); - this.colLoginStatus = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn(); this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.panel2 = new System.Windows.Forms.Panel(); + this.pnlEmpty = new DevComponents.DotNetBar.PanelEx(); + this.txtShopId = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.txtSKC = new System.Windows.Forms.TextBox(); + this.btnSearch = new DevComponents.DotNetBar.PanelEx(); + this.label8 = new System.Windows.Forms.Label(); + this.txtSPU = new System.Windows.Forms.TextBox(); + this.cmbStatus = new System.Windows.Forms.ComboBox(); + this.label1 = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.cmbUserNotes = new System.Windows.Forms.ComboBox(); + this.txtExtCode = new System.Windows.Forms.TextBox(); + this.txtProdName = new System.Windows.Forms.TextBox(); + this.label13 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.txtShopName = new System.Windows.Forms.TextBox(); + this.cmbNotes = new System.Windows.Forms.ComboBox(); + this.btnDelSelect = new DevComponents.DotNetBar.PanelEx(); + this.label7 = new System.Windows.Forms.Label(); this.pbLoading = new System.Windows.Forms.PictureBox(); this.panel1 = new System.Windows.Forms.Panel(); this.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx(); @@ -104,17 +123,22 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colUserNotes = new System.Windows.Forms.DataGridViewLinkColumn(); this.ColDelete = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colAddTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colOpResult = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.splitContainer4 = new System.Windows.Forms.SplitContainer(); this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); this.btnClear = new DevComponents.DotNetBar.PanelEx(); this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); + this.chkSizeSpec = new TemuKJD.UserComponent.UcCheckBox(this.components); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); this.ucGroupBoxEx2.SuspendLayout(); + this.panel4.SuspendLayout(); + this.panel3.SuspendLayout(); + this.fPnlPriceRule.SuspendLayout(); this.ucGroupBoxEx4.SuspendLayout(); this.ucGroupBoxEx1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); @@ -126,6 +150,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.splitContainer2.Panel2.SuspendLayout(); this.splitContainer2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit(); + this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit(); @@ -151,8 +176,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms // splitContainer1.Panel2 // this.splitContainer1.Panel2.Controls.Add(this.splitContainer3); - this.splitContainer1.Size = new System.Drawing.Size(1284, 546); - this.splitContainer1.SplitterDistance = 120; + this.splitContainer1.Size = new System.Drawing.Size(1344, 546); + this.splitContainer1.SplitterDistance = 140; this.splitContainer1.TabIndex = 11; // // ucGroupBoxEx2 @@ -162,33 +187,280 @@ namespace TemuKJD.PDDForms.ProductSelectForms | System.Windows.Forms.AnchorStyles.Right))); this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucGroupBoxEx2.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; - this.ucGroupBoxEx2.Controls.Add(this.btnStop); + this.ucGroupBoxEx2.Controls.Add(this.chkSizeSpec); + this.ucGroupBoxEx2.Controls.Add(this.chkAddMorePriceFirst); + this.ucGroupBoxEx2.Controls.Add(this.btnClearDgv); + this.ucGroupBoxEx2.Controls.Add(this.label14); + this.ucGroupBoxEx2.Controls.Add(this.label15); + this.ucGroupBoxEx2.Controls.Add(this.txtSinglePriceAdd); + this.ucGroupBoxEx2.Controls.Add(this.panel4); this.ucGroupBoxEx2.Controls.Add(this.label11); + this.ucGroupBoxEx2.Controls.Add(this.lblNewAddPrice); this.ucGroupBoxEx2.Controls.Add(this.txtAddMorePrice); - this.ucGroupBoxEx2.Controls.Add(this.label10); this.ucGroupBoxEx2.Controls.Add(this.txtAddTimes); - this.ucGroupBoxEx2.Controls.Add(this.label9); + this.ucGroupBoxEx2.Controls.Add(this.label10); + this.ucGroupBoxEx2.Controls.Add(this.btnStop); this.ucGroupBoxEx2.Controls.Add(this.btnUpload); this.ucGroupBoxEx2.Controls.Add(this.txtStockNum); this.ucGroupBoxEx2.Controls.Add(this.label4); - this.ucGroupBoxEx2.Controls.Add(this.btnDelSelect); - this.ucGroupBoxEx2.Location = new System.Drawing.Point(884, 2); + this.ucGroupBoxEx2.Controls.Add(this.label9); + this.ucGroupBoxEx2.Controls.Add(this.chkStepAddPrice); + this.ucGroupBoxEx2.Controls.Add(this.chkChance); + this.ucGroupBoxEx2.Location = new System.Drawing.Point(485, 2); this.ucGroupBoxEx2.Name = "ucGroupBoxEx2"; - this.ucGroupBoxEx2.Size = new System.Drawing.Size(398, 120); + this.ucGroupBoxEx2.Size = new System.Drawing.Size(857, 140); this.ucGroupBoxEx2.TabIndex = 667; this.ucGroupBoxEx2.TabStop = false; this.ucGroupBoxEx2.Text = "商品上传"; // + // chkAddMorePriceFirst + // + this.chkAddMorePriceFirst.AutoSize = true; + this.chkAddMorePriceFirst.Location = new System.Drawing.Point(577, 111); + this.chkAddMorePriceFirst.Name = "chkAddMorePriceFirst"; + this.chkAddMorePriceFirst.Size = new System.Drawing.Size(111, 21); + this.chkAddMorePriceFirst.TabIndex = 625; + this.chkAddMorePriceFirst.Text = "加价时先加再乘"; + this.chkAddMorePriceFirst.UseVisualStyleBackColor = true; + this.chkAddMorePriceFirst.CheckedChanged += new System.EventHandler(this.chkAddFirst_CheckedChanged); + // + // btnClearDgv + // + this.btnClearDgv.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnClearDgv.CanvasColor = System.Drawing.SystemColors.Control; + this.btnClearDgv.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClearDgv.DisabledBackColor = System.Drawing.Color.Empty; + this.btnClearDgv.Location = new System.Drawing.Point(754, 92); + this.btnClearDgv.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); + this.btnClearDgv.Name = "btnClearDgv"; + this.btnClearDgv.Size = new System.Drawing.Size(84, 23); + this.btnClearDgv.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearDgv.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnClearDgv.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnClearDgv.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnClearDgv.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearDgv.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnClearDgv.Style.GradientAngle = 90; + this.btnClearDgv.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearDgv.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearDgv.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearDgv.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearDgv.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnClearDgv.TabIndex = 612; + this.btnClearDgv.Text = "清空列表选中"; + this.btnClearDgv.Click += new System.EventHandler(this.btnClearDgv_Click); + // + // label14 + // + this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label14.AutoSize = true; + this.label14.ForeColor = System.Drawing.SystemColors.GrayText; + this.label14.Location = new System.Drawing.Point(317, 113); + this.label14.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(260, 17); + this.label14.TabIndex = 599; + this.label14.Text = "说明:若未勾选或不满足阶梯加价,按默认加价"; + // + // label15 + // + this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(298, 113); + this.label15.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(20, 17); + this.label15.TabIndex = 588; + this.label15.Text = "元"; + // + // txtSinglePriceAdd + // + this.txtSinglePriceAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.txtSinglePriceAdd.Location = new System.Drawing.Point(267, 110); + this.txtSinglePriceAdd.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtSinglePriceAdd.Name = "txtSinglePriceAdd"; + this.txtSinglePriceAdd.Size = new System.Drawing.Size(31, 23); + this.txtSinglePriceAdd.TabIndex = 587; + this.txtSinglePriceAdd.Text = "1.0"; + this.txtSinglePriceAdd.TextChanged += new System.EventHandler(this.txtAddPrice_TextChanged); + // + // panel4 + // + this.panel4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.panel4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panel4.Controls.Add(this.panel3); + this.panel4.Location = new System.Drawing.Point(80, 18); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(450, 89); + this.panel4.TabIndex = 577; + // + // panel3 + // + this.panel3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.panel3.AutoScroll = true; + this.panel3.BackColor = System.Drawing.Color.White; + this.panel3.Controls.Add(this.fPnlPriceRule); + this.panel3.Location = new System.Drawing.Point(1, 1); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(448, 87); + this.panel3.TabIndex = 541; + // + // fPnlPriceRule + // + this.fPnlPriceRule.AutoSize = true; + this.fPnlPriceRule.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.fPnlPriceRule.Controls.Add(this.ucAddPrice1); + this.fPnlPriceRule.Controls.Add(this.ucAddPrice3); + this.fPnlPriceRule.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.fPnlPriceRule.Location = new System.Drawing.Point(0, 0); + this.fPnlPriceRule.Name = "fPnlPriceRule"; + this.fPnlPriceRule.Size = new System.Drawing.Size(426, 58); + this.fPnlPriceRule.TabIndex = 7; + // + // ucAddPrice1 + // + this.ucAddPrice1.AutoSize = true; + this.ucAddPrice1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.ucAddPrice1.isShowMax = true; + this.ucAddPrice1.isShowMin = true; + this.ucAddPrice1.Location = new System.Drawing.Point(3, 3); + this.ucAddPrice1.MinimumSize = new System.Drawing.Size(0, 20); + this.ucAddPrice1.Name = "ucAddPrice1"; + this.ucAddPrice1.PriceAddMore = new decimal(new int[] { + 50, + 0, + 0, + 65536}); + this.ucAddPrice1.PriceAddTimes = new decimal(new int[] { + 20, + 0, + 0, + 65536}); + this.ucAddPrice1.PriceEnd = new decimal(new int[] { + 20, + 0, + 0, + 0}); + this.ucAddPrice1.PriceStart = new decimal(new int[] { + 0, + 0, + 0, + 65536}); + this.ucAddPrice1.SinglePriceAdd = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.ucAddPrice1.Size = new System.Drawing.Size(420, 23); + this.ucAddPrice1.TabIndex = 12; + // + // ucAddPrice3 + // + this.ucAddPrice3.AutoSize = true; + this.ucAddPrice3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.ucAddPrice3.isShowMax = true; + this.ucAddPrice3.isShowMin = true; + this.ucAddPrice3.Location = new System.Drawing.Point(3, 32); + this.ucAddPrice3.MinimumSize = new System.Drawing.Size(0, 20); + this.ucAddPrice3.Name = "ucAddPrice3"; + this.ucAddPrice3.PriceAddMore = new decimal(new int[] { + 50, + 0, + 0, + 65536}); + this.ucAddPrice3.PriceAddTimes = new decimal(new int[] { + 20, + 0, + 0, + 65536}); + this.ucAddPrice3.PriceEnd = new decimal(new int[] { + 9990, + 0, + 0, + 65536}); + this.ucAddPrice3.PriceStart = new decimal(new int[] { + 20, + 0, + 0, + 0}); + this.ucAddPrice3.SinglePriceAdd = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.ucAddPrice3.Size = new System.Drawing.Size(420, 23); + this.ucAddPrice3.TabIndex = 13; + // + // label11 + // + this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(199, 113); + this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(68, 17); + this.label11.TabIndex = 536; + this.label11.Text = "元,单买加"; + // + // lblNewAddPrice + // + this.lblNewAddPrice.AutoSize = true; + this.lblNewAddPrice.Cursor = System.Windows.Forms.Cursors.Hand; + this.lblNewAddPrice.ForeColor = System.Drawing.SystemColors.HotTrack; + this.lblNewAddPrice.Location = new System.Drawing.Point(24, 47); + this.lblNewAddPrice.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblNewAddPrice.Name = "lblNewAddPrice"; + this.lblNewAddPrice.Size = new System.Drawing.Size(56, 17); + this.lblNewAddPrice.TabIndex = 567; + this.lblNewAddPrice.Text = "增加阶梯"; + this.lblNewAddPrice.Click += new System.EventHandler(this.lblNewAddPrice_Click); + // + // txtAddMorePrice + // + this.txtAddMorePrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.txtAddMorePrice.Location = new System.Drawing.Point(168, 110); + this.txtAddMorePrice.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtAddMorePrice.Name = "txtAddMorePrice"; + this.txtAddMorePrice.Size = new System.Drawing.Size(31, 23); + this.txtAddMorePrice.TabIndex = 535; + this.txtAddMorePrice.Text = "1.0"; + this.txtAddMorePrice.TextChanged += new System.EventHandler(this.txtAddPrice_TextChanged); + // + // txtAddTimes + // + this.txtAddTimes.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.txtAddTimes.Location = new System.Drawing.Point(93, 110); + this.txtAddTimes.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtAddTimes.Name = "txtAddTimes"; + this.txtAddTimes.Size = new System.Drawing.Size(31, 23); + this.txtAddTimes.TabIndex = 532; + this.txtAddTimes.Text = "1.3"; + this.txtAddTimes.TextChanged += new System.EventHandler(this.txtAddPrice_TextChanged); + // + // label10 + // + this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(124, 113); + this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(44, 17); + this.label10.TabIndex = 534; + this.label10.Text = "倍再加"; + // // btnStop // this.btnStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnStop.CanvasColor = System.Drawing.SystemColors.Control; this.btnStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnStop.DisabledBackColor = System.Drawing.Color.Empty; - this.btnStop.Location = new System.Drawing.Point(317, 70); + this.btnStop.Location = new System.Drawing.Point(754, 62); this.btnStop.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); this.btnStop.Name = "btnStop"; - this.btnStop.Size = new System.Drawing.Size(56, 23); + this.btnStop.Size = new System.Drawing.Size(84, 23); this.btnStop.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnStop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); this.btnStop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); @@ -205,54 +477,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.btnStop.Text = "停止上传"; this.btnStop.Click += new System.EventHandler(this.btnStop_Click); // - // label11 - // - this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(188, 35); - this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(20, 17); - this.label11.TabIndex = 536; - this.label11.Text = "元"; - // - // txtAddMorePrice - // - this.txtAddMorePrice.Location = new System.Drawing.Point(157, 32); - this.txtAddMorePrice.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); - this.txtAddMorePrice.Name = "txtAddMorePrice"; - this.txtAddMorePrice.Size = new System.Drawing.Size(31, 23); - this.txtAddMorePrice.TabIndex = 535; - this.txtAddMorePrice.Text = "5"; - // - // label10 - // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(114, 35); - this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(44, 17); - this.label10.TabIndex = 534; - this.label10.Text = "倍再加"; - // - // txtAddTimes - // - this.txtAddTimes.Location = new System.Drawing.Point(83, 32); - this.txtAddTimes.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); - this.txtAddTimes.Name = "txtAddTimes"; - this.txtAddTimes.Size = new System.Drawing.Size(31, 23); - this.txtAddTimes.TabIndex = 532; - this.txtAddTimes.Text = "2"; - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(28, 35); - this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(56, 17); - this.label9.TabIndex = 533; - this.label9.Text = "加价金额"; - // // btnUpload // this.btnUpload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -260,9 +484,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.btnUpload.Cursor = System.Windows.Forms.Cursors.Hand; this.btnUpload.DisabledBackColor = System.Drawing.Color.Empty; this.btnUpload.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnUpload.Location = new System.Drawing.Point(226, 70); + this.btnUpload.Location = new System.Drawing.Point(754, 32); this.btnUpload.Name = "btnUpload"; - this.btnUpload.Size = new System.Drawing.Size(89, 23); + this.btnUpload.Size = new System.Drawing.Size(84, 23); this.btnUpload.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnUpload.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnUpload.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -275,12 +499,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.btnUpload.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnUpload.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnUpload.TabIndex = 517; - this.btnUpload.Text = "批量上传选中"; + this.btnUpload.Text = "批量上传"; this.btnUpload.Click += new System.EventHandler(this.btnUpload_Click); // // txtStockNum // - this.txtStockNum.Location = new System.Drawing.Point(83, 67); + this.txtStockNum.Location = new System.Drawing.Point(587, 20); this.txtStockNum.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtStockNum.Name = "txtStockNum"; this.txtStockNum.Size = new System.Drawing.Size(31, 23); @@ -290,37 +514,48 @@ namespace TemuKJD.PDDForms.ProductSelectForms // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(28, 70); + this.label4.Location = new System.Drawing.Point(531, 23); this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(56, 17); this.label4.TabIndex = 531; this.label4.Text = "库存数量"; // - // btnDelSelect + // label9 // - this.btnDelSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnDelSelect.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnDelSelect.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnDelSelect.DisabledBackColor = System.Drawing.Color.Empty; - this.btnDelSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnDelSelect.Location = new System.Drawing.Point(226, 32); - this.btnDelSelect.Name = "btnDelSelect"; - this.btnDelSelect.Size = new System.Drawing.Size(147, 23); - this.btnDelSelect.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnDelSelect.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnDelSelect.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnDelSelect.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnDelSelect.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnDelSelect.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnDelSelect.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnDelSelect.Style.GradientAngle = 90; - this.btnDelSelect.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnDelSelect.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnDelSelect.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnDelSelect.TabIndex = 468; - this.btnDelSelect.Text = "删除选中记录"; - this.btnDelSelect.Click += new System.EventHandler(this.btnDelSelect_Click); + this.label9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(9, 113); + this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(84, 17); + this.label9.TabIndex = 533; + this.label9.Text = "默认加价 加价"; + // + // chkStepAddPrice + // + this.chkStepAddPrice.AutoSize = true; + this.chkStepAddPrice.Location = new System.Drawing.Point(12, 23); + this.chkStepAddPrice.Name = "chkStepAddPrice"; + this.chkStepAddPrice.Size = new System.Drawing.Size(75, 21); + this.chkStepAddPrice.TabIndex = 598; + this.chkStepAddPrice.Text = "阶梯加价"; + this.chkStepAddPrice.UseVisualStyleBackColor = true; + this.chkStepAddPrice.CheckedChanged += new System.EventHandler(this.chkStepAddPrice_CheckedChanged); + // + // chkChance + // + this.chkChance.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.chkChance.AutoSize = true; + this.chkChance.Checked = true; + this.chkChance.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkChance.Location = new System.Drawing.Point(668, 33); + this.chkChance.Name = "chkChance"; + this.chkChance.Size = new System.Drawing.Size(87, 21); + this.chkChance.TabIndex = 556; + this.chkChance.Text = "调用新接口"; + this.chkChance.UseVisualStyleBackColor = true; + this.chkChance.CheckedChanged += new System.EventHandler(this.chkChance_CheckedChanged); // // ucGroupBoxEx4 // @@ -328,264 +563,95 @@ namespace TemuKJD.PDDForms.ProductSelectForms | System.Windows.Forms.AnchorStyles.Left))); this.ucGroupBoxEx4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucGroupBoxEx4.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; - this.ucGroupBoxEx4.Controls.Add(this.pnlEmpty); - this.ucGroupBoxEx4.Controls.Add(this.label5); - this.ucGroupBoxEx4.Controls.Add(this.txtSKC); - this.ucGroupBoxEx4.Controls.Add(this.txtSPU); - this.ucGroupBoxEx4.Controls.Add(this.label1); - this.ucGroupBoxEx4.Controls.Add(this.label2); - this.ucGroupBoxEx4.Controls.Add(this.txtExtCode); - this.ucGroupBoxEx4.Controls.Add(this.label13); - this.ucGroupBoxEx4.Controls.Add(this.label6); - this.ucGroupBoxEx4.Controls.Add(this.cmbNotes); - this.ucGroupBoxEx4.Controls.Add(this.txtShopId); - this.ucGroupBoxEx4.Controls.Add(this.label7); - this.ucGroupBoxEx4.Controls.Add(this.txtShopName); - this.ucGroupBoxEx4.Controls.Add(this.label3); - this.ucGroupBoxEx4.Controls.Add(this.txtProdName); - this.ucGroupBoxEx4.Controls.Add(this.cmbUserNotes); - this.ucGroupBoxEx4.Controls.Add(this.label12); - this.ucGroupBoxEx4.Controls.Add(this.cmbStatus); - this.ucGroupBoxEx4.Controls.Add(this.label8); - this.ucGroupBoxEx4.Controls.Add(this.btnSearch); + this.ucGroupBoxEx4.Controls.Add(this.btnClearUpload); + this.ucGroupBoxEx4.Controls.Add(this.lblWaitToUp); + this.ucGroupBoxEx4.Controls.Add(this.lblGoodsCount); + this.ucGroupBoxEx4.Controls.Add(this.txtAddCount); + this.ucGroupBoxEx4.Controls.Add(this.panelEx2); this.ucGroupBoxEx4.Location = new System.Drawing.Point(147, 2); this.ucGroupBoxEx4.Name = "ucGroupBoxEx4"; - this.ucGroupBoxEx4.Size = new System.Drawing.Size(737, 120); + this.ucGroupBoxEx4.Size = new System.Drawing.Size(338, 140); this.ucGroupBoxEx4.TabIndex = 666; this.ucGroupBoxEx4.TabStop = false; - this.ucGroupBoxEx4.Text = "待传商品查询"; + this.ucGroupBoxEx4.Text = "待传商品"; // - // pnlEmpty + // btnClearUpload // - this.pnlEmpty.CanvasColor = System.Drawing.SystemColors.Control; - this.pnlEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.pnlEmpty.DisabledBackColor = System.Drawing.Color.Empty; - this.pnlEmpty.Location = new System.Drawing.Point(664, 32); - this.pnlEmpty.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); - this.pnlEmpty.Name = "pnlEmpty"; - this.pnlEmpty.Size = new System.Drawing.Size(56, 23); - this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center; - this.pnlEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.pnlEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.pnlEmpty.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.pnlEmpty.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.pnlEmpty.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.pnlEmpty.Style.GradientAngle = 90; - this.pnlEmpty.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; - this.pnlEmpty.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.pnlEmpty.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.pnlEmpty.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.pnlEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.pnlEmpty.TabIndex = 504; - this.pnlEmpty.Text = "清空条件"; - this.pnlEmpty.Click += new System.EventHandler(this.pnlEmpty_Click); + this.btnClearUpload.CanvasColor = System.Drawing.SystemColors.Control; + this.btnClearUpload.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClearUpload.DisabledBackColor = System.Drawing.Color.Empty; + this.btnClearUpload.Location = new System.Drawing.Point(219, 72); + this.btnClearUpload.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); + this.btnClearUpload.Name = "btnClearUpload"; + this.btnClearUpload.Size = new System.Drawing.Size(76, 23); + this.btnClearUpload.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearUpload.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnClearUpload.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnClearUpload.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnClearUpload.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearUpload.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnClearUpload.Style.GradientAngle = 90; + this.btnClearUpload.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearUpload.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearUpload.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearUpload.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearUpload.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnClearUpload.TabIndex = 548; + this.btnClearUpload.Text = "清空待上传"; + this.btnClearUpload.Click += new System.EventHandler(this.btnClearUpload_Click); // - // label5 + // lblWaitToUp // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(319, 35); - this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(31, 17); - this.label5.TabIndex = 500; - this.label5.Text = "SPU"; + this.lblWaitToUp.AutoSize = true; + this.lblWaitToUp.Location = new System.Drawing.Point(18, 76); + this.lblWaitToUp.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblWaitToUp.Name = "lblWaitToUp"; + this.lblWaitToUp.Size = new System.Drawing.Size(95, 17); + this.lblWaitToUp.TabIndex = 541; + this.lblWaitToUp.Text = "待上传商品 0 件"; // - // txtSKC + // lblGoodsCount // - this.txtSKC.Location = new System.Drawing.Point(473, 32); - this.txtSKC.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); - this.txtSKC.Name = "txtSKC"; - this.txtSKC.Size = new System.Drawing.Size(86, 23); - this.txtSKC.TabIndex = 497; + this.lblGoodsCount.AutoSize = true; + this.lblGoodsCount.Location = new System.Drawing.Point(164, 35); + this.lblGoodsCount.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblGoodsCount.Name = "lblGoodsCount"; + this.lblGoodsCount.Size = new System.Drawing.Size(131, 17); + this.lblGoodsCount.TabIndex = 537; + this.lblGoodsCount.Text = "产品库中共有 0 件商品"; // - // txtSPU + // txtAddCount // - this.txtSPU.Location = new System.Drawing.Point(351, 32); - this.txtSPU.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); - this.txtSPU.Name = "txtSPU"; - this.txtSPU.Size = new System.Drawing.Size(86, 23); - this.txtSPU.TabIndex = 499; + this.txtAddCount.Location = new System.Drawing.Point(20, 32); + this.txtAddCount.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtAddCount.Name = "txtAddCount"; + this.txtAddCount.Size = new System.Drawing.Size(47, 23); + this.txtAddCount.TabIndex = 536; + this.txtAddCount.Text = "500"; // - // label1 + // panelEx2 // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(442, 35); - this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(31, 17); - this.label1.TabIndex = 498; - this.label1.Text = "SKC"; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(563, 76); - this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(32, 17); - this.label2.TabIndex = 490; - this.label2.Text = "货号"; - this.label2.Visible = false; - // - // txtExtCode - // - this.txtExtCode.Location = new System.Drawing.Point(595, 73); - this.txtExtCode.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); - this.txtExtCode.Name = "txtExtCode"; - this.txtExtCode.Size = new System.Drawing.Size(86, 23); - this.txtExtCode.TabIndex = 489; - this.txtExtCode.Visible = false; - // - // label13 - // - this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(172, 76); - this.label13.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(56, 17); - this.label13.TabIndex = 487; - this.label13.Text = "上传备注"; - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(39, 35); - this.label6.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(44, 17); - this.label6.TabIndex = 482; - this.label6.Text = "店铺Id"; - // - // cmbNotes - // - this.cmbNotes.FormattingEnabled = true; - this.cmbNotes.Items.AddRange(new object[] { - "全部", - "无备注", - "核价成功", - "核价成功(重复)", - "重复"}); - this.cmbNotes.Location = new System.Drawing.Point(229, 72); - this.cmbNotes.Margin = new System.Windows.Forms.Padding(0); - this.cmbNotes.Name = "cmbNotes"; - this.cmbNotes.Size = new System.Drawing.Size(85, 25); - this.cmbNotes.TabIndex = 488; - this.cmbNotes.Text = "全部"; - // - // txtShopId - // - this.txtShopId.Location = new System.Drawing.Point(83, 32); - this.txtShopId.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); - this.txtShopId.Name = "txtShopId"; - this.txtShopId.Size = new System.Drawing.Size(85, 23); - this.txtShopId.TabIndex = 481; - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(172, 35); - this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(56, 17); - this.label7.TabIndex = 484; - this.label7.Text = "店铺名称"; - // - // txtShopName - // - this.txtShopName.Location = new System.Drawing.Point(228, 32); - this.txtShopName.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); - this.txtShopName.Name = "txtShopName"; - this.txtShopName.Size = new System.Drawing.Size(86, 23); - this.txtShopName.TabIndex = 483; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(441, 76); - this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(32, 17); - this.label3.TabIndex = 476; - this.label3.Text = "标题"; - // - // txtProdName - // - this.txtProdName.Location = new System.Drawing.Point(473, 73); - this.txtProdName.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); - this.txtProdName.Name = "txtProdName"; - this.txtProdName.Size = new System.Drawing.Size(86, 23); - this.txtProdName.TabIndex = 475; - // - // cmbUserNotes - // - this.cmbUserNotes.FormattingEnabled = true; - this.cmbUserNotes.Items.AddRange(new object[] { - "全部", - "重上", - "已买"}); - this.cmbUserNotes.Location = new System.Drawing.Point(351, 72); - this.cmbUserNotes.Margin = new System.Windows.Forms.Padding(0); - this.cmbUserNotes.Name = "cmbUserNotes"; - this.cmbUserNotes.Size = new System.Drawing.Size(85, 25); - this.cmbUserNotes.TabIndex = 486; - this.cmbUserNotes.Text = "全部"; - // - // label12 - // - this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(318, 76); - this.label12.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(32, 17); - this.label12.TabIndex = 485; - this.label12.Text = "备注"; - // - // cmbStatus - // - this.cmbStatus.FormattingEnabled = true; - this.cmbStatus.Items.AddRange(new object[] { - "待上传", - "已上传", - "草稿箱", - "全部"}); - this.cmbStatus.Location = new System.Drawing.Point(83, 72); - this.cmbStatus.Name = "cmbStatus"; - this.cmbStatus.Size = new System.Drawing.Size(85, 25); - this.cmbStatus.TabIndex = 461; - this.cmbStatus.Text = "待上传"; - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(26, 76); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(56, 17); - this.label8.TabIndex = 460; - this.label8.Text = "认领状态"; - // - // btnSearch - // - this.btnSearch.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnSearch.DisabledBackColor = System.Drawing.Color.Empty; - this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSearch.Location = new System.Drawing.Point(572, 32); - this.btnSearch.Name = "btnSearch"; - this.btnSearch.Size = new System.Drawing.Size(90, 23); - this.btnSearch.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnSearch.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnSearch.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnSearch.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnSearch.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnSearch.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnSearch.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnSearch.Style.GradientAngle = 90; - this.btnSearch.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnSearch.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnSearch.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnSearch.TabIndex = 427; - this.btnSearch.Text = "待传商品查询"; - this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click); + this.panelEx2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.panelEx2.Cursor = System.Windows.Forms.Cursors.Hand; + this.panelEx2.DisabledBackColor = System.Drawing.Color.Empty; + this.panelEx2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.panelEx2.Location = new System.Drawing.Point(70, 32); + this.panelEx2.Name = "panelEx2"; + this.panelEx2.Size = new System.Drawing.Size(90, 23); + this.panelEx2.Style.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx2.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx2.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx2.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.panelEx2.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.panelEx2.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.panelEx2.Style.ForeColor.Color = System.Drawing.Color.White; + this.panelEx2.Style.GradientAngle = 90; + this.panelEx2.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx2.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.panelEx2.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.panelEx2.TabIndex = 431; + this.panelEx2.Text = "随机添加商品"; + this.panelEx2.Click += new System.EventHandler(this.btnRandomAdd_Click); // // ucGroupBoxEx1 // @@ -596,7 +662,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.ucGroupBoxEx1.Controls.Add(this.btnRefreshShop); this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2); this.ucGroupBoxEx1.Name = "ucGroupBoxEx1"; - this.ucGroupBoxEx1.Size = new System.Drawing.Size(144, 120); + this.ucGroupBoxEx1.Size = new System.Drawing.Size(144, 140); this.ucGroupBoxEx1.TabIndex = 399; this.ucGroupBoxEx1.TabStop = false; this.ucGroupBoxEx1.Text = "基础"; @@ -641,8 +707,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms // splitContainer3.Panel2 // this.splitContainer3.Panel2.Controls.Add(this.splitContainer4); - this.splitContainer3.Size = new System.Drawing.Size(1284, 422); - this.splitContainer3.SplitterDistance = 392; + this.splitContainer3.Size = new System.Drawing.Size(1344, 402); + this.splitContainer3.SplitterDistance = 372; this.splitContainer3.TabIndex = 1; // // splitContainer2 @@ -659,11 +725,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // splitContainer2.Panel2 // + this.splitContainer2.Panel2.Controls.Add(this.panel2); this.splitContainer2.Panel2.Controls.Add(this.pbLoading); this.splitContainer2.Panel2.Controls.Add(this.panel1); this.splitContainer2.Panel2.Controls.Add(this.dgvSelectProduct); this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0); - this.splitContainer2.Size = new System.Drawing.Size(1284, 392); + this.splitContainer2.Size = new System.Drawing.Size(1344, 372); this.splitContainer2.SplitterDistance = 300; this.splitContainer2.TabIndex = 0; // @@ -671,18 +738,18 @@ namespace TemuKJD.PDDForms.ProductSelectForms // this.dgvShop.AllowUserToAddRows = false; this.dgvShop.AllowUserToDeleteRows = false; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle16.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle16; this.dgvShop.BackgroundColor = System.Drawing.Color.White; this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle17; this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colSelect, @@ -701,7 +768,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.dgvShop.ReadOnly = true; this.dgvShop.RowHeadersWidth = 25; this.dgvShop.RowTemplate.Height = 23; - this.dgvShop.Size = new System.Drawing.Size(296, 392); + this.dgvShop.Size = new System.Drawing.Size(296, 372); this.dgvShop.TabIndex = 6; this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); // @@ -752,14 +819,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colSelectProduct.ReadOnly = true; this.colSelectProduct.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.colSelectProduct.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSelectProduct.Visible = false; this.colSelectProduct.Width = 62; // // colLoginStatus // - this.colLoginStatus.HeaderText = "登录状态"; + this.colLoginStatus.HeaderText = "状态"; this.colLoginStatus.Name = "colLoginStatus"; this.colLoginStatus.ReadOnly = true; - this.colLoginStatus.Visible = false; + this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colLoginStatus.Width = 40; // // colCanUse // @@ -776,6 +846,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colRemaining.HeaderText = "月限额"; this.colRemaining.Name = "colRemaining"; this.colRemaining.ReadOnly = true; + this.colRemaining.Visible = false; // // colMessage // @@ -783,11 +854,297 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colMessage.Name = "colMessage"; this.colMessage.ReadOnly = true; // + // panel2 + // + this.panel2.Controls.Add(this.pnlEmpty); + this.panel2.Controls.Add(this.txtShopId); + this.panel2.Controls.Add(this.label5); + this.panel2.Controls.Add(this.txtSKC); + this.panel2.Controls.Add(this.btnSearch); + this.panel2.Controls.Add(this.label8); + this.panel2.Controls.Add(this.txtSPU); + this.panel2.Controls.Add(this.cmbStatus); + this.panel2.Controls.Add(this.label1); + this.panel2.Controls.Add(this.label12); + this.panel2.Controls.Add(this.label2); + this.panel2.Controls.Add(this.cmbUserNotes); + this.panel2.Controls.Add(this.txtExtCode); + this.panel2.Controls.Add(this.txtProdName); + this.panel2.Controls.Add(this.label13); + this.panel2.Controls.Add(this.label3); + this.panel2.Controls.Add(this.label6); + this.panel2.Controls.Add(this.txtShopName); + this.panel2.Controls.Add(this.cmbNotes); + this.panel2.Controls.Add(this.btnDelSelect); + this.panel2.Controls.Add(this.label7); + this.panel2.Location = new System.Drawing.Point(18, 37); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(851, 100); + this.panel2.TabIndex = 190; + this.panel2.Visible = false; + // + // pnlEmpty + // + this.pnlEmpty.CanvasColor = System.Drawing.SystemColors.Control; + this.pnlEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.pnlEmpty.DisabledBackColor = System.Drawing.Color.Empty; + this.pnlEmpty.Location = new System.Drawing.Point(653, 16); + this.pnlEmpty.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); + this.pnlEmpty.Name = "pnlEmpty"; + this.pnlEmpty.Size = new System.Drawing.Size(56, 23); + this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center; + this.pnlEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.pnlEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.pnlEmpty.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.pnlEmpty.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlEmpty.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.pnlEmpty.Style.GradientAngle = 90; + this.pnlEmpty.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.pnlEmpty.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.pnlEmpty.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlEmpty.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.pnlEmpty.TabIndex = 504; + this.pnlEmpty.Text = "清空条件"; + this.pnlEmpty.Click += new System.EventHandler(this.pnlEmpty_Click); + // + // txtShopId + // + this.txtShopId.Location = new System.Drawing.Point(72, 16); + this.txtShopId.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtShopId.Name = "txtShopId"; + this.txtShopId.Size = new System.Drawing.Size(85, 23); + this.txtShopId.TabIndex = 481; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(308, 19); + this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(31, 17); + this.label5.TabIndex = 500; + this.label5.Text = "SPU"; + // + // txtSKC + // + this.txtSKC.Location = new System.Drawing.Point(462, 16); + this.txtSKC.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtSKC.Name = "txtSKC"; + this.txtSKC.Size = new System.Drawing.Size(86, 23); + this.txtSKC.TabIndex = 497; + // + // btnSearch + // + this.btnSearch.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSearch.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSearch.Location = new System.Drawing.Point(560, 16); + this.btnSearch.Name = "btnSearch"; + this.btnSearch.Size = new System.Drawing.Size(90, 23); + this.btnSearch.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearch.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearch.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearch.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSearch.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSearch.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSearch.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSearch.Style.GradientAngle = 90; + this.btnSearch.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearch.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearch.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearch.TabIndex = 427; + this.btnSearch.Text = "待传商品查询"; + this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click); + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(15, 60); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(56, 17); + this.label8.TabIndex = 460; + this.label8.Text = "认领状态"; + // + // txtSPU + // + this.txtSPU.Location = new System.Drawing.Point(340, 16); + this.txtSPU.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtSPU.Name = "txtSPU"; + this.txtSPU.Size = new System.Drawing.Size(86, 23); + this.txtSPU.TabIndex = 499; + // + // cmbStatus + // + this.cmbStatus.FormattingEnabled = true; + this.cmbStatus.Items.AddRange(new object[] { + "待上传", + "已上传", + "草稿箱", + "全部"}); + this.cmbStatus.Location = new System.Drawing.Point(72, 56); + this.cmbStatus.Name = "cmbStatus"; + this.cmbStatus.Size = new System.Drawing.Size(85, 25); + this.cmbStatus.TabIndex = 461; + this.cmbStatus.Text = "待上传"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(431, 19); + this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(31, 17); + this.label1.TabIndex = 498; + this.label1.Text = "SKC"; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(307, 60); + this.label12.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(32, 17); + this.label12.TabIndex = 485; + this.label12.Text = "备注"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(552, 60); + this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(32, 17); + this.label2.TabIndex = 490; + this.label2.Text = "货号"; + this.label2.Visible = false; + // + // cmbUserNotes + // + this.cmbUserNotes.FormattingEnabled = true; + this.cmbUserNotes.Items.AddRange(new object[] { + "全部", + "重上", + "已买"}); + this.cmbUserNotes.Location = new System.Drawing.Point(340, 56); + this.cmbUserNotes.Margin = new System.Windows.Forms.Padding(0); + this.cmbUserNotes.Name = "cmbUserNotes"; + this.cmbUserNotes.Size = new System.Drawing.Size(85, 25); + this.cmbUserNotes.TabIndex = 486; + this.cmbUserNotes.Text = "全部"; + // + // txtExtCode + // + this.txtExtCode.Location = new System.Drawing.Point(584, 57); + this.txtExtCode.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtExtCode.Name = "txtExtCode"; + this.txtExtCode.Size = new System.Drawing.Size(86, 23); + this.txtExtCode.TabIndex = 489; + this.txtExtCode.Visible = false; + // + // txtProdName + // + this.txtProdName.Location = new System.Drawing.Point(462, 57); + this.txtProdName.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtProdName.Name = "txtProdName"; + this.txtProdName.Size = new System.Drawing.Size(86, 23); + this.txtProdName.TabIndex = 475; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(161, 60); + this.label13.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(56, 17); + this.label13.TabIndex = 487; + this.label13.Text = "上传备注"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(430, 60); + this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(32, 17); + this.label3.TabIndex = 476; + this.label3.Text = "标题"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(28, 19); + this.label6.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(44, 17); + this.label6.TabIndex = 482; + this.label6.Text = "店铺Id"; + // + // txtShopName + // + this.txtShopName.Location = new System.Drawing.Point(217, 16); + this.txtShopName.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtShopName.Name = "txtShopName"; + this.txtShopName.Size = new System.Drawing.Size(86, 23); + this.txtShopName.TabIndex = 483; + // + // cmbNotes + // + this.cmbNotes.FormattingEnabled = true; + this.cmbNotes.Items.AddRange(new object[] { + "全部", + "无备注", + "核价成功", + "核价成功(重复)", + "重复"}); + this.cmbNotes.Location = new System.Drawing.Point(218, 56); + this.cmbNotes.Margin = new System.Windows.Forms.Padding(0); + this.cmbNotes.Name = "cmbNotes"; + this.cmbNotes.Size = new System.Drawing.Size(85, 25); + this.cmbNotes.TabIndex = 488; + this.cmbNotes.Text = "全部"; + // + // btnDelSelect + // + this.btnDelSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnDelSelect.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnDelSelect.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnDelSelect.DisabledBackColor = System.Drawing.Color.Empty; + this.btnDelSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnDelSelect.Location = new System.Drawing.Point(687, 58); + this.btnDelSelect.Name = "btnDelSelect"; + this.btnDelSelect.Size = new System.Drawing.Size(147, 23); + this.btnDelSelect.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnDelSelect.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnDelSelect.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnDelSelect.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnDelSelect.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnDelSelect.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnDelSelect.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnDelSelect.Style.GradientAngle = 90; + this.btnDelSelect.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnDelSelect.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnDelSelect.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnDelSelect.TabIndex = 468; + this.btnDelSelect.Text = "删除选中记录"; + this.btnDelSelect.Click += new System.EventHandler(this.btnDelSelect_Click); + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(161, 19); + this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(56, 17); + this.label7.TabIndex = 484; + this.label7.Text = "店铺名称"; + // // pbLoading // this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None; this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; - this.pbLoading.Location = new System.Drawing.Point(465, 171); + this.pbLoading.Location = new System.Drawing.Point(495, 161); this.pbLoading.Name = "pbLoading"; this.pbLoading.Size = new System.Drawing.Size(50, 50); this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -802,7 +1159,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms | System.Windows.Forms.AnchorStyles.Right))); this.panel1.Location = new System.Drawing.Point(36, 53); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(906, 306); + this.panel1.Size = new System.Drawing.Size(966, 286); this.panel1.TabIndex = 189; this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); // @@ -810,18 +1167,18 @@ namespace TemuKJD.PDDForms.ProductSelectForms // this.dgvSelectProduct.AllowUserToAddRows = false; this.dgvSelectProduct.AllowUserToDeleteRows = false; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle18.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle18; this.dgvSelectProduct.BackgroundColor = System.Drawing.Color.White; this.dgvSelectProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle19.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle19; this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colCheck, @@ -842,13 +1199,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colNotes, this.colUserNotes, this.ColDelete, + this.colAddTime, this.colOpResult}); this.dgvSelectProduct.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvSelectProduct.Location = new System.Drawing.Point(0, 0); this.dgvSelectProduct.Name = "dgvSelectProduct"; this.dgvSelectProduct.ReadOnly = true; this.dgvSelectProduct.RowTemplate.Height = 23; - this.dgvSelectProduct.Size = new System.Drawing.Size(976, 392); + this.dgvSelectProduct.Size = new System.Drawing.Size(1036, 372); this.dgvSelectProduct.TabIndex = 187; this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick); this.dgvSelectProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvSelectProduct_Scroll); @@ -905,7 +1263,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // colSpuId // - this.colSpuId.HeaderText = "商品SPU"; + this.colSpuId.HeaderText = "商品ID"; this.colSpuId.Name = "colSpuId"; this.colSpuId.ReadOnly = true; this.colSpuId.Resizable = System.Windows.Forms.DataGridViewTriState.True; @@ -920,6 +1278,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colSkcId.ReadOnly = true; this.colSkcId.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.colSkcId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSkcId.Visible = false; this.colSkcId.Width = 80; // // colImgUrl @@ -939,12 +1298,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // colProductName // - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colProductName.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProductName.DefaultCellStyle = dataGridViewCellStyle20; this.colProductName.HeaderText = "商品标题"; this.colProductName.Name = "colProductName"; this.colProductName.ReadOnly = true; - this.colProductName.Width = 120; + this.colProductName.Width = 220; // // colProductCat // @@ -979,6 +1338,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colNotes.HeaderText = "上传备注"; this.colNotes.Name = "colNotes"; this.colNotes.ReadOnly = true; + this.colNotes.Visible = false; // // colUserNotes // @@ -994,13 +1354,22 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.ColDelete.HeaderText = "删除"; this.ColDelete.Name = "ColDelete"; this.ColDelete.ReadOnly = true; + this.ColDelete.Visible = false; this.ColDelete.Width = 75; // + // colAddTime + // + this.colAddTime.FillWeight = 110F; + this.colAddTime.HeaderText = "上传时间"; + this.colAddTime.Name = "colAddTime"; + this.colAddTime.ReadOnly = true; + // // colOpResult // this.colOpResult.HeaderText = "操作结果"; this.colOpResult.Name = "colOpResult"; this.colOpResult.ReadOnly = true; + this.colOpResult.Width = 200; // // splitContainer4 // @@ -1018,8 +1387,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.splitContainer4.Panel2.Controls.Add(this.btnClear); this.splitContainer4.Panel2.Controls.Add(this.panelEx1); this.splitContainer4.Panel2.Controls.Add(this.ucSplitPage1); - this.splitContainer4.Size = new System.Drawing.Size(1284, 26); - this.splitContainer4.SplitterDistance = 593; + this.splitContainer4.Size = new System.Drawing.Size(1344, 26); + this.splitContainer4.SplitterDistance = 653; this.splitContainer4.TabIndex = 3; // // statusBar @@ -1030,7 +1399,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.statusBar.Location = new System.Drawing.Point(0, 0); this.statusBar.Margin = new System.Windows.Forms.Padding(0); this.statusBar.Name = "statusBar"; - this.statusBar.Size = new System.Drawing.Size(593, 26); + this.statusBar.Size = new System.Drawing.Size(653, 26); this.statusBar.TabIndex = 2; // // btnClear @@ -1097,15 +1466,28 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.ucSplitPage1.TabIndex = 675; this.ucSplitPage1.TotalPage = 1; // + // chkSizeSpec + // + this.chkSizeSpec.AutoSize = true; + this.chkSizeSpec.Checked = true; + this.chkSizeSpec.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkSizeSpec.Location = new System.Drawing.Point(577, 87); + this.chkSizeSpec.Name = "chkSizeSpec"; + this.chkSizeSpec.Size = new System.Drawing.Size(111, 21); + this.chkSizeSpec.TabIndex = 635; + this.chkSizeSpec.Text = "使用上家尺码表"; + this.chkSizeSpec.UseVisualStyleBackColor = true; + this.chkSizeSpec.CheckedChanged += new System.EventHandler(this.chkSizeSpec_CheckedChanged); + // // PDDDBProdUserSelectForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.ClientSize = new System.Drawing.Size(1284, 546); + this.ClientSize = new System.Drawing.Size(1344, 546); this.Controls.Add(this.splitContainer1); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Name = "PDDDBProdUserSelectForm"; - this.Text = "UserSelectDbProductForm"; + this.Text = "PDDDBProdUserSelectForm"; this.Load += new System.EventHandler(this.UserSelectDbProductForm_Load); this.VisibleChanged += new System.EventHandler(this.UserSelectDbProductForm_VisibleChanged); this.splitContainer1.Panel1.ResumeLayout(false); @@ -1114,6 +1496,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.splitContainer1.ResumeLayout(false); this.ucGroupBoxEx2.ResumeLayout(false); this.ucGroupBoxEx2.PerformLayout(); + this.panel4.ResumeLayout(false); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + this.fPnlPriceRule.ResumeLayout(false); + this.fPnlPriceRule.PerformLayout(); this.ucGroupBoxEx4.ResumeLayout(false); this.ucGroupBoxEx4.PerformLayout(); this.ucGroupBoxEx1.ResumeLayout(false); @@ -1126,6 +1513,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); this.splitContainer2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit(); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).EndInit(); this.splitContainer4.Panel1.ResumeLayout(false); @@ -1174,6 +1563,45 @@ namespace TemuKJD.PDDForms.ProductSelectForms private System.Windows.Forms.Label label1; private DevComponents.DotNetBar.PanelEx pnlEmpty; private DevComponents.DotNetBar.PanelEx btnUpload; + private System.Windows.Forms.Panel panel1; + private UserComponent.UcGroupBoxEx ucGroupBoxEx2; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.TextBox txtAddMorePrice; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox txtAddTimes; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TextBox txtStockNum; + private System.Windows.Forms.Label label4; + private DevComponents.DotNetBar.PanelEx btnStop; + private UserComponent.UcCheckBox chkChance; + private DevComponents.DotNetBar.PanelEx panelEx2; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.TextBox txtAddCount; + private System.Windows.Forms.Label lblGoodsCount; + private System.Windows.Forms.Label lblWaitToUp; + private DevComponents.DotNetBar.PanelEx btnClearUpload; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Label lblNewAddPrice; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.TextBox txtSinglePriceAdd; + private System.Windows.Forms.Label label14; + private UserComponent.UcCheckBox chkStepAddPrice; + private DevComponents.DotNetBar.PanelEx btnClearDgv; + private UserComponent.UcCheckBox chkAddMorePriceFirst; + private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopName; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes; + private System.Windows.Forms.DataGridViewLinkColumn colSelectProduct; + private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse; + private System.Windows.Forms.DataGridViewTextBoxColumn colRemaining; + private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; + private System.Windows.Forms.FlowLayoutPanel fPnlPriceRule; + private UcAddPrice ucAddPrice1; + private UcAddPrice ucAddPrice3; private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck; private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId; private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId; @@ -1192,26 +1620,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms private System.Windows.Forms.DataGridViewTextBoxColumn colNotes; private System.Windows.Forms.DataGridViewLinkColumn colUserNotes; private System.Windows.Forms.DataGridViewLinkColumn ColDelete; + private System.Windows.Forms.DataGridViewTextBoxColumn colAddTime; private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; - private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName; - private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; - private System.Windows.Forms.DataGridViewTextBoxColumn colShopName; - private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes; - private System.Windows.Forms.DataGridViewLinkColumn colSelectProduct; - private System.Windows.Forms.DataGridViewTextBoxColumn colLoginStatus; - private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse; - private System.Windows.Forms.DataGridViewTextBoxColumn colRemaining; - private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; - private UserComponent.UcGroupBoxEx ucGroupBoxEx2; - private System.Windows.Forms.Label label11; - private System.Windows.Forms.TextBox txtAddMorePrice; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.TextBox txtAddTimes; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.TextBox txtStockNum; - private System.Windows.Forms.Label label4; - private DevComponents.DotNetBar.PanelEx btnStop; + private UserComponent.UcCheckBox chkSizeSpec; } } \ No newline at end of file diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs index 043b1ec..4838a58 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs @@ -31,9 +31,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms public partial class PDDDBProdUserSelectForm : BaseForm { public CancellationTokenSource cancellationTokenSource { get; set; } = null; + bool isInit = false; + bool isChanceApi = false; + bool isUseUpperSizeSpec = true; + bool isAddMorePriceFirst = false; + bool isStepAddPrice = false; CheckBox chkSelectAll = null; - List lstTemuDBProductSelect = new List(); + NaiBa.Util.ConcurrentList lstTemuDBProductSelect = new NaiBa.Util.ConcurrentList(); + NaiBa.Util.ConcurrentList lstAddPriceRule = new NaiBa.Util.ConcurrentList(); + AddPriceRule defaultAddPriceRule = new AddPriceRule(); public PDDDBProdUserSelectForm() { InitializeComponent(); @@ -41,6 +48,55 @@ namespace TemuKJD.PDDForms.ProductSelectForms private void UserSelectDbProductForm_Load(object sender, EventArgs e) { + lstTemuDBProductSelect = NaiBa.Util.Helper.ConfigHelper.LoadConfig>("pdd_db_prod_upload_list"); + if (lstTemuDBProductSelect == null) + lstTemuDBProductSelect = new NaiBa.Util.ConcurrentList(); + + lstAddPriceRule = NaiBa.Util.Helper.ConfigHelper.LoadConfig>("pdd_add_price_rules"); + if (lstAddPriceRule == null) + { + lstAddPriceRule = new NaiBa.Util.ConcurrentList(); + lstAddPriceRule.Add(new AddPriceRule() { MoreThanPrice = 0, LessThanPrice = 10, AddPriceTimes = 2, AddMorePrice = 5, SinglePriceAdd = 1 }); + lstAddPriceRule.Add(new AddPriceRule() { MoreThanPrice = 10, LessThanPrice = 20, AddPriceTimes = 2, AddMorePrice = 5, SinglePriceAdd = 1 }); + lstAddPriceRule.Add(new AddPriceRule() { MoreThanPrice = 20, LessThanPrice = 999, AddPriceTimes = 2, AddMorePrice = 5, SinglePriceAdd = 1 }); + } + this.fPnlPriceRule.Controls.Clear(); + foreach (var priceItem in lstAddPriceRule) + { + var ucPrice = new UcAddPrice() + { + PriceEnd = priceItem.LessThanPrice, + PriceStart = priceItem.MoreThanPrice, + PriceAddTimes = priceItem.AddPriceTimes, + PriceAddMore = priceItem.AddMorePrice, + SinglePriceAdd = priceItem.SinglePriceAdd, + }; + if (IsSetFontScaleNone) + { + Font of = ucPrice.Font; + Font nf = new Font(of.FontFamily, (of.Size * 96.0 / FormDpi).ParseToFloat(), of.Style, of.Unit, of.GdiCharSet, of.Bold); + ucPrice.Font = nf; + } + + this.fPnlPriceRule.Controls.Add(ucPrice); + ucPrice.PriceChange += ucAddPrice_PriceChange; + } + + defaultAddPriceRule = NaiBa.Util.Helper.ConfigHelper.LoadConfig("pdd_default_add_price_rule"); + if (defaultAddPriceRule == null) + { + defaultAddPriceRule = new AddPriceRule() { AddPriceTimes = 1.3m, AddMorePrice = 1, SinglePriceAdd = 1 }; + } + this.txtAddTimes.Text = defaultAddPriceRule.AddPriceTimes.ToString(); + this.txtAddMorePrice.Text = defaultAddPriceRule.AddMorePrice.ToString(); + this.txtSinglePriceAdd.Text = defaultAddPriceRule.SinglePriceAdd.ToString(); + + this.lblWaitToUp.Text = "待上传商品 " + lstTemuDBProductSelect.Count + " 件"; + + int prodCount = 0; + var list = GetRandomProductList(out prodCount, 1, 1); + lblGoodsCount.Text = "产品库中共有 " + prodCount + " 件商品"; + this.panel1.SendToBack(); chkSelectAll = dgvShop.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false); dgvShop.Columns["colSelect"].HeaderText = ""; @@ -50,6 +106,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.dgvSelectProduct.AddSelectorColumn("colCheck"); this.ucSplitPage1.PageChange += UcSplitPage1_PageChange; + + isChanceApi = chkChance.Checked; } private void UcSplitPage1_PageChange(object obj) @@ -91,6 +149,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms if (dgvSelectProduct.Rows.Count == 0) SearchDbProdSelect(1); } + isInit = true; } private void RefreshShop() @@ -122,7 +181,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms selectShopId = new List(); bool canUse = shopEntity.LoginStatus == "登录成功"; - canUse = true; // 内部库不需要校验登录状态 + //canUse = true; // 内部库不需要校验登录状态 var row = dgvShop.Rows.Cast().FirstOrDefault(p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == shopEntity.ShopId); if (row == null) { @@ -150,7 +209,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms row.Cells["colCanUse"].Value = canUse; row.Cells["colRemaining"].Value = shopEntity.AddProductRemaining; } - isInit = false; } private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e) @@ -182,7 +240,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms //BaseMsgForm.ShowInfo("店铺未登录!"); } break; - + case "colLoginStatus": + PDDShopLoginForm shopLoginForm = new PDDShopLoginForm(shop); + shopLoginForm.openType = EnumOpenType.login; + //shopLoginForm.SaveComplete += shopLoginForm_SaveComplete; + shopLoginForm.ShowDialog(); + //btnRefreshCookie_Click(null, null); + RefreshShop(); + break; case "colSelectProduct": // 认领商品 PDDDBProdListForm dbProductForm = new PDDDBProdListForm(shop); dbProductForm.ShowDialog(); @@ -209,6 +274,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms public void SearchDbProdSelect(int page) { + return; if (InvokeRequired) { Invoke(new Action(() => @@ -227,7 +293,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms Task.Run(() => { int pageCount; - var list = GetSelectProductList(out pageCount, page, 200); + var list = GetSelectProductList(out pageCount, page, 1000); lstTemuDBProductSelect.AddRange(list); this.ucSplitPage1.TotalPage = pageCount; @@ -253,7 +319,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms prodSelect.draft_id, prodSelect.notes, (prodSelect.user_notes + " 编辑").Trim(), - "删除"); + "删除", + "", + ""); dgvSelectProduct.Rows[rowIndex].Height = 60; })); @@ -344,13 +412,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms switch (headerText) { case "删除": - if (BaseMsgForm.ShowConfirm("确定删除商品吗?删除后不可恢复!").DialogResult == DialogResult.Cancel) - return; - var rst = DeleteProduct(dbId); - if (rst) - { - SearchDbProdSelect(this.ucSplitPage1.CurrentPage); - } + //if (BaseMsgForm.ShowConfirm("确定删除商品吗?删除后不可恢复!").DialogResult == DialogResult.Cancel) + // return; + //var rst = DeleteProduct(dbId); + //if (rst) + //{ + // SearchDbProdSelect(this.ucSplitPage1.CurrentPage); + //} break; case "登录": PDDShopLoginForm shopLoginForm = new PDDShopLoginForm(shop); @@ -500,23 +568,29 @@ namespace TemuKJD.PDDForms.ProductSelectForms continue; } - if (row.Cells["colProductSkcPic"].Value != null && row.Cells["colProductSkcPic"].Value != defaultBitmap) + if (row.Index >= 0 && row.Cells["colProductSkcPic"].Value != null && row.Cells["colProductSkcPic"].Value != defaultBitmap) continue; Image image = null; - string imgUrl = row.Cells["colImgUrl"]?.Value.ParseToString(); - string getImgError = ""; - if (!string.IsNullOrWhiteSpace(imgUrl)) - image = GetHtml.GetUrlImg(imgUrl, out getImgError); - if (!string.IsNullOrEmpty(getImgError)) - //BaseMsgForm.ShowError("图片加载失败 " + getImgError); - image = TemuKJD.Properties.Resources.errpic; + if (row.Index >= 0) + { + string imgUrl = row.Cells["colImgUrl"]?.Value.ParseToString(); + string getImgError = ""; + if (!string.IsNullOrWhiteSpace(imgUrl)) + image = GetHtml.GetUrlImg(imgUrl, out getImgError); + if (!string.IsNullOrEmpty(getImgError)) + //BaseMsgForm.ShowError("图片加载失败 " + getImgError); + image = TemuKJD.Properties.Resources.errpic; + } try { Invoke(new Action(() => { - row.Cells["colProductSkcPic"].Value = image; + if (row.Index >= 0) + { + row.Cells["colProductSkcPic"].Value = image; + } })); } catch @@ -533,17 +607,29 @@ namespace TemuKJD.PDDForms.ProductSelectForms private void btnUpload_Click(object sender, EventArgs e) { - var DbIdLst = dgvSelectProduct.Rows.Cast().Where(row - => row.Cells["colCheck"]?.Value.ParseToBool() == true).Select(r => r.Cells["colSelectId"]?.Value.ToString()).ToList(); - var prodList = this.lstTemuDBProductSelect.Where(p => DbIdLst.Contains(p.id.ParseToString())).ToArray(); + //var DbIdLst = dgvSelectProduct.Rows.Cast().Where(row + // => row.Cells["colCheck"]?.Value.ParseToBool() == true).Select(r => r.Cells["colSelectId"]?.Value.ToString()).ToList(); + //var prodList = this.lstTemuDBProductSelect.Where(p => DbIdLst.Contains(p.id.ParseToString())).ToArray(); + + var prodList = lstTemuDBProductSelect.ToList(); + var shopIdLst = dgvShop.Rows.Cast().Where(row + => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); + if (shopIdLst.Count <= 0) + { + BaseMsgForm.ShowError("未勾选上传店铺!"); + return; + } if (prodList.Count() > 0) { + if (PDDShopLoginForm.shopLoginInstance != null && PDDShopLoginForm.shopLoginInstance.IsDisposed != true) + PDDShopLoginForm.shopLoginInstance.Dispose(); + this.btnUpload.Enabled = false; cancellationTokenSource = new CancellationTokenSource(); Task.Run(() => { - AddProductArr(prodList); + AddProductArr(prodList, shopIdLst); Invoke(new Action(() => { this.btnUpload.Enabled = true; @@ -556,25 +642,85 @@ namespace TemuKJD.PDDForms.ProductSelectForms } } - void AddProductArr(TemuDBProductSelect[] prodSelect) + void AddProductArr(List prodSelect1, List shopIdLst) { Invoke(new Action(() => { this.pbLoading.Visible = true; - this.statusBar.lblTaskStatus.Text = "正在上传..."; - this.statusBar.pgbTaskProgress.Maximum = prodSelect.Length; + this.statusBar.lblTaskStatus.Text = "正在上传" + "...".Substring(0, DateTime.Now.Second % 4); + this.statusBar.pgbTaskProgress.Maximum = lstTemuDBProductSelect.Count; this.statusBar.UpdateProgressBar(0); })); int upCount = 0; + NaiBa.Util.ConcurrentList currentShopList = new NaiBa.Util.ConcurrentList(); ShopLoginInfo oldShop = null; - foreach (var prod in prodSelect) + while (lstTemuDBProductSelect.Count > 0) { if (cancellationTokenSource.IsCancellationRequested) break; Invoke(new Action(() => { + shopIdLst = dgvShop.Rows.Cast().Where(row + => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); + })); + while (shopIdLst.Count <= 0) + { + //BaseMsgForm.ShowError("请至少勾选一个店铺!"); + Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "请至少勾选一个店铺"; + shopIdLst = dgvShop.Rows.Cast().Where(row + => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); + })); + Thread.Sleep(1000); + if (cancellationTokenSource.IsCancellationRequested) + break; + } + var randomShopLst = GlobalConfig.ShopLoginList.Where(s => shopIdLst.Contains(s.ShopId) && s.LoginStatus == "登录成功").ToList(); + while (randomShopLst.Count <= 0) + { + //BaseMsgForm.ShowError("所有店铺都已掉线!"); + + Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "所有店铺都已掉线,请登录店铺"; + randomShopLst = GlobalConfig.ShopLoginList.Where(s => shopIdLst.Contains(s.ShopId) && s.LoginStatus == "登录成功").ToList(); + })); + Thread.Sleep(1000); + if (cancellationTokenSource.IsCancellationRequested) + break; + } + var randomShop = randomShopLst[Randomx.GetId(randomShopLst.Count)]; + while(currentShopList.Count >= 5) // 最多5店同传 + { + Thread.Sleep(100); + } + while(currentShopList.Contains(randomShop)) + { + Thread.Sleep(100); + randomShop = randomShopLst[Randomx.GetId(randomShopLst.Count)]; + } + + var prod = lstTemuDBProductSelect[0]; + if (randomShop != null) + { + prod.shop_id = randomShop.ShopId; + prod.shop_account = randomShop.ShopAccount = randomShop.ShopAccount; + } + + lstTemuDBProductSelect.RemoveAt(0); + NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_db_prod_upload_list", this.lstTemuDBProductSelect); + Invoke(new Action(() => + { + lblWaitToUp.Text = "待上传商品 " + lstTemuDBProductSelect.Count + " 件"; + })); + + Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "正在上传" + "...".Substring(0, DateTime.Now.Second % 4); + this.statusBar.pgbTaskProgress.Maximum = lstTemuDBProductSelect.Count + this.statusBar.pgbTaskProgress.Value + 1; this.statusBar.UpdateProgressBar(this.statusBar.pgbTaskProgress.Value + 1); })); @@ -587,144 +733,205 @@ namespace TemuKJD.PDDForms.ProductSelectForms continue; } - var row = dgvSelectProduct.Rows.Cast().FirstOrDefault(r => - r.Cells["colSelectId"]?.Value.ToString() == prod.id.ToString()); - double duration = 0; - if (row == null) + Invoke(new Action(() => { - Invoke(new Action(() => - { - BaseMsgForm.ShowError("商品已被清除,将为您跳过该商品!"); - })); - continue; - } + int rowIndex = 0; + this.dgvSelectProduct.Rows.Insert(rowIndex, + true, + prod.id, + prod.shop_id, + prod.shop_account, + "登录", + "进店", + prod.spu_id, + prod.skc_id, + prod.main_img, + defaultBitmap, + prod.product_name, // 用户端显示商品原名 + prod.cat_name, + prod.ext_code, + prod.status, + prod.draft_id, + prod.notes, + (prod.user_notes + " 编辑").Trim(), + "删除", + "", + ""); - var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == prod.shop_id); - if (shop == null) - continue; + dgvSelectProduct.Rows[rowIndex].Height = 60; - var kjdDbProd = GetProductDetail(prod.out_product_Id.ToString()); - if (kjdDbProd == null || kjdDbProd.id == 0) - { - if (kjdDbProd?.id == 0) + int maxRowCount = 10000; + while (dgvSelectProduct.Rows.Count > maxRowCount) { - prod.status = "已清除"; - var empty_url = BaseClass.BuildObjString("product/mdy_user_select_product_status"); - var empty_data = UserLogin.GetSignaturex() + - "&db_id=" + prod.id + - "&status=已清除"; - GetHtml.PostUtf8(empty_url, empty_data); + dgvSelectProduct.Rows.RemoveAt(maxRowCount); } + })); - Invoke(new Action(() => - { - row.Cells["colOpResult"].Value = "选品数据库商品已被清除"; - if (kjdDbProd?.id == 0) - row.Cells["colStatus"].Value = "已清除"; - })); - continue; - } - - int sleepTime = 0; - int sleepTimeTotal = 0; - var result = ""; - try + Invoke(new Action(() => { - upCount++; - if (oldShop != shop || upCount > 5) + ShowDgvImg(); + this.pbLoading.Visible = false; + })); + + currentShopList.Add(randomShop); + Task.Run(() => + { + DateTime startTime = DateTime.Now; + for (int j = 0; j < 1; j++) { - oldShop = shop; - upCount = 0; + var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == prod.shop_id); + if (shop == null) + continue; + + var row = dgvSelectProduct.Rows.Cast().FirstOrDefault(r => + r.Cells["colSelectId"]?.Value.ToString() == prod.id.ToString()); + double duration = 0; + if (row == null) + { + Invoke(new Action(() => + { + BaseMsgForm.ShowError("商品已被清除,将为您跳过该商品!"); + })); + continue; + } + + var kjdDbProd = GetProductDetail(prod.out_product_Id.ToString()); + if (kjdDbProd == null || kjdDbProd.id == 0) + { + if (kjdDbProd?.id == 0) + { + prod.status = "已清除"; + var empty_url = BaseClass.BuildObjString("product/mdy_user_select_product_status"); + var empty_data = UserLogin.GetSignaturex() + + "&db_id=" + prod.id + + "&status=已清除"; + GetHtml.PostUtf8(empty_url, empty_data); + } + + Invoke(new Action(() => + { + if (row.Index >= 0) + { + row.Cells["colOpResult"].Value = "选品数据库商品已被清除"; + if (kjdDbProd?.id == 0) + row.Cells["colStatus"].Value = "已清除"; + } + })); + continue; + } + + if (shop.LoginStatus != "登录成功") + { + Invoke(new Action(() => + { + if (row.Index >= 0) + { + row.Cells["colOpResult"].Value = "店铺掉线"; + } + })); + continue; + } + + int sleepTime = 0; + int sleepTimeTotal = 0; + var result = ""; + try + { + upCount++; + if (oldShop != shop || upCount > 5) + { + oldShop = shop; + upCount = 0; + + while (PDDShopLoginForm.shopLoginInstance != null && !PDDShopLoginForm.shopLoginInstance.IsDisposed) + { + Thread.Sleep(500); + } + + Invoke(new Action(() => + { + //this.panel1.BringToFront(); + PDDShopLoginForm loginForm = new PDDShopLoginForm(shop); + loginForm.TopLevel = false; + loginForm.openType = EnumOpenType.manage; + loginForm.WindowState = FormWindowState.Maximized; + loginForm.InitUrl = "https://mms.pinduoduo.com/home/"; + loginForm.Dock = DockStyle.Fill; + this.panel1.Controls.Add(loginForm); + loginForm.Show(); + this.panel1.SendToBack(); + })); + sleepTime = Randomx.GetId(2000, 5000); + sleepTimeTotal += sleepTime; + Thread.Sleep(sleepTime); + + Invoke(new Action(() => + { + if (PDDShopLoginForm.shopLoginInstance != null) + PDDShopLoginForm.shopLoginInstance.Dispose(); + })); + } + + //var prodDetailJson = GetHtml.UrlDecode(kjdDbProd.product_json); + result = UploadProduct(shop, kjdDbProd, prod, row.Cells["colOpResult"]); //将商品上传 + + if (result.Contains("会话已过期")) + { + if (PDDShopListForm.Instance == null) + { + PDDShopListForm.Instance = new PDDShopListForm(); + } + PDDShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false); + } + } + catch (Exception ex) + { + result = "{\"success\":false,\"status\":\"未上传\",\"errMsg\":\"" + ex.Message + "\"}"; + } + sleepTime = Randomx.GetId(200, 300); + sleepTimeTotal += sleepTime; + Thread.Sleep(sleepTime); + + DateTime endTime = DateTime.Now; + var timeSpan = endTime - startTime; + duration = timeSpan.TotalSeconds; + var error = BaseRegex.GetStringJson(ref result, "errMsg"); + if (!result.Contains("\"success\":true") && !result.Contains("上传成功")) + { + if (string.IsNullOrWhiteSpace(error)) + error = result; + Invoke(new Action(() => + { + if (row.Index >= 0) + { + row.Cells["colOpResult"].Value = error + " " + duration.ParseToInt() + "秒"; + } + })); + continue; + } + prod.status = BaseRegex.GetStringJson(ref result, "status"); + if (string.IsNullOrWhiteSpace(prod.status)) + prod.status = "待上传"; + var productDraftId = BaseRegex.GetStringJson(ref result, "draftId"); Invoke(new Action(() => { - this.panel1.BringToFront(); - PDDShopLoginForm loginForm = new PDDShopLoginForm(shop); - loginForm.TopLevel = false; - loginForm.openType = EnumOpenType.manage; - loginForm.WindowState = FormWindowState.Maximized; - loginForm.InitUrl = "https://mms.pinduoduo.com/home/"; - loginForm.Dock = DockStyle.Fill; - this.panel1.Controls.Add(loginForm); - loginForm.Show(); - this.panel1.SendToBack(); + if (row.Index >= 0) + { + row.Cells["colDraftId"].Value = productDraftId; // 草稿箱id + row.Cells["colAddTime"].Value = DateTime.Now.ToString("yy-MM-dd HH:mm:ss"); + row.Cells["colOpResult"].Value = (prod.status == "已上传" ? "已成功上传" : "已上传草稿箱" + (" " + error).TrimEnd(' ')) + " " + duration.ParseToInt() + "秒"; + row.Cells["colMsg"].Value = prod.status; + } })); - sleepTime = Randomx.GetId(1000, 2000); - sleepTimeTotal += sleepTime; - Thread.Sleep(sleepTime); } + currentShopList.Remove(randomShop); + }); + } - //var prodDetailJson = GetHtml.UrlDecode(kjdDbProd.product_json); - DateTime startTime = DateTime.Now; - result = UploadProduct(shop, kjdDbProd, prod, row.Cells["colOpResult"]); //将商品上传 - DateTime endTime = DateTime.Now; - var timeSpan = endTime - startTime; - duration = timeSpan.TotalSeconds; - - if (result.Contains("会话已过期")) - { - if (PDDShopListForm.Instance == null) - { - PDDShopListForm.Instance = new PDDShopListForm(); - } - PDDShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false); - } - } - catch (Exception ex) - { - result = "{\"success\":false,\"status\":\"未上传\",\"errMsg\":\"" + ex.Message + "\"}"; - } - sleepTime = Randomx.GetId(200, 300); - sleepTimeTotal += sleepTime; - Thread.Sleep(sleepTime); - - var error = BaseRegex.GetStringJson(ref result, "errMsg"); - if (!result.Contains("\"success\":true") && !result.Contains("上传成功")) - { - if (string.IsNullOrWhiteSpace(error)) - error = result; - Invoke(new Action(() => - { - row.Cells["colOpResult"].Value = error + " " + duration.ParseToInt() + "秒"; - })); - continue; - } - - prod.status = BaseRegex.GetStringJson(ref result, "status"); - if (string.IsNullOrWhiteSpace(prod.status)) - prod.status = "待上传"; - var productDraftId = BaseRegex.GetStringJson(ref result, "draftId"); - var url = BaseClass.BuildObjString("product/mdy_user_select_product_status"); - var data = UserLogin.GetSignaturex() + - "&db_id=" + prod.id + - "&draft_id=" + productDraftId + // draft_id即商品spuid - "&up_spu_id=" + prod.spu_id + - "&shop_id=" + prod.shop_id + - "&status=" + prod.status; - - var html = GetHtml.PostUtf8(url, data); - if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) - html = GetHtml.PostUtf8(url, data); - if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) - html = GetHtml.PostUtf8(url, data); - if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) - { - Invoke(new Action(() => - { - string opRst = prod.status == "已上传" ? "已成功上传" : "已上传草稿箱"; - row.Cells["colOpResult"].Value = opRst + "但保存到服务端失败:" + BaseRegex.GetStringJson(ref html, "msg") + (" " + error).Trim(' ') + " " + duration.ParseToInt() + "秒"; - row.Cells["colStatus"].Value = prod.status; - })); - } - else - { - Invoke(new Action(() => - { - row.Cells["colDraftId"].Value = productDraftId; // 草稿箱id - row.Cells["colOpResult"].Value = (prod.status == "已上传" ? "已成功上传" : "已上传草稿箱" + (" " + error).TrimEnd(' ')) + " " + duration.ParseToInt() + "秒"; - row.Cells["colMsg"].Value = prod.status; - })); - } + for (int i = 0; i < 200 && currentShopList.Count > 0; i++) + { + Thread.Sleep(1000); } Invoke(new Action(() => { @@ -741,7 +948,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.statusBar.lblTaskStatus.Text = "上传停止"; else this.statusBar.lblTaskStatus.Text = "上传完成"; - this.statusBar.UpdateProgressBar(prodSelect.Length); + this.statusBar.UpdateProgressBar(lstTemuDBProductSelect.Count); })); } @@ -759,34 +966,145 @@ namespace TemuKJD.PDDForms.ProductSelectForms })); } + //testUploadProd(shop); + //return "测试上货"; + + int sleepTime = 0; int sleepTimeTotal = 0; var prodInfo = JsonHelper.DeserializeJsonToObject(dbProd.product_json); var prodParam = new PDDProductUploadParam(); - // 发起新建商品 - string create_new_html = create_prod_commit_id(shop); - if (create_new_html.Contains("\"success\":true")) + int currentCount = 0; + Invoke(new Action(() => { - prodParam.goods_id = BaseRegex.GetLongJson(ref create_new_html, "goods_id"); - prodParam.goods_commit_id = BaseRegex.GetLongJson(ref create_new_html, "goods_commit_id").ParseToString(); + currentCount = this.statusBar.pgbTaskProgress.Value; + })); + + if (isChanceApi && currentCount % 700 < 400 && 1 == 1) //通过机会商品接口进入新增商品 + { + var searchText = prodInfo.detail.cats.LastOrDefault(c => !string.IsNullOrEmpty(c)).ParseToString(); + if (string.IsNullOrEmpty(searchText)) + searchText = "头发绳"; + var rst = GetChanceGoodsList(shop, searchText); + if (!rst.Contains("\"success\":true")) + { + var error = BaseRegex.GetStringJson(ref rst, "error_msg"); + if (string.IsNullOrEmpty(error)) + error = rst; + return "上传失败 " + error; + } + + var chance_id = BaseRegex.GetStringJson(ref rst, "chance_id"); + try + { + JObject obj = JObject.Parse(rst); + var chanceGoodJArr = obj["result"]["list"]; + var chanceGoodsString = JsonHelper.SerializeObject(chanceGoodJArr); + var chanceGoodLst = JsonHelper.DeserializeJsonToList(chanceGoodsString); + var chanceGood = chanceGoodLst.FirstOrDefault(g => g.cat_id_3 == prodInfo.detail.cat_id || g.cat_id_2 == prodInfo.detail.cat_id); + if (chanceGood != null) + chance_id = chanceGood.chance_id; + } + catch (Exception ex) { } + if (string.IsNullOrEmpty(chance_id)) + chance_id = "fff84ef8fc1b2919a9c3383d350f44cc"; + + Thread.Sleep(Randomx.GetId(2000, 5000)); + rst = GetChanceGoodsId(shop, searchText, chance_id); + if (rst.Contains("操作太过频繁,请稍后再试!")) + { + Thread.Sleep(Randomx.GetId(10000, 20000)); + rst = GetChanceGoodsId(shop, searchText, chance_id); + } + if (!rst.Contains("\"success\":true")) + { + var error = BaseRegex.GetStringJson(ref rst, "error_msg"); + if (string.IsNullOrEmpty(error)) + error = rst; + return "上传失败 " + error; + } + var draftId = BaseRegex.GetStringJson(ref rst, "draft_id"); + var goods_id = BaseRegex.GetLongJson(ref rst, "goods_id"); + prodParam.goods_commit_id = draftId; + prodParam.goods_id = goods_id; + if (prodParam.goods_id <= 0 || prodParam.goods_commit_id.ParseToLong() <= 0) + { + Thread.Sleep(Randomx.GetId(20, 80)); + //return "上传失败 申请机会商品ID失败" + rst.Replace("\"success\":true", "\"success1\":true"); + string create_new_html = create_prod_commit_id(shop); + if (create_new_html.Contains("\"success\":true")) + { + prodParam.goods_id = goods_id = BaseRegex.GetLongJson(ref create_new_html, "goods_id"); + prodParam.goods_commit_id = draftId = BaseRegex.GetLongJson(ref create_new_html, "goods_commit_id").ParseToString(); + } + else + { + var error = BaseRegex.GetStringJson(ref create_new_html, "error_msg"); + if (string.IsNullOrEmpty(error)) + error = create_new_html; + return "上传失败 " + error; + } + if (prodParam.goods_id <= 0 || prodParam.goods_commit_id.ParseToLong() <= 0) + { + return "上传失败 " + create_new_html; + } + } + + Thread.Sleep(Randomx.GetId(10, 50)); + rst = QueryChanceCommitDetail(shop, goods_id.ToString(), draftId); + if (!rst.Contains("\"success\":true")) + { + var error = BaseRegex.GetStringJson(ref rst, "error_msg"); + if (string.IsNullOrEmpty(error)) + error = rst; + return "上传失败 " + error; + } + var chance_cat_id = BaseRegex.GetStringJson(ref rst, "cat_id"); + + if (chance_cat_id != "0" && chance_cat_id != prodInfo.detail.cat_id.ParseToString()) + { + //如果机会商品的类目不一致,多获取一次类目模板,模拟进入编辑页后重选类目的行为 + Thread.Sleep(Randomx.GetId(10, 50)); + rst = GetChanceProdTemplate(shop, chance_cat_id, goods_id.ParseToString(), draftId); + Thread.Sleep(Randomx.GetId(1000, 5000)); + } } - else - { - var error = BaseRegex.GetStringJson(ref create_new_html, "error_msg"); - if (string.IsNullOrEmpty(error)) - error = create_new_html; - return "上传失败 " + error; - } - if (prodParam.goods_id <= 0 || prodParam.goods_commit_id.ParseToLong() <= 0) - { - return "上传失败 " + create_new_html; + else { + if (isChanceApi) + Thread.Sleep(Randomx.GetId(1000, 5000)); + // 发起新建商品 + string create_new_html = create_prod_commit_id(shop); + if (create_new_html.Contains("\"success\":true")) + { + prodParam.goods_id = BaseRegex.GetLongJson(ref create_new_html, "goods_id"); + prodParam.goods_commit_id = BaseRegex.GetLongJson(ref create_new_html, "goods_commit_id").ParseToString(); + } + else + { + var error = BaseRegex.GetStringJson(ref create_new_html, "error_msg"); + if (string.IsNullOrEmpty(error)) + error = create_new_html; + return "上传失败 " + error; + } + if (prodParam.goods_id <= 0 || prodParam.goods_commit_id.ParseToLong() <= 0) + { + return "上传失败 " + create_new_html; + } } - PDDProductTemplateInfo prodTemplateInfo = null; + if (cell != null) + { + Invoke(new Action(() => + { + cell.Value = "正在获取商品模板"; + })); + } + //商品属性模板 + PDDProductTemplateInfo prodCatTemplateInfo = null; Thread.Sleep(Randomx.GetId(10, 50)); - string prop_template_html = get_template(shop, prodInfo.detail.cat_id.ParseToString(), prodParam.goods_id.ToString(), prodParam.goods_commit_id); + string prop_template_html = get_cat_template(shop, prodInfo.detail.cat_id.ParseToString(), prodParam.goods_id.ToString(), prodParam.goods_commit_id); if (prop_template_html.Contains("\"success\":true")) { try @@ -794,8 +1112,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms prop_template_html = GetHtml.Unicode2String(prop_template_html); JObject prop_template_obj = JObject.Parse(prop_template_html); string prop_temp_json = JsonHelper.SerializeObject(prop_template_obj["result"]); - prodTemplateInfo = JsonHelper.DeserializeJsonToObject(prop_temp_json); - if (prodTemplateInfo == null) + prodCatTemplateInfo = JsonHelper.DeserializeJsonToObject(prop_temp_json); + if (prodCatTemplateInfo == null) { return "商品获取失败!商品属性格式模板获取失败!"; } @@ -825,6 +1143,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms return "上传失败 " + error; } + if (cell != null) + { + Invoke(new Action(() => + { + cell.Value = "正在获取运费模板"; + })); + } + //运费模板 string cost_template_html = get_cost_template(shop, prodInfo.detail.cat_ids, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id); if (cost_template_html.Contains("\"success\":true")) { @@ -838,6 +1164,37 @@ namespace TemuKJD.PDDForms.ProductSelectForms return "上传失败 " + error; } + //智能关键字 + prodParam.title_keywords = new List(); + prodParam.title_recommend = null; + try + { + Thread.Sleep(Randomx.GetId(10, 60)); + string keywords_html = query_keywords(shop, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id, prodInfo.detail.cat_id.ParseToString(), + prodInfo.detail.goods_name, prodInfo.detail.galleries.FirstOrDefault(g => g.type == 1).url); + if (!keywords_html.Contains("\"success\":true")) + { + var error = BaseRegex.GetStringJson(ref keywords_html, "error_msg"); + if (string.IsNullOrEmpty(error)) + error = keywords_html; + return "上传失败 " + error; + } + + JObject jObj = JObject.Parse(keywords_html); + var hot_keywordsArr = jObj["result"]["hot_keywords"]; + var hot_keywordsStr = JsonHelper.SerializeObject(hot_keywordsArr); + prodParam.title_keywords = JsonHelper.DeserializeJsonToList(hot_keywordsStr); + + if (cell != null) + { + Invoke(new Action(() => + { + cell.Value = "正在查询关键字"; + })); + } + } + catch (Exception ex) { } + prodParam.ai_goods_video = new List(); prodParam.ai_goods_video = new List(); prodParam.allergy_refund = prodInfo.detail.allergy_refund; @@ -852,6 +1209,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms prodParam.cat_id = prodInfo.detail.cat_id; prodParam.cat_ids = prodInfo.detail.cat_ids; prodParam.check_status = prodInfo.detail.check_status; + prodParam.check_status = 0; prodParam.cost_template_error = ""; //prodParam.cost_template_id = 0; // 运费模板,上面已经查询店铺运费模板列表获取 prodParam.country_id = prodInfo.detail.country_id.ParseToString(); @@ -886,14 +1244,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms //step1(共3个step)通过商品属性获取二级必填属性 foreach (var propInfo in prodInfo.property.goods_properties) { - var propTemp = prodTemplateInfo.modules.FirstOrDefault()?.propertys.FirstOrDefault(p => p.ref_pid == propInfo.ref_pid); + var propTemp = prodCatTemplateInfo.modules.FirstOrDefault()?.propertys.FirstOrDefault(p => p.ref_pid == propInfo.ref_pid); if (propTemp == null) continue; var prop = new goods_property_param() { template_pid = propTemp.id, - template_module_id = prodTemplateInfo.modules.FirstOrDefault().id, + template_module_id = prodCatTemplateInfo.modules.FirstOrDefault().id, ref_pid = propInfo.ref_pid, pid = propTemp.pid, vid = (propInfo.values.FirstOrDefault()?.vid).ParseToInt(), @@ -902,23 +1260,36 @@ namespace TemuKJD.PDDForms.ProductSelectForms content = (propInfo.values.FirstOrDefault()?.value).ParseToString(), }; - sleepTime = Randomx.GetId(1000, 5000); + sleepTime = Randomx.GetId(500, 1500); sleepTimeTotal += sleepTime; Thread.Sleep(sleepTime); - var rand = Randomx.GetId(10); - if (rand <= 2) + if (!isChanceApi) { - sleepTime = Randomx.GetId(1000, 5000); - sleepTimeTotal += sleepTime; - Thread.Sleep(sleepTime); - } - if (rand <= 1) - { - sleepTime = Randomx.GetId(1000, 5000); + sleepTime = Randomx.GetId(500, 3500); sleepTimeTotal += sleepTime; Thread.Sleep(sleepTime); + var rand = Randomx.GetId(10); + if (rand <= 2) + { + sleepTime = Randomx.GetId(1000, 5000); + sleepTimeTotal += sleepTime; + Thread.Sleep(sleepTime); + } + if (rand <= 1) + { + sleepTime = Randomx.GetId(1000, 5000); + sleepTimeTotal += sleepTime; + Thread.Sleep(sleepTime); + } } + if (cell != null) + { + Invoke(new Action(() => + { + cell.Value = "正在编辑商品属性"; + })); + } string prop_sub_template_html = get_sub_property_template(shop, prodInfo.detail.cat_id.ParseToString(), prop.template_pid.ParseToString(), prop.vid.ParseToString(), prodParam.goods_id.ToString(), prodParam.goods_commit_id); if (prop_sub_template_html.Contains("\"success\":true")) @@ -931,7 +1302,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms string prop_sub_template_json = JsonHelper.SerializeObject(prop_sub_template_obj["result"]["template_module_vos"]); var subTempLst = JsonHelper.DeserializeJsonToList(prop_sub_template_json); if (subTempLst.Count > 0) - prodTemplateInfo.modules.FirstOrDefault()?.propertys.AddRange(subTempLst.FirstOrDefault()?.propertys); + prodCatTemplateInfo.modules.FirstOrDefault()?.propertys.AddRange(subTempLst.FirstOrDefault()?.propertys); //if (subTempLst == null) //{ // return "商品获取失败!商品属性格式模板获取失败!"; @@ -947,14 +1318,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms //step2(共3个step)通过商品属性填写新建商品属性 foreach (var propInfo in prodInfo.property.goods_properties) { - var propTemp = prodTemplateInfo.modules.FirstOrDefault()?.propertys.FirstOrDefault(p => p.ref_pid == propInfo.ref_pid); + var propTemp = prodCatTemplateInfo.modules.FirstOrDefault()?.propertys.FirstOrDefault(p => p.ref_pid == propInfo.ref_pid); if (propTemp == null) continue; var prop = new goods_property_param() { template_pid = propTemp.id, - template_module_id = prodTemplateInfo.modules.FirstOrDefault().id, + template_module_id = prodCatTemplateInfo.modules.FirstOrDefault().id, ref_pid = propInfo.ref_pid, pid = propTemp.pid, vid = (propInfo.values.FirstOrDefault()?.vid).ParseToInt(), @@ -965,7 +1336,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms prodParam.goods_properties.Add(prop); } //step3(共3个step)如果有遗漏的必填(required)商品属性,按默认值填写 - foreach (var propTemp in prodTemplateInfo.modules.FirstOrDefault()?.propertys) + foreach (var propTemp in prodCatTemplateInfo.modules.FirstOrDefault()?.propertys) { if (propTemp.required && !prodParam.goods_properties.Any(p=>p.ref_pid == propTemp.ref_pid)) { @@ -975,7 +1346,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms var prop = new goods_property_param() { template_pid = propTemp.id, - template_module_id = prodTemplateInfo.modules.FirstOrDefault().id, + template_module_id = prodCatTemplateInfo.modules.FirstOrDefault().id, ref_pid = propTemp.ref_pid, pid = propTemp.pid, vid = contentOther.vid, @@ -988,6 +1359,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms } } + //foreach (var spec_prop in prodInfo.property.) + prodParam.goods_srv_templates = prodInfo.detail.goods_srv_templates; prodParam.goods_type = prodInfo.detail.goods_type; prodParam.groups = prodInfo.detail.groups; @@ -1012,8 +1385,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms prodParam.is_customized = prodInfo.detail.is_customized; prodParam.is_customs = prodInfo.detail.is_customs; prodParam.is_default_template_id = 0; // ? + prodParam.is_default_template_id = 1; // ? prodParam.is_draft = false; // prodInfo.detail.is_draft; - prodParam.is_folt = prodInfo.detail.is_folt; + prodParam.is_folt = 0; // prodInfo.detail.is_folt; // 假一赔十 prodParam.is_gold_price_matched = prodInfo.detail.is_gold_price_matched; prodParam.is_goods_copy = prodInfo.detail.is_goods_copy; prodParam.is_group_pre_sale = prodInfo.detail.is_group_pre_sale; @@ -1052,7 +1426,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms prodParam.processing_charges_type = prodInfo.detail.processing_charges_type.ParseToInt(); prodParam.propertys_edit_search_spu = false; prodParam.propertys_standard = new List(); - prodParam.propertys_tid = prodTemplateInfo.id; // 属性模板id,通过接口获取 + prodParam.propertys_tid = prodCatTemplateInfo.id; // 属性模板id,通过接口获取 prodParam.qualification_id_list = prodInfo.detail.qualification_id_list; prodParam.quan_guo_lian_bao = prodInfo.detail.quan_guo_lian_bao; prodParam.reject_reason = new List(); //prodInfo.detail.reject_reason as List; @@ -1063,6 +1437,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms prodParam.service_time = BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now); // 尝试使用当前系统时间提交 prodParam.shang_men_an_zhuang = prodInfo.detail.shang_men_an_zhuang; prodParam.shipment_limit_second = prodInfo.detail.shipment_limit_second; + //prodParam.shipment_limit_second = 86400 * 2; prodParam.shipment_limit_second_origin_value = 0; prodParam.shop_group_id = prodInfo.detail.shop_group_id.ParseToInt(); prodParam.showGoodsInstruction = true; @@ -1087,8 +1462,33 @@ namespace TemuKJD.PDDForms.ProductSelectForms spec = JsonHelper.DeserializeJsonToList(JsonHelper.SerializeObject(skuInfo.spec)), thumb_url = skuInfo.thumb_url, weight = skuInfo.weight, + length = skuInfo.length, + price_in_yuan = "", // 内部计算直接置空 + multi_price_in_yuan = "", // 内部计算直接置空 + pre_sale_time = skuInfo.pre_sale_time, + sku_id = skuInfo.sku_id, + thumb_url_file_id = skuInfo.thumb_url_file_id, }; - skuParam.price = skuParam.multi_price + 100; + if (isAddMorePriceFirst) // 先加后乘 + skuParam.multi_price = ((skuInfo.multi_price + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100) * this.txtAddTimes.Text.Trim().ParseToDecimal()).ParseToInt(); + skuParam.price = skuParam.multi_price + Math.Max(100, this.txtSinglePriceAdd.Text.Trim().ParseToDecimal() * 100).ParseToInt(); + //阶梯式加价,如果命中则按阶梯式加价进行 + if (isStepAddPrice) + { + foreach (var addPrice in lstAddPriceRule) + { + if (skuInfo.multi_price > addPrice.MoreThanPrice * 100 && skuInfo.multi_price <= addPrice.LessThanPrice * 100) + { + if (isAddMorePriceFirst) // 先加后乘 + skuParam.multi_price = ((skuInfo.multi_price + addPrice.AddMorePrice * 100) * addPrice.AddPriceTimes).ParseToInt(); + else + skuParam.multi_price = (skuInfo.multi_price * addPrice.AddPriceTimes + addPrice.AddMorePrice * 100).ParseToInt(); + skuParam.price = skuParam.multi_price + Math.Max(100, addPrice.SinglePriceAdd * 100).ParseToInt(); ; + break; + } + } + } + if (prodParam.market_price < skuParam.price + 1000) { prodParam.market_price = skuParam.price + 1000; @@ -1103,8 +1503,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms prodParam.thawed_refund = prodInfo.detail.thawed_refund; prodParam.third_type = prodInfo.detail.third_type; prodParam.tiny_name = prodInfo.detail.tiny_name; - prodParam.title_keywords = new List(); //关键字,后面尝试使用模拟接口 - prodParam.title_recommend = null; prodParam.transport_type_list = prodInfo.detail.transport_type_list == null ? new List() : prodInfo.detail.transport_type_list as List; prodParam.two_pieces_discount = prodInfo.detail.two_pieces_discount == null ? 99 : prodInfo.detail.two_pieces_discount; prodParam.uploadDragAB = false; @@ -1153,11 +1551,39 @@ namespace TemuKJD.PDDForms.ProductSelectForms decorationParam.decoration_floor_list.Add(floor_param); } - sleepTime = Randomx.GetId(3000, 7000); + //if (prodInfo.size != null && prodInfo.size.classId != null) + //{ + // var reusableSizespecRst = reusable_sizespec(shop, prodInfo.detail.cat_id.ParseToString(), prodParam.goods_id.ParseToString(), prodParam.goods_commit_id); + //} + //var rst = GetChanceGoodsId(shop); + //var draftId = BaseRegex.GetStringJson(ref rst, "draft_id"); + //var goods_id = BaseRegex.GetLongJson(ref rst, "goods_id"); + //prodParam.goods_commit_id = draftId; + //prodParam.goods_id = goods_id; + //decorationParam.goods_commit_id = draftId.ParseToLong(); + //decorationParam.goods_id = goods_id; + + //rst = QueryCommitDetail(shop, goods_id.ToString(), draftId); + //rst = GetChanceProdTemplate(shop, 21999.ToString(), goods_id.ToString(), draftId); + //rst = QueryKeywords(shop, goods_id.ToString(), draftId); + //rst = SaveDecoration(shop, goods_id.ToString(), draftId, JsonHelper.SerializeObject(decorationParam)); + //rst = PreviewDecoration(shop, goods_id.ToString(), draftId); + //rst = GoodsCommit(shop, goods_id.ToString(), draftId, JsonHelper.SerializeObject(prodParam)); + //rst = GoodsSubmit(shop, goods_id.ToString(), draftId); + //if (!rst.Contains("\"success\":true")) + //{ + // var error = BaseRegex.GetStringJson(ref rst, "error_msg"); + // if (string.IsNullOrEmpty(error)) + // error = rst; + // return "上传失败 " + error; + //} + //return "上传成功"; + + sleepTime = Randomx.GetId(1000, 5000); sleepTimeTotal += sleepTime; Thread.Sleep(sleepTime); var rand2 = Randomx.GetId(100); - if (rand2 < 40) + if (rand2 < 33) { sleepTime = Randomx.GetId(1000, 5000); sleepTimeTotal += sleepTime; @@ -1170,30 +1596,125 @@ namespace TemuKJD.PDDForms.ProductSelectForms sleepTimeTotal += sleepTime; Thread.Sleep(sleepTime); } - if (rand2 < 5) + if (!isChanceApi) // 走上货接口而非机会商品接口要多休眠 { - sleepTime = Randomx.GetId(5000, 10000); + sleepTime = Randomx.GetId(1000, 5000); sleepTimeTotal += sleepTime; - Thread.Sleep(sleepTime); + if (rand2 < 5) + { + sleepTime = Randomx.GetId(5000, 10000); + sleepTimeTotal += sleepTime; + Thread.Sleep(sleepTime); + } + while (sleepTimeTotal / 1000 < 30) + { + sleepTime = Randomx.GetId(20000); + sleepTimeTotal += sleepTime; + Thread.Sleep(sleepTime); + } } - while (sleepTimeTotal / 1000 < 30) + var size_result = ""; + if (prodInfo.size != null && prodInfo.size.classId != null) { - sleepTime = Randomx.GetId(20000); - sleepTimeTotal += sleepTime; - Thread.Sleep(sleepTime); + Thread.Sleep(Randomx.GetId(15, 70)); + size_result = save_sizespec(shop, prodInfo.size, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id); + if (!size_result.Contains("\"success\":true")) + { + //var error = BaseRegex.GetStringJson(ref size_result, "error_msg"); + //if (string.IsNullOrEmpty(error)) + // error = size_result; + //return "上传失败 " + error; + } + else + { + var sizeSpecId = BaseRegex.GetLongJson(ref size_result, "result"); + if (sizeSpecId > 0) + { + prodParam.size_spec_id = sizeSpecId; + } + } + } + //spec属性填写到商品属性内 + if (isUseUpperSizeSpec == true && prodInfo.size != null && prodInfo.size.classId != null && prodCatTemplateInfo.spec_module != null) + { + foreach (var sku in prodParam.skus) + { + if (sku.spec != null && sku.spec.Count > 0) + { + var skuSpec = sku.spec[0]; + + //已存在sku属性跳过 + if (prodParam.goods_properties.Any(p => (p as goods_spec_property_param)?.value == skuSpec.spec_name)) + continue; + + var specModule = prodCatTemplateInfo.spec_module; + var specProp = prodCatTemplateInfo.spec_module.properties.FirstOrDefault(p => p.name_alias == skuSpec.parent_name); + var specPropValue = specProp.values.FirstOrDefault(v => v.value == skuSpec.spec_name); + if (specProp != null) + { + var spec_prop = new goods_spec_property_param() + { + pid = specProp.pid, + ref_pid = specProp.ref_pid, + template_pid = specProp.id, + value = skuSpec.spec_name, + value_unit = "", + vid = (specPropValue?.vid).ParseToInt(), + parent_spec_id = skuSpec.parent_id, + spec_id = skuSpec.spec_id, + note = "", + img_url = "", + group_id = 1, //specPropValue == null ? 2 : (specPropValue?.group?.id).ParseToInt(), + template_module_id = specModule.id, + }; + prodParam.goods_properties.Add(spec_prop); + } + } + } + foreach (var sku in prodParam.skus) + { + if (sku.spec != null && sku.spec.Count > 1) + { + var skuSpec = sku.spec[1]; + + //已存在sku属性跳过 + if (prodParam.goods_properties.Any(p => (p as goods_spec_property_param)?.value == skuSpec.spec_name)) + continue; + + var specModule = prodCatTemplateInfo.spec_module; + var specProp = prodCatTemplateInfo.spec_module.properties.FirstOrDefault(p => p.name_alias == skuSpec.parent_name); + var specPropValue = specProp.values.FirstOrDefault(v => v.value == skuSpec.spec_name); + if (specProp != null) + { + var spec_prop = new goods_spec_property_param() + { + pid = specProp.pid, + ref_pid = specProp.ref_pid, + template_pid = specProp.id, + value = skuSpec.spec_name, + value_unit = "", + vid = (specPropValue?.vid).ParseToInt(), + parent_spec_id = skuSpec.parent_id, + spec_id = skuSpec.spec_id, + note = "", + img_url = "", + group_id = 2, //specPropValue == null ? 2 : (specPropValue?.group?.id).ParseToInt(), + template_module_id = specModule.id, + }; + prodParam.goods_properties.Add(spec_prop); + } + } + } } - //var rst = GetChanceGoods(shop); - //var draftId = BaseRegex.GetStringJson(ref rst, "draft_id"); - //var goods_id = BaseRegex.GetLongJson(ref rst, "goods_id"); - - //prodParam.goods_commit_id = draftId; - //prodParam.goods_id = goods_id; - //rst = GetPddCatPropTemplate(shop, prodInfo.detail.cat_id.ParseToString(), prodParam.goods_id.ToString(), prodParam.goods_commit_id); - //rst = GetPddDecorationPreview(shop, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id); - //rst = GetPddCostTemplate(shop, prodInfo.detail.cat_ids, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id); - + if (cell != null) + { + Invoke(new Action(() => + { + cell.Value = "正在提交商品"; + })); + } var decorationRst = ""; #region 先随即提交一个待 preview_key 的,但是这个不起作用,后面再提交一个不带 preview_key 的才是真实的能查询到的商品详情信息 decorationRst = save_decoration(shop, decorationParam, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id); @@ -1326,6 +1847,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms string url = "https://mms.pinduoduo.com/glide/v2/mms/edit/commit/create_new"; string body = @"{}"; string refere = "https://mms.pinduoduo.com/goods/goods_list?msfrom=mms_sidenav"; + if (isChanceApi) + { + refere = "https://mms.pinduoduo.com/goods/category?chance_tab=search"; + } var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++) { @@ -1376,19 +1901,22 @@ namespace TemuKJD.PDDForms.ProductSelectForms /// /// /// - /// + /// /// /// - private string get_template(ShopLoginInfo shop, string catId, string prodId, string commitId) + private string get_cat_template(ShopLoginInfo shop, string catId, string goodsId, string commitId) { var anti = shop.AntiContents.LastOrDefault().ParseToString(); if (shop.AntiContents.Count > 0) anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; string url = "https://mms.pinduoduo.com/draco-ms/mms/template/mall?catId=" + catId + - "&goodsCommitId=" + commitId + "&goodsId=" + prodId; + "&goodsCommitId=" + commitId + "&goodsId=" + goodsId; string body = @""; string refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=category&id=" + commitId + - "&goods_id=" + prodId + "&sourcePage=goodsList"; + "&goods_id=" + goodsId + "&sourcePage=goodsList"; + if (isChanceApi) + refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=chance&id=" + commitId + + "&goods_id=" + goodsId + "&chance_tab=search&sourcePage=goodsListTopButton_CHANCE"; var result = HttpResponseBLL.PDDGetResponse(shop, url, body, refere, anti); for (int i = 0; i < 5 && (result.Contains("操作太过频繁") || result.Contains("网络繁忙,请不要频繁操作")); i++) { @@ -1412,10 +1940,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms /// /// /// - /// + /// /// /// - private string get_sub_property_template(ShopLoginInfo shop, string catId, string template_pid, string vid, string prodId, string commitId) + private string get_sub_property_template(ShopLoginInfo shop, string catId, string template_pid, string vid, string goodsId, string commitId) { var anti = shop.AntiContents.LastOrDefault().ParseToString(); if (shop.AntiContents.Count > 0) @@ -1423,7 +1951,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms string url = "https://mms.pinduoduo.com/draco-ms/mms/template/property/sub-property/v4"; string body = @"{""cat_id"":" + catId + @",""template_pid"":" + template_pid + @",""vid"":" + vid + @"}"; string refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=category&id=" + commitId + - "&goods_id=" + prodId + "&sourcePage=goodsList"; + "&goods_id=" + goodsId + "&sourcePage=goodsList"; + if (isChanceApi) + refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=chance&id=" + commitId + + "&goods_id=" + goodsId + "&chance_tab=search&sourcePage=goodsListTopButton_CHANCE"; var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); for (int i = 0; i < 5 && (result.Contains("操作太过频繁") || result.Contains("网络繁忙,请不要频繁操作")); i++) { @@ -1444,21 +1975,24 @@ namespace TemuKJD.PDDForms.ProductSelectForms /// gorse/mms/goods/decoration/preview /// /// - /// + /// /// /// /// - private string preview_goods_decoration(ShopLoginInfo shop, string prodId, string commitId, string prevewKey = "") + private string preview_goods_decoration(ShopLoginInfo shop, string goodsId, string commitId, string prevewKey = "") { var anti = shop.AntiContents.LastOrDefault().ParseToString(); if (shop.AntiContents.Count > 0) anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; string url = "https://mms.pinduoduo.com/gorse/mms/goods/decoration/preview"; - string body = @"{""goods_commit_id"":" + commitId + @",""goods_id"":" + prodId + @"}"; + string body = @"{""goods_commit_id"":" + commitId + @",""goods_id"":" + goodsId + @"}"; if (!string.IsNullOrWhiteSpace(prevewKey)) - body = @"{""goods_commit_id"":" + commitId + @",""goods_id"":" + prodId + @",""preview_key"":" + prevewKey + @"}"; + body = @"{""goods_commit_id"":" + commitId + @",""goods_id"":" + goodsId + @",""preview_key"":" + prevewKey + @"}"; string refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=category&id=" + commitId + - "&goods_id=" + prodId + "&sourcePage=goodsList"; + "&goods_id=" + goodsId + "&sourcePage=goodsList"; + if (isChanceApi) + refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=chance&id=" + commitId + + "&goods_id=" + goodsId + "&chance_tab=search&sourcePage=goodsListTopButton_CHANCE"; var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++) { @@ -1479,9 +2013,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms /// express_inf/cost_template/get_list /// /// - /// + /// /// - private string get_cost_template(ShopLoginInfo shop, List catList, string prodId, string commitId) + private string get_cost_template(ShopLoginInfo shop, List catList, string goodsId, string commitId) { if (catList == null) catList = new List(); @@ -1494,11 +2028,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms string url = "https://mms.pinduoduo.com/express_inf/cost_template/get_list"; string body = @"{""goodsCatIdInfo"":{""catId1"":" + catList[0] + @",""catId2"":" +catList[1] + @",""catId3"":" + catList[2] + @",""catId4"":" + catList[3] + @"},""costTemplateId"":null,""sourceKey"":""BAPP_MMS_GOODS_PUBLISH"",""showSimpleList"":true,""pageSize"":2000,""goodsOptionSet"":null,""needReturnCurrentCostTemplate"":1}"; - string referer = "https://mms.pinduoduo.com/goods/goods_list?msfrom=mms_sidenav"; - referer = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=category&id="+ commitId + - "&goods_id=" + prodId + "&sourcePage=goodsList"; - - var result = HttpResponseBLL.PDDPostResponse(shop, url, body, referer, anti); + //string refere = "https://mms.pinduoduo.com/goods/goods_list?msfrom=mms_sidenav"; + string refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=category&id="+ commitId + + "&goods_id=" + goodsId + "&sourcePage=goodsList"; + if (isChanceApi) + refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=chance&id=" + commitId + + "&goods_id=" + goodsId + "&chance_tab=search&sourcePage=goodsListTopButton_CHANCE"; + + var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++) { shop.AntiContents.Remove(anti); @@ -1507,7 +2044,94 @@ namespace TemuKJD.PDDForms.ProductSelectForms { Thread.Sleep(Randomx.GetId(300, 500)); anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; - result = HttpResponseBLL.PDDPostResponse(shop, url, body, referer, anti); + result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + } + } + return result; + } + + private string query_keywords(ShopLoginInfo shop, string goodsId, string commitId, string cat_id = "21999", + string title = "头绳女黑色加粗橡皮筋高马尾皮筋扎头发发圈成人耐用皮套发绳头绳", + string image_url = "https://img.pddpic.com/mms-material-img/2021-08-30/1f41bc24-0d8b-4f3e-a804-dec8baf8c0bc.jpeg.a.jpeg") + { + var anti = shop.AntiContents.LastOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + string url = "https://mms.pinduoduo.com/smart-goods/mms/query/keywordsRecommend"; + string body = @"{""title"":""" + title + @""",""cat_id"":" + cat_id + @",""image_url"":""" + image_url + + @""",""goods_commit_id"":""" + commitId + @""",""goods_id"":" + commitId + @"}"; + string refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=category&id=" + commitId + + "&goods_id=" + goodsId + "&sourcePage=goodsList"; + if (isChanceApi) + refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=chance&id=" + commitId + + "&goods_id=" + goodsId + "&chance_tab=search&sourcePage=goodsListTopButton_CHANCE"; + + var result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti); + for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++) + { + shop.AntiContents.Remove(anti); + anti = shop.AntiContents.FirstOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + { + Thread.Sleep(Randomx.GetId(300, 500)); + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + body = "{\"goods_commit_id\":\"" + commitId + "\",\"goods_id\":\"" + goodsId + "\"}"; + result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti); + } + } + return result; + } + + private string reusable_sizespec(ShopLoginInfo shop, string catId, string goodsId, string commitId) + { + var anti = shop.AntiContents.LastOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + string url = "https://mms.pinduoduo.com/cabernet/mms/sizespec/query/reusable"; + string body = @"{""catId"":" + catId + @",""offset"":0,""limit"":20}"; + string refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=category&id=" + commitId + + "&goods_id=" + goodsId + "&sourcePage=goodsList"; + if (isChanceApi) + refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=chance&id=" + commitId + + "&goods_id=" + goodsId + "&chance_tab=search&sourcePage=goodsListTopButton_CHANCE"; + var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++) + { + shop.AntiContents.Remove(anti); + anti = shop.AntiContents.FirstOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + { + Thread.Sleep(Randomx.GetId(300, 500)); + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + } + } + return result; + } + + private string save_sizespec(ShopLoginInfo shop, PDDSizeSpecInfo sizeInfo, string goodsId, string commitId) + { + var anti = shop.AntiContents.LastOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + string url = "https://mms.pinduoduo.com/cabernet/mms/sizespec/action/post"; + string body = @"{}"; + body = JsonHelper.SerializeObject(sizeInfo); + string refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=category&id=" + commitId + + "&goods_id=" + goodsId + "&sourcePage=goodsList"; + if (isChanceApi) + refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=chance&id=" + commitId + + "&goods_id=" + goodsId + "&chance_tab=search&sourcePage=goodsListTopButton_CHANCE"; + var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++) + { + shop.AntiContents.Remove(anti); + anti = shop.AntiContents.FirstOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + { + Thread.Sleep(Randomx.GetId(300, 500)); + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); } } return result; @@ -1519,19 +2143,22 @@ namespace TemuKJD.PDDForms.ProductSelectForms /// /// /// - /// + /// /// /// - private string save_decoration(ShopLoginInfo shop,PDDProdDecorationCommitParam decoration, string prodId, string commitId) + private string save_decoration(ShopLoginInfo shop,PDDProdDecorationCommitParam decoration, string goodsId, string commitId) { var anti = shop.AntiContents.LastOrDefault().ParseToString(); if (shop.AntiContents.Count > 0) anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; string url = "https://mms.pinduoduo.com/gorse/mms/goods/decoration/commit/save"; - string body = @"{""goods_id"":" + prodId + "}"; + string body = @"{""goods_id"":" + goodsId + "}"; body = JsonHelper.SerializeObject(decoration); string refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=category&id=" + commitId + - "&goods_id=" + prodId + "&sourcePage=goodsList"; + "&goods_id=" + goodsId + "&sourcePage=goodsList"; + if (isChanceApi) + refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=chance&id=" + commitId + + "&goods_id=" + goodsId + "&chance_tab=search&sourcePage=goodsListTopButton_CHANCE"; var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++) { @@ -1565,8 +2192,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms string body = JsonHelper.SerializeObject(prod); string refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=category&id=" + commitId + "&goods_id=" + prodId + "&sourcePage=goodsList"; - - refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=chance&id=" + commitId + @"&goods_id=" + prodId + @"&chance_tab=hot_theme&sourcePage=goodsListTopButton_CHANCE"; + if (isChanceApi) + { + //refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=chance&id=" + commitId + + // @"&goods_id=" + prodId + @"&chance_tab=hot_theme&sourcePage=goodsListTopButton_CHANCE"; + refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=chance&id=" + commitId + + @"&goods_id=" + prodId + @"&chance_tab=search&sourcePage=goodsListTopButton_CHANCE"; + } var result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti); for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++) @@ -1603,6 +2235,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms string refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=category&id=" + commitId + "&goods_id=" + prodId + "&sourcePage=goodsList"; + if (isChanceApi) + { + //refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=chance&id=" + commitId + + // @"&goods_id=" + prodId + @"&chance_tab=hot_theme&sourcePage=goodsListTopButton_CHANCE"; + refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=chance&id=" + commitId + + @"&goods_id=" + prodId + @"&chance_tab=search&sourcePage=goodsListTopButton_CHANCE"; + } + var result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti); for (int i = 0; i < 5 && (result.Contains("网络繁忙,请不要频繁操作") || result.Contains("您的店铺操作过于频繁,请稍后操作")); i++) { @@ -1620,31 +2260,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms return result; } - //https://mms.pinduoduo.com/opportunity-goods/chance-goods/quick_releas - private string GetChanceGoods(ShopLoginInfo shop) - { - var anti = shop.AntiContents.LastOrDefault().ParseToString(); - if (shop.AntiContents.Count > 0) - anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; - string url = "https://mms.pinduoduo.com/opportunity-goods/chance-goods/quick_release"; - string body = @"{""chance_id"":""87b2e74a242229e1dbd1e73ecff82e74""}"; - string refere = "https://mms.pinduoduo.com/goods/goods_list/chance/chance_list?search_word=%E5%A4%B4%E5%8F%91%E7%BB%B3&sourcePage=goodsListTopButton"; - var result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti); - for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++) - { - shop.AntiContents.Remove(anti); - anti = shop.AntiContents.FirstOrDefault().ParseToString(); - if (shop.AntiContents.Count > 0) - { - Thread.Sleep(Randomx.GetId(300, 500)); - anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; - body = @"{""chance_id"":""fff84ef8fc1b2919a9c3383d350f44cc""}"; - result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti); - } - } - return result; - } - private void panel1_Paint(object sender, PaintEventArgs e) { @@ -1655,5 +2270,486 @@ namespace TemuKJD.PDDForms.ProductSelectForms if (this.cancellationTokenSource != null) this.cancellationTokenSource.Cancel(); } + + /// + /// 测试机会商品 + /// + /// + void testUploadProd(ShopLoginInfo shop) + { + var rst = GetChanceGoodsId(shop); + var draftId = BaseRegex.GetStringJson(ref rst, "draft_id"); + var goods_id = BaseRegex.GetLongJson(ref rst, "goods_id"); + + rst = QueryChanceCommitDetail(shop, goods_id.ToString(), draftId); + rst = GetChanceProdTemplate(shop, 21999.ToString(), goods_id.ToString(), draftId); + rst = QueryKeywords(shop, goods_id.ToString(), draftId); + rst = SaveDecoration(shop, goods_id.ToString(), draftId); + rst = PreviewDecoration(shop, goods_id.ToString(), draftId); + rst = GoodsCommit(shop, goods_id.ToString(), draftId); + rst = GoodsSubmit(shop, goods_id.ToString(), draftId); + } + + private string GetChanceGoodsList(ShopLoginInfo shop, string searchWord) + { + var anti = shop.AntiContents.LastOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + string url = "https://mms.pinduoduo.com/opportunity-goods/chance-goods/home_list"; + string body = @"{""size"":35,""page"":1,""search_word"":""" + searchWord + @"""}"; + string refere = "https://mms.pinduoduo.com/goods/goods_list/chance/chance_list?search_word=" + GetHtml.UrlEncodeUtf8(searchWord) + + "&sourcePage=goodsListTopButton"; + var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++) + { + shop.AntiContents.Remove(anti); + anti = shop.AntiContents.FirstOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + { + Thread.Sleep(Randomx.GetId(300, 500)); + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + } + } + return result; + } + + private string GetChanceGoodsId(ShopLoginInfo shop, string searchWord = "头发绳", string chanceId = "fff84ef8fc1b2919a9c3383d350f44cc") + { + var anti = shop.AntiContents.LastOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + string url = "https://mms.pinduoduo.com/opportunity-goods/chance-goods/quick_release"; + string body = @"{""chance_id"":""" + chanceId + @"""}"; + string refere = "https://mms.pinduoduo.com/goods/goods_list/chance/chance_list?search_word=" + GetHtml.UrlEncodeUtf8(searchWord) + + "&sourcePage=goodsListTopButton"; + var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++) + { + shop.AntiContents.Remove(anti); + anti = shop.AntiContents.FirstOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + { + Thread.Sleep(Randomx.GetId(300, 500)); + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + } + } + return result; + } + + private string QueryChanceCommitDetail(ShopLoginInfo shop, string goodsId, string commitId) + { + var anti = shop.AntiContents.LastOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + string url = "https://mms.pinduoduo.com/glide/v2/mms/query/commit/detail"; + string body = "{\"goods_commit_id\":\"" + commitId + "\",\"goods_id\":\"" + goodsId + "\"}"; + string refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=chance&id=" + commitId + + "&goods_id=" + goodsId + "&chance_tab=search&sourcePage=goodsListTopButton_CHANCE"; + var result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti); + for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++) + { + shop.AntiContents.Remove(anti); + anti = shop.AntiContents.FirstOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + { + Thread.Sleep(Randomx.GetId(300, 500)); + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + body = "{\"goods_commit_id\":\"" + commitId + "\",\"goods_id\":\"" + goodsId + "\"}"; + result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti); + } + } + return result; + } + + private string GetChanceProdTemplate(ShopLoginInfo shop, string catId, string prodId, string commitId) + { + var anti = shop.AntiContents.LastOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + string url = "https://mms.pinduoduo.com/draco-ms/mms/template/mall?catId=" + catId + + "&goodsCommitId=" + commitId + "&goodsId=" + prodId; + + string body = @""; + string refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=chance&id=" + commitId + + "&goods_id=" + prodId + "&chance_tab=search&sourcePage=goodsListTopButton_CHANCE"; + var result = HttpResponseBLL.PDDGetResponse(shop, url, body, refere, anti); + for (int i = 0; i < 5 && (result.Contains("操作太过频繁") || result.Contains("网络繁忙,请不要频繁操作")); i++) + { + shop.AntiContents.Remove(anti); + anti = shop.AntiContents.LastOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + { + Thread.Sleep(Randomx.GetId(300, 500)); + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + result = HttpResponseBLL.PDDGetResponse(shop, url, body, refere, anti); + } + } + return result; + } + + private string QueryKeywords(ShopLoginInfo shop, string goodsId, string commitId, string cat_id = "21999", + string title = "头绳女黑色加粗橡皮筋高马尾皮筋扎头发发圈成人耐用皮套发绳头绳", + string image_url = "https://img.pddpic.com/mms-material-img/2021-08-30/1f41bc24-0d8b-4f3e-a804-dec8baf8c0bc.jpeg.a.jpeg") + { + var anti = shop.AntiContents.LastOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + string url = "https://mms.pinduoduo.com/smart-goods/mms/query/keywordsRecommend"; + + string body = @"{""title"":""" + title + @""",""cat_id"":" + cat_id + @",""image_url"":""" + image_url + + @""",""goods_commit_id"":""" + commitId + @""",""goods_id"":" + commitId + @"}"; + + string refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=chance&id=" + commitId + + "&goods_id=" + goodsId + "&chance_tab=search&sourcePage=goodsListTopButton_CHANCE"; + + var result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti); + for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++) + { + shop.AntiContents.Remove(anti); + anti = shop.AntiContents.FirstOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + { + Thread.Sleep(Randomx.GetId(300, 500)); + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + body = "{\"goods_commit_id\":\"" + commitId + "\",\"goods_id\":\"" + goodsId + "\"}"; + result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti); + } + } + return result; + } + + private string SaveDecoration(ShopLoginInfo shop, string goodsId, string commitId, string decoration_json = "") + { + var anti = shop.AntiContents.LastOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + string url = "https://mms.pinduoduo.com/gorse/mms/goods/decoration/commit/save"; + + string body = @"{""goods_commit_id"":""" + commitId + @""",""goods_id"":" + goodsId + @",""floor_list"":[{""type"":""image"",""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/1f41bc24-0d8b-4f3e-a804-dec8baf8c0bc.jpeg.a.jpeg""}]},{""type"":""image"",""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2025-08-20/84dbb787-5108-41b4-b812-50983edbc7f4.jpeg.a.jpeg""}]},{""type"":""image"",""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2025-08-16/67a30d1d-7b57-4e3f-be73-ceeb0f116a5f.png.a.jpeg""}]},{""type"":""image"",""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/f51c21d6-c91e-444c-863b-e4e9eeb86147.jpeg.a.jpeg""}]},{""type"":""image"",""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/594efdf1-986b-4e1f-9066-2e66eb38c617.jpeg.a.jpeg""}]},{""type"":""image"",""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/3112213d-e0e2-4dc7-860b-d0a26b534a93.jpeg.a.jpeg""}]},{""type"":""image"",""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/00d6d0cd-688f-4be3-b53f-1a05c97f2b14.jpeg.a.jpeg""}]},{""type"":""image"",""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/590d0970-b81a-4c3e-aae0-0112b9e83b80.jpeg.a.jpeg""}]},{""type"":""image"",""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/b9d133ef-0406-457d-b0a9-4bdc936b87dc.jpeg.a.jpeg""}]},{""type"":""image"",""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/b4cd08ed-0d73-486c-8098-200cb2a7a653.jpeg.a.jpeg""}]}]}"; + if (!string.IsNullOrWhiteSpace(decoration_json)) + body = decoration_json; + + string refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=chance&id=" + commitId + + "&goods_id=" + goodsId + "&chance_tab=search&sourcePage=goodsListTopButton_CHANCE"; + + var result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti); + for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++) + { + shop.AntiContents.Remove(anti); + anti = shop.AntiContents.FirstOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + { + Thread.Sleep(Randomx.GetId(300, 500)); + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + body = "{\"goods_commit_id\":\"" + commitId + "\",\"goods_id\":\"" + goodsId + "\"}"; + result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti); + } + } + return result; + } + + private string PreviewDecoration(ShopLoginInfo shop, string goodsId, string commitId) + { + var anti = shop.AntiContents.LastOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + string url = "https://mms.pinduoduo.com/gorse/mms/goods/decoration/preview"; + + string body = @"{""goods_commit_id"":" + commitId + @",""goods_id"":" + goodsId + @"}"; + + string refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=chance&id=" + commitId + + "&goods_id=" + goodsId + "&chance_tab=search&sourcePage=goodsListTopButton_CHANCE"; + + var result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti); + for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++) + { + shop.AntiContents.Remove(anti); + anti = shop.AntiContents.FirstOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + { + Thread.Sleep(Randomx.GetId(300, 500)); + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + body = "{\"goods_commit_id\":\"" + commitId + "\",\"goods_id\":\"" + goodsId + "\"}"; + result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti); + } + } + return result; + } + + private string GoodsCommit(ShopLoginInfo shop, string goodsId, string commitId, string goods_json = "") + { + var anti = shop.AntiContents.LastOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + string url = "https://mms.pinduoduo.com/glide/mms/goodsCommit/action/edit"; + + string body = ""; + body = @"{""goods_id"":" + goodsId + @",""goods_commit_id"":""" + commitId + @""",""goods_commit_check"":[],""reject_reason"":[],""reject_status"":"""",""check_status"":0,""goods_name"":""头绳女黑色加粗橡皮筋高马尾皮筋扎头发发圈成人耐用皮套发绳头绳"",""carousel_video"":[],""detail_video"":[],""goods_desc"":""头绳女黑色加粗橡皮筋高马尾皮筋扎头发发圈成人耐用皮套发绳头绳"",""warm_tips"":"""",""cat_id"":21999,""cats"":[""饰品/流行首饰/摆件/保养鉴定"",""发饰"",""头绳"",null],""image_url"":"""",""oversea_goods"":{},""spu"":{},""isbn_properties_related"":{""isInit"":true},""propertys_standard"":[],""is_draft"":false,""goods_name_prefix"":"""",""name_prefix"":"""",""size_spec_id"":null,""is_gold_price_matched"":null,""hasBatchEnter"":false,""instruction_vo"":{""template_id"":null,""template_status"":-1,""template_name"":null,""rejected_reason"":null},""ai_carousel_gallery"":[],""explanation_video"":[],""tag_price_gallery"":[],""ingredient_gallery"":[],""nutrition_gallery"":[],""ai_goods_video"":[],""third_type"":0,""cat_ids"":[17412,17417,21999,0],""bad_fruit_claim"":0,""booking_notes"":{},""instruction_template_id"":null,""propertys_tid"":37612,""propertys_edit_search_spu"":false,""service_time"":1757920151248,""electric_status"":0,""isGoodsLock"":false,""title_keywords"":[{""keyword"":""橡皮筋加厚加粗"",""source"":""5"",""hot"":true,""rk"":null,""bad_keyword"":null,""good_tag_desc"":null,""bad_tag_desc"":null},{""keyword"":""头绳扎头发"",""source"":""4"",""hot"":true,""rk"":null,""bad_keyword"":null,""good_tag_desc"":null,""bad_tag_desc"":null},{""keyword"":""小圈"",""source"":""1"",""hot"":false,""rk"":null,""bad_keyword"":null,""good_tag_desc"":null,""bad_tag_desc"":null},{""keyword"":""头绳成人耐用"",""source"":""5"",""hot"":false,""rk"":null,""bad_keyword"":null,""good_tag_desc"":null,""bad_tag_desc"":null}],""title_recommend"":null,""imageEnhanceGray"":false,""materialModalAbGray"":true,""uploadDragAB"":false,""materialReplaceTagGray"":true,""hide_apply"":false,""showGoodsInstruction"":false,""decorationCanEdit"":true,""decorationDetail"":[{""floor_id"":90286134196,""key"":""DecImage"",""type"":""image"",""priority"":0,""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/1f41bc24-0d8b-4f3e-a804-dec8baf8c0bc.jpeg.a.jpeg"",""file_id"":null,""height"":800,""width"":800,""file_status"":null,""goods_id"":null,""goods_name"":null,""show_price"":null,""status"":null,""min_on_sale_group_price"":null,""text"":null,""hot_zone_list"":null,""text_module_details"":null,""activity_sn"":null,""combine_buy_element_dtolist"":null}],""check_status"":null,""check_id"":null,""check_name"":null,""comment"":null,""if_have_template"":null,""floor_status"":null,""template_id"":null,""template_type"":null,""template_json"":null},{""floor_id"":90286134197,""key"":""DecImage"",""type"":""image"",""priority"":1,""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2025-08-20/84dbb787-5108-41b4-b812-50983edbc7f4.jpeg.a.jpeg"",""file_id"":null,""height"":800,""width"":800,""file_status"":null,""goods_id"":null,""goods_name"":null,""show_price"":null,""status"":null,""min_on_sale_group_price"":null,""text"":null,""hot_zone_list"":null,""text_module_details"":null,""activity_sn"":null,""combine_buy_element_dtolist"":null}],""check_status"":null,""check_id"":null,""check_name"":null,""comment"":null,""if_have_template"":null,""floor_status"":null,""template_id"":null,""template_type"":null,""template_json"":null},{""floor_id"":90286134198,""key"":""DecImage"",""type"":""image"",""priority"":2,""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2025-08-16/67a30d1d-7b57-4e3f-be73-ceeb0f116a5f.png.a.jpeg"",""file_id"":null,""height"":800,""width"":800,""file_status"":null,""goods_id"":null,""goods_name"":null,""show_price"":null,""status"":null,""min_on_sale_group_price"":null,""text"":null,""hot_zone_list"":null,""text_module_details"":null,""activity_sn"":null,""combine_buy_element_dtolist"":null}],""check_status"":null,""check_id"":null,""check_name"":null,""comment"":null,""if_have_template"":null,""floor_status"":null,""template_id"":null,""template_type"":null,""template_json"":null},{""floor_id"":90286134199,""key"":""DecImage"",""type"":""image"",""priority"":3,""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/f51c21d6-c91e-444c-863b-e4e9eeb86147.jpeg.a.jpeg"",""file_id"":null,""height"":800,""width"":800,""file_status"":null,""goods_id"":null,""goods_name"":null,""show_price"":null,""status"":null,""min_on_sale_group_price"":null,""text"":null,""hot_zone_list"":null,""text_module_details"":null,""activity_sn"":null,""combine_buy_element_dtolist"":null}],""check_status"":null,""check_id"":null,""check_name"":null,""comment"":null,""if_have_template"":null,""floor_status"":null,""template_id"":null,""template_type"":null,""template_json"":null},{""floor_id"":90286134200,""key"":""DecImage"",""type"":""image"",""priority"":4,""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/594efdf1-986b-4e1f-9066-2e66eb38c617.jpeg.a.jpeg"",""file_id"":null,""height"":800,""width"":800,""file_status"":null,""goods_id"":null,""goods_name"":null,""show_price"":null,""status"":null,""min_on_sale_group_price"":null,""text"":null,""hot_zone_list"":null,""text_module_details"":null,""activity_sn"":null,""combine_buy_element_dtolist"":null}],""check_status"":null,""check_id"":null,""check_name"":null,""comment"":null,""if_have_template"":null,""floor_status"":null,""template_id"":null,""template_type"":null,""template_json"":null},{""floor_id"":90286134201,""key"":""DecImage"",""type"":""image"",""priority"":5,""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/3112213d-e0e2-4dc7-860b-d0a26b534a93.jpeg.a.jpeg"",""file_id"":null,""height"":800,""width"":800,""file_status"":null,""goods_id"":null,""goods_name"":null,""show_price"":null,""status"":null,""min_on_sale_group_price"":null,""text"":null,""hot_zone_list"":null,""text_module_details"":null,""activity_sn"":null,""combine_buy_element_dtolist"":null}],""check_status"":null,""check_id"":null,""check_name"":null,""comment"":null,""if_have_template"":null,""floor_status"":null,""template_id"":null,""template_type"":null,""template_json"":null},{""floor_id"":90286134202,""key"":""DecImage"",""type"":""image"",""priority"":6,""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/00d6d0cd-688f-4be3-b53f-1a05c97f2b14.jpeg.a.jpeg"",""file_id"":null,""height"":800,""width"":800,""file_status"":null,""goods_id"":null,""goods_name"":null,""show_price"":null,""status"":null,""min_on_sale_group_price"":null,""text"":null,""hot_zone_list"":null,""text_module_details"":null,""activity_sn"":null,""combine_buy_element_dtolist"":null}],""check_status"":null,""check_id"":null,""check_name"":null,""comment"":null,""if_have_template"":null,""floor_status"":null,""template_id"":null,""template_type"":null,""template_json"":null},{""floor_id"":90286134203,""key"":""DecImage"",""type"":""image"",""priority"":7,""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/590d0970-b81a-4c3e-aae0-0112b9e83b80.jpeg.a.jpeg"",""file_id"":null,""height"":800,""width"":800,""file_status"":null,""goods_id"":null,""goods_name"":null,""show_price"":null,""status"":null,""min_on_sale_group_price"":null,""text"":null,""hot_zone_list"":null,""text_module_details"":null,""activity_sn"":null,""combine_buy_element_dtolist"":null}],""check_status"":null,""check_id"":null,""check_name"":null,""comment"":null,""if_have_template"":null,""floor_status"":null,""template_id"":null,""template_type"":null,""template_json"":null},{""floor_id"":90286134204,""key"":""DecImage"",""type"":""image"",""priority"":8,""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/b9d133ef-0406-457d-b0a9-4bdc936b87dc.jpeg.a.jpeg"",""file_id"":null,""height"":800,""width"":800,""file_status"":null,""goods_id"":null,""goods_name"":null,""show_price"":null,""status"":null,""min_on_sale_group_price"":null,""text"":null,""hot_zone_list"":null,""text_module_details"":null,""activity_sn"":null,""combine_buy_element_dtolist"":null}],""check_status"":null,""check_id"":null,""check_name"":null,""comment"":null,""if_have_template"":null,""floor_status"":null,""template_id"":null,""template_type"":null,""template_json"":null},{""floor_id"":90286134205,""key"":""DecImage"",""type"":""image"",""priority"":9,""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/b4cd08ed-0d73-486c-8098-200cb2a7a653.jpeg.a.jpeg"",""file_id"":null,""height"":800,""width"":800,""file_status"":null,""goods_id"":null,""goods_name"":null,""show_price"":null,""status"":null,""min_on_sale_group_price"":null,""text"":null,""hot_zone_list"":null,""text_module_details"":null,""activity_sn"":null,""combine_buy_element_dtolist"":null}],""check_status"":null,""check_id"":null,""check_name"":null,""comment"":null,""if_have_template"":null,""floor_status"":null,""template_id"":null,""template_type"":null,""template_json"":null}],""decorationPreview"":""https://mobile.yangkeduo.com/comm_goods_decoration_preview.html?goods_id=818714131727&_oak_decoration_token=MIcdC90kLZgXxSq/tXYmXZPM9tAfZHQ+PJy8b+CLcIiJmQmJQ+dKebG6gMCPJ5+sV9IwOXi8PVvQnGJmJqAgvQ=="",""must_have_spu"":false,""can_not_change_cat"":false,""can_not_change_spu"":false,""is_transfer_spu"":false,""tiny_name"":"""",""size_parent_spec_id"":null,""is_shop"":0,""goods_type"":1,""invoice_status"":0,""privacy_delivery"":0,""invoice_mode"":null,""zhi_huan_bu_xiu"":0,""quan_guo_lian_bao"":0,""second_hand"":0,""is_two_num_group"":false,""is_pre_sale"":0,""pre_sale_time"":"""",""country_id"":""0"",""origin_country_id"":0,""warehouse"":"""",""customs"":"""",""is_customs"":0,""shipment_limit_second"":86400,""delivery_type"":null,""cost_template_id"":136204643207510,""weight"":"""",""is_all_weight_same"":true,""groups"":{""single_price"":0,""group_price"":0,""carnival_price"":null,""customer_num"":2,""buy_limit"":999999,""order_limit"":999999,""regular_limit"":"""",""regular_limit_duration"":null,""min_num_of_order"":null,""community_group_buying"":0},""is_folt"":0,""is_refundable"":1,""thawed_refund"":0,""damage_claim"":0,""lack_of_weight_claim"":0,""goods_certificate"":0,""goods_pattern"":8,""customizable"":0,""local_service_id_list"":null,""shop_group_id"":0,""schedule_sale"":{""sale_type"":0},""card_verification_list"":[],""is_spring_festival_open_tag"":false,""transport_type_list"":[],""is_refundable_fifteen_day"":0,""is_warranty_one_year"":0,""extend_warranty_dto"":{""extend_warranty"":0},""home_delivery_template_name"":"""",""invoice_mode_sub_type"":null,""is_certificate_provide"":0,""isAddLocalCityGoods"":false,""is_customized"":0,""isCoupon"":false,""allow_purchase_info_supply"":false,""effect_logistics_weight_limit"":2000,""same_city_template_id"":0,""is_default_template_id"":1,""cost_template_error"":"""",""allergy_refund"":0,""is_wp_service"":0,""is_size_change_casually"":0,""origin_is_pre_sale"":0,""goods_srv_templates"":[],""is_only_for_remote_area"":false,""default_template_gray"":true,""shipment_limit_second_origin_value"":0,""elec_goods_attributes"":null,""delivery_one_day"":0,""is_sku_shipment"":0,""mai_jia_zi_ti"":null,""shang_men_an_zhuang"":null,""song_huo_an_zhuang"":null,""song_huo_ru_hu"":null,""qualification_id_list"":[],""skus"":[{""id"":2987502296033,""sku_id"":1786578055567,""limit_quantity"":999999,""out_sku_sn"":"""",""is_onsale"":1,""pre_sale_time"":0,""multi_price_in_yuan"":""52.2"",""price_in_yuan"":""53.2"",""multi_price"":5220,""price"":5320,""quantity_delta"":100,""thumb_url"":""https://img.pddpic.com/mms-material-img/2023-10-28/6600b1f4-fca3-4ecc-b148-a2ebed15dba3.jpeg"",""weight"":0,""spec"":[{""parent_id"":1473,""parent_name"":""型号"",""spec_id"":26152576539,""spec_name"":""黑珠加粗20+送2条"",""is_custom"":null},{""parent_id"":1218,""parent_name"":""款式"",""spec_id"":28116379993,""spec_name"":""加粗耐用##用断包退#"",""is_custom"":null}],""length"":null,""oversea_sku"":{},""sku_srv_templates"":"""",""shipment_limit_second_list"":[],""sku69_code"":""""},{""id"":2987502296034,""sku_id"":1786578055568,""limit_quantity"":999999,""out_sku_sn"":"""",""is_onsale"":1,""pre_sale_time"":0,""multi_price_in_yuan"":""53.7"",""price_in_yuan"":""54.7"",""multi_price"":5370,""price"":5470,""quantity_delta"":100,""thumb_url"":""https://img.pddpic.com/mms-material-img/2023-10-28/6600b1f4-fca3-4ecc-b148-a2ebed15dba3.jpeg"",""weight"":0,""spec"":[{""parent_id"":1473,""parent_name"":""型号"",""spec_id"":26152569947,""spec_name"":""黑珠加粗50+送2条"",""is_custom"":null},{""parent_id"":1218,""parent_name"":""款式"",""spec_id"":28116379993,""spec_name"":""加粗耐用##用断包退#"",""is_custom"":null}],""length"":null,""oversea_sku"":{},""sku_srv_templates"":"""",""shipment_limit_second_list"":[],""sku69_code"":""""},{""id"":2987502296035,""sku_id"":1786578055569,""limit_quantity"":999999,""out_sku_sn"":"""",""is_onsale"":1,""pre_sale_time"":0,""multi_price_in_yuan"":""55.17"",""price_in_yuan"":""56.17"",""multi_price"":5517,""price"":5617,""quantity_delta"":100,""thumb_url"":""https://img.pddpic.com/mms-material-img/2023-10-28/6600b1f4-fca3-4ecc-b148-a2ebed15dba3.jpeg"",""weight"":0,""spec"":[{""parent_id"":1473,""parent_name"":""型号"",""spec_id"":26131354541,""spec_name"":""黑珠加粗100条+送2条"",""is_custom"":null},{""parent_id"":1218,""parent_name"":""款式"",""spec_id"":28116379993,""spec_name"":""加粗耐用##用断包退#"",""is_custom"":null}],""length"":null,""oversea_sku"":{},""sku_srv_templates"":"""",""shipment_limit_second_list"":[],""sku69_code"":""""},{""id"":2987502296036,""sku_id"":1786578055570,""limit_quantity"":999999,""out_sku_sn"":"""",""is_onsale"":1,""pre_sale_time"":0,""multi_price_in_yuan"":""51.38"",""price_in_yuan"":""52.38"",""multi_price"":5138,""price"":5238,""quantity_delta"":100,""thumb_url"":""https://img.pddpic.com/mms-material-img/2023-10-28/0b505a40-3f30-4337-ac02-c7b86dd99818.jpeg"",""weight"":0,""spec"":[{""parent_id"":1473,""parent_name"":""型号"",""spec_id"":26448027901,""spec_name"":""普通黑色20条"",""is_custom"":null},{""parent_id"":1218,""parent_name"":""款式"",""spec_id"":28116379993,""spec_name"":""加粗耐用##用断包退#"",""is_custom"":null}],""length"":null,""oversea_sku"":{},""sku_srv_templates"":"""",""shipment_limit_second_list"":[],""sku69_code"":""""},{""id"":2987502296037,""sku_id"":1786578055571,""limit_quantity"":999999,""out_sku_sn"":"""",""is_onsale"":1,""pre_sale_time"":0,""multi_price_in_yuan"":""51.94"",""price_in_yuan"":""52.94"",""multi_price"":5194,""price"":5294,""quantity_delta"":100,""thumb_url"":""https://img.pddpic.com/mms-material-img/2023-10-28/0b505a40-3f30-4337-ac02-c7b86dd99818.jpeg"",""weight"":0,""spec"":[{""parent_id"":1473,""parent_name"":""型号"",""spec_id"":26448043249,""spec_name"":""普通黑色50条"",""is_custom"":null},{""parent_id"":1218,""parent_name"":""款式"",""spec_id"":28116379993,""spec_name"":""加粗耐用##用断包退#"",""is_custom"":null}],""length"":null,""oversea_sku"":{},""sku_srv_templates"":"""",""shipment_limit_second_list"":[],""sku69_code"":""""},{""id"":2987502296038,""sku_id"":1786578055572,""limit_quantity"":999999,""out_sku_sn"":"""",""is_onsale"":1,""pre_sale_time"":0,""multi_price_in_yuan"":""52.59"",""price_in_yuan"":""53.59"",""multi_price"":5259,""price"":5359,""quantity_delta"":100,""thumb_url"":""https://img.pddpic.com/mms-material-img/2023-10-28/0b505a40-3f30-4337-ac02-c7b86dd99818.jpeg"",""weight"":0,""spec"":[{""parent_id"":1473,""parent_name"":""型号"",""spec_id"":26448036633,""spec_name"":""普通黑色100条"",""is_custom"":null},{""parent_id"":1218,""parent_name"":""款式"",""spec_id"":28116379993,""spec_name"":""加粗耐用##用断包退#"",""is_custom"":null}],""length"":null,""oversea_sku"":{},""sku_srv_templates"":"""",""shipment_limit_second_list"":[],""sku69_code"":""""},{""id"":2987502296039,""sku_id"":1786578055573,""limit_quantity"":999999,""out_sku_sn"":"""",""is_onsale"":1,""pre_sale_time"":0,""multi_price_in_yuan"":""20.82"",""price_in_yuan"":""21.82"",""multi_price"":2082,""price"":2182,""quantity_delta"":100,""thumb_url"":""https://img.pddpic.com/mms-material-img/2023-10-28/0b505a40-3f30-4337-ac02-c7b86dd99818.jpeg"",""weight"":0,""spec"":[{""parent_id"":1473,""parent_name"":""型号"",""spec_id"":14739983001,""spec_name"":""普通黑色1条"",""is_custom"":null},{""parent_id"":1218,""parent_name"":""款式"",""spec_id"":28116379993,""spec_name"":""加粗耐用##用断包退#"",""is_custom"":null}],""length"":null,""oversea_sku"":{},""sku_srv_templates"":"""",""shipment_limit_second_list"":[],""sku69_code"":""""}],""market_price_in_yuan"":""57.17"",""market_price"":5717,""out_goods_sn"":"""",""dead_line_seconds"":86399,""two_pieces_discount"":95,""gold_price_template_id"":0,""processing_charges"":0,""processing_charges_in_yuan"":""0"",""processing_charges_type"":0,""gallery"":[{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/1f41bc24-0d8b-4f3e-a804-dec8baf8c0bc.jpeg.a.jpeg"",""type"":1,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2025-08-20/84dbb787-5108-41b4-b812-50983edbc7f4.jpeg.a.jpeg"",""type"":1,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2025-08-16/67a30d1d-7b57-4e3f-be73-ceeb0f116a5f.png.a.jpeg"",""type"":1,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/f51c21d6-c91e-444c-863b-e4e9eeb86147.jpeg.a.jpeg"",""type"":1,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/594efdf1-986b-4e1f-9066-2e66eb38c617.jpeg.a.jpeg"",""type"":1,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/3112213d-e0e2-4dc7-860b-d0a26b534a93.jpeg.a.jpeg"",""type"":1,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/00d6d0cd-688f-4be3-b53f-1a05c97f2b14.jpeg.a.jpeg"",""type"":1,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/590d0970-b81a-4c3e-aae0-0112b9e83b80.jpeg.a.jpeg"",""type"":1,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/b9d133ef-0406-457d-b0a9-4bdc936b87dc.jpeg.a.jpeg"",""type"":1,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/b4cd08ed-0d73-486c-8098-200cb2a7a653.jpeg.a.jpeg"",""type"":1,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/1f41bc24-0d8b-4f3e-a804-dec8baf8c0bc.jpeg.a.jpeg"",""type"":2,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2025-08-20/84dbb787-5108-41b4-b812-50983edbc7f4.jpeg.a.jpeg"",""type"":2,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2025-08-16/67a30d1d-7b57-4e3f-be73-ceeb0f116a5f.png.a.jpeg"",""type"":2,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/f51c21d6-c91e-444c-863b-e4e9eeb86147.jpeg.a.jpeg"",""type"":2,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/594efdf1-986b-4e1f-9066-2e66eb38c617.jpeg.a.jpeg"",""type"":2,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/3112213d-e0e2-4dc7-860b-d0a26b534a93.jpeg.a.jpeg"",""type"":2,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/00d6d0cd-688f-4be3-b53f-1a05c97f2b14.jpeg.a.jpeg"",""type"":2,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/590d0970-b81a-4c3e-aae0-0112b9e83b80.jpeg.a.jpeg"",""type"":2,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/b9d133ef-0406-457d-b0a9-4bdc936b87dc.jpeg.a.jpeg"",""type"":2,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/b4cd08ed-0d73-486c-8098-200cb2a7a653.jpeg.a.jpeg"",""type"":2,""file_id"":null}],""is_sku_pre_sale"":0,""is_group_pre_sale"":0,""goods_properties"":[{""template_pid"":286862,""template_module_id"":48657,""ref_pid"":310,""pid"":5,""value"":"""",""value_unit"":"""",""content"":""""},{""template_pid"":292595,""template_module_id"":48657,""ref_pid"":317,""pid"":16,""vid"":10571,""value"":"""",""value_unit"":"""",""content"":""棉""},{""template_pid"":292917,""template_module_id"":48657,""ref_pid"":322,""pid"":12,""vid"":55441,""value"":"""",""value_unit"":"""",""content"":""日韩""},{""template_pid"":293164,""template_module_id"":48657,""ref_pid"":338,""pid"":32,""vid"":13287,""value"":"""",""value_unit"":"""",""content"":""女""},{""template_pid"":293217,""template_module_id"":48657,""ref_pid"":1285,""pid"":205,""vid"":91144,""value"":"""",""value_unit"":"""",""content"":""其它""},{""template_pid"":476195,""template_module_id"":48657,""ref_pid"":1906,""pid"":587,""vid"":2236202,""value"":"""",""value_unit"":"""",""content"":""2025年秋季""}],""is_goods_copy"":null,""is_auto_save"":false,"; + body += @"""validate_message"":""ee2a56d193d66ebf79bd00463b6e4b4478ab4b821ef57007d3b25462004c27b0"","; + body += @"""validate_message_v2"":""0071076bef833c50e99b7a0129d066b8e04216cac5fdd4708b7d5d06009fbdb6"","; + body += @"""crawlerInfo"":""0asWfacpriQ8y9eckSehSk4nj-2cGeo7SgEFsE_tgKVODMdP9qGAmgoNTEmANwl5wMIUQwQLskBh1Wn7LsUcJD97bn0TA7pfrJJo_WimycvsQdEEIc1ve-qJY0qonTst3P--i2USZOYY1nqOql_fPeNyczSIZmdFj_mGSUhx_F1eIIxxPXhwZVjpTOUIBj4dOvTdZcDg0zwcUs6sk-bf_zGlnvto-p8SZN76LrCJzrJAqqkx3egO-JEcu8Qg0MKjpwck0hcj1CjeuZ8CoNUnDhoj2EJRTJGXMPbhVFDkrPAoq32X9mTjXy0P9EEQV9Hjibsm_gqWFeS9jekUKvyqaznTE7O0YR9Usj_ytQxfANsSv_Rw9jKeAjN6p95drfVm3sjPxw3EvqAFFYF3bEkSw_AIGZlSp9zq3XKl3IlhMEaHW0vrkcYpgPwbFqgx8gHIhD53RnLnZZDl6D5AS0tworQixyziGIiWENfpq3BrurNLYYa8YQQh77RKQbe8SAQC3_7LoNc3TzrQKhnqf0f5a7""}"; + + body = @"{""goods_id"":" + goodsId + @",""goods_commit_id"":""" + commitId + @""",""goods_commit_check"":[],""reject_reason"":[],""reject_status"":"""",""check_status"":0,""goods_name"":""头绳女黑色加粗橡皮筋高马尾皮筋扎头发发圈成人耐用皮套发绳头绳"",""carousel_video"":[],""detail_video"":[],""goods_desc"":""头绳女黑色加粗橡皮筋高马尾皮筋扎头发发圈成人耐用皮套发绳头绳"",""warm_tips"":"""",""cat_id"":21999,""cats"":[""饰品/流行首饰/摆件/保养鉴定"",""发饰"",""头绳"",null],""image_url"":"""",""oversea_goods"":{},""spu"":{},""isbn_properties_related"":{""isInit"":true},""propertys_standard"":[],""is_draft"":false,""goods_name_prefix"":"""",""name_prefix"":"""",""size_spec_id"":null,""is_gold_price_matched"":null,""hasBatchEnter"":false,""instruction_vo"":{""template_id"":null,""template_status"":-1,""template_name"":null,""rejected_reason"":null},""ai_carousel_gallery"":[],""explanation_video"":[],""tag_price_gallery"":[],""ingredient_gallery"":[],""nutrition_gallery"":[],""ai_goods_video"":[],""third_type"":0,""cat_ids"":[17412,17417,21999,0],""bad_fruit_claim"":0,""booking_notes"":{},""instruction_template_id"":null,""propertys_tid"":37612,""propertys_edit_search_spu"":false,""service_time"":1757920151248,""electric_status"":0,""isGoodsLock"":false,""title_keywords"":[{""keyword"":""橡皮筋加厚加粗"",""source"":""5"",""hot"":true,""rk"":null,""bad_keyword"":null,""good_tag_desc"":null,""bad_tag_desc"":null},{""keyword"":""头绳扎头发"",""source"":""4"",""hot"":true,""rk"":null,""bad_keyword"":null,""good_tag_desc"":null,""bad_tag_desc"":null},{""keyword"":""小圈"",""source"":""1"",""hot"":false,""rk"":null,""bad_keyword"":null,""good_tag_desc"":null,""bad_tag_desc"":null},{""keyword"":""头绳成人耐用"",""source"":""5"",""hot"":false,""rk"":null,""bad_keyword"":null,""good_tag_desc"":null,""bad_tag_desc"":null}],""title_recommend"":null,""imageEnhanceGray"":false,""materialModalAbGray"":true,""uploadDragAB"":false,""materialReplaceTagGray"":true,""hide_apply"":false,""showGoodsInstruction"":false,""decorationCanEdit"":true,""decorationDetail"":[{""floor_id"":90286134196,""key"":""DecImage"",""type"":""image"",""priority"":0,""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/1f41bc24-0d8b-4f3e-a804-dec8baf8c0bc.jpeg.a.jpeg"",""file_id"":null,""height"":800,""width"":800,""file_status"":null,""goods_id"":null,""goods_name"":null,""show_price"":null,""status"":null,""min_on_sale_group_price"":null,""text"":null,""hot_zone_list"":null,""text_module_details"":null,""activity_sn"":null,""combine_buy_element_dtolist"":null}],""check_status"":null,""check_id"":null,""check_name"":null,""comment"":null,""if_have_template"":null,""floor_status"":null,""template_id"":null,""template_type"":null,""template_json"":null},{""floor_id"":90286134197,""key"":""DecImage"",""type"":""image"",""priority"":1,""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2025-08-20/84dbb787-5108-41b4-b812-50983edbc7f4.jpeg.a.jpeg"",""file_id"":null,""height"":800,""width"":800,""file_status"":null,""goods_id"":null,""goods_name"":null,""show_price"":null,""status"":null,""min_on_sale_group_price"":null,""text"":null,""hot_zone_list"":null,""text_module_details"":null,""activity_sn"":null,""combine_buy_element_dtolist"":null}],""check_status"":null,""check_id"":null,""check_name"":null,""comment"":null,""if_have_template"":null,""floor_status"":null,""template_id"":null,""template_type"":null,""template_json"":null},{""floor_id"":90286134198,""key"":""DecImage"",""type"":""image"",""priority"":2,""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2025-08-16/67a30d1d-7b57-4e3f-be73-ceeb0f116a5f.png.a.jpeg"",""file_id"":null,""height"":800,""width"":800,""file_status"":null,""goods_id"":null,""goods_name"":null,""show_price"":null,""status"":null,""min_on_sale_group_price"":null,""text"":null,""hot_zone_list"":null,""text_module_details"":null,""activity_sn"":null,""combine_buy_element_dtolist"":null}],""check_status"":null,""check_id"":null,""check_name"":null,""comment"":null,""if_have_template"":null,""floor_status"":null,""template_id"":null,""template_type"":null,""template_json"":null},{""floor_id"":90286134199,""key"":""DecImage"",""type"":""image"",""priority"":3,""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/f51c21d6-c91e-444c-863b-e4e9eeb86147.jpeg.a.jpeg"",""file_id"":null,""height"":800,""width"":800,""file_status"":null,""goods_id"":null,""goods_name"":null,""show_price"":null,""status"":null,""min_on_sale_group_price"":null,""text"":null,""hot_zone_list"":null,""text_module_details"":null,""activity_sn"":null,""combine_buy_element_dtolist"":null}],""check_status"":null,""check_id"":null,""check_name"":null,""comment"":null,""if_have_template"":null,""floor_status"":null,""template_id"":null,""template_type"":null,""template_json"":null},{""floor_id"":90286134200,""key"":""DecImage"",""type"":""image"",""priority"":4,""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/594efdf1-986b-4e1f-9066-2e66eb38c617.jpeg.a.jpeg"",""file_id"":null,""height"":800,""width"":800,""file_status"":null,""goods_id"":null,""goods_name"":null,""show_price"":null,""status"":null,""min_on_sale_group_price"":null,""text"":null,""hot_zone_list"":null,""text_module_details"":null,""activity_sn"":null,""combine_buy_element_dtolist"":null}],""check_status"":null,""check_id"":null,""check_name"":null,""comment"":null,""if_have_template"":null,""floor_status"":null,""template_id"":null,""template_type"":null,""template_json"":null},{""floor_id"":90286134201,""key"":""DecImage"",""type"":""image"",""priority"":5,""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/3112213d-e0e2-4dc7-860b-d0a26b534a93.jpeg.a.jpeg"",""file_id"":null,""height"":800,""width"":800,""file_status"":null,""goods_id"":null,""goods_name"":null,""show_price"":null,""status"":null,""min_on_sale_group_price"":null,""text"":null,""hot_zone_list"":null,""text_module_details"":null,""activity_sn"":null,""combine_buy_element_dtolist"":null}],""check_status"":null,""check_id"":null,""check_name"":null,""comment"":null,""if_have_template"":null,""floor_status"":null,""template_id"":null,""template_type"":null,""template_json"":null},{""floor_id"":90286134202,""key"":""DecImage"",""type"":""image"",""priority"":6,""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/00d6d0cd-688f-4be3-b53f-1a05c97f2b14.jpeg.a.jpeg"",""file_id"":null,""height"":800,""width"":800,""file_status"":null,""goods_id"":null,""goods_name"":null,""show_price"":null,""status"":null,""min_on_sale_group_price"":null,""text"":null,""hot_zone_list"":null,""text_module_details"":null,""activity_sn"":null,""combine_buy_element_dtolist"":null}],""check_status"":null,""check_id"":null,""check_name"":null,""comment"":null,""if_have_template"":null,""floor_status"":null,""template_id"":null,""template_type"":null,""template_json"":null},{""floor_id"":90286134203,""key"":""DecImage"",""type"":""image"",""priority"":7,""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/590d0970-b81a-4c3e-aae0-0112b9e83b80.jpeg.a.jpeg"",""file_id"":null,""height"":800,""width"":800,""file_status"":null,""goods_id"":null,""goods_name"":null,""show_price"":null,""status"":null,""min_on_sale_group_price"":null,""text"":null,""hot_zone_list"":null,""text_module_details"":null,""activity_sn"":null,""combine_buy_element_dtolist"":null}],""check_status"":null,""check_id"":null,""check_name"":null,""comment"":null,""if_have_template"":null,""floor_status"":null,""template_id"":null,""template_type"":null,""template_json"":null},{""floor_id"":90286134204,""key"":""DecImage"",""type"":""image"",""priority"":8,""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/b9d133ef-0406-457d-b0a9-4bdc936b87dc.jpeg.a.jpeg"",""file_id"":null,""height"":800,""width"":800,""file_status"":null,""goods_id"":null,""goods_name"":null,""show_price"":null,""status"":null,""min_on_sale_group_price"":null,""text"":null,""hot_zone_list"":null,""text_module_details"":null,""activity_sn"":null,""combine_buy_element_dtolist"":null}],""check_status"":null,""check_id"":null,""check_name"":null,""comment"":null,""if_have_template"":null,""floor_status"":null,""template_id"":null,""template_type"":null,""template_json"":null},{""floor_id"":90286134205,""key"":""DecImage"",""type"":""image"",""priority"":9,""content_list"":[{""img_url"":""https://img.pddpic.com/mms-material-img/2021-08-30/b4cd08ed-0d73-486c-8098-200cb2a7a653.jpeg.a.jpeg"",""file_id"":null,""height"":800,""width"":800,""file_status"":null,""goods_id"":null,""goods_name"":null,""show_price"":null,""status"":null,""min_on_sale_group_price"":null,""text"":null,""hot_zone_list"":null,""text_module_details"":null,""activity_sn"":null,""combine_buy_element_dtolist"":null}],""check_status"":null,""check_id"":null,""check_name"":null,""comment"":null,""if_have_template"":null,""floor_status"":null,""template_id"":null,""template_type"":null,""template_json"":null}],""decorationPreview"":""https://mobile.yangkeduo.com/comm_goods_decoration_preview.html?goods_id=818714131727&_oak_decoration_token=MIcdC90kLZgXxSq/tXYmXZPM9tAfZHQ+PJy8b+CLcIiJmQmJQ+dKebG6gMCPJ5+sV9IwOXi8PVvQnGJmJqAgvQ=="",""must_have_spu"":false,""can_not_change_cat"":false,""can_not_change_spu"":false,""is_transfer_spu"":false,""tiny_name"":"""",""size_parent_spec_id"":null,""is_shop"":0,""goods_type"":1,""invoice_status"":0,""privacy_delivery"":0,""invoice_mode"":null,""zhi_huan_bu_xiu"":0,""quan_guo_lian_bao"":0,""second_hand"":0,""is_two_num_group"":false,""is_pre_sale"":0,""pre_sale_time"":"""",""country_id"":""0"",""origin_country_id"":0,""warehouse"":"""",""customs"":"""",""is_customs"":0,""shipment_limit_second"":172800,""delivery_type"":null,""cost_template_id"":136204643207510,""weight"":"""",""is_all_weight_same"":true,""groups"":{""single_price"":0,""group_price"":0,""carnival_price"":null,""customer_num"":2,""buy_limit"":999999,""order_limit"":999999,""regular_limit"":"""",""regular_limit_duration"":null,""min_num_of_order"":null,""community_group_buying"":0},""is_folt"":0,""is_refundable"":1,""thawed_refund"":0,""damage_claim"":0,""lack_of_weight_claim"":0,""goods_certificate"":0,""goods_pattern"":8,""customizable"":0,""local_service_id_list"":null,""shop_group_id"":0,""schedule_sale"":{""sale_type"":0},""card_verification_list"":[],""is_spring_festival_open_tag"":false,""transport_type_list"":[],""is_refundable_fifteen_day"":0,""is_warranty_one_year"":0,""extend_warranty_dto"":{""extend_warranty"":0},""home_delivery_template_name"":"""",""invoice_mode_sub_type"":null,""is_certificate_provide"":0,""isAddLocalCityGoods"":false,""is_customized"":0,""isCoupon"":false,""allow_purchase_info_supply"":false,""effect_logistics_weight_limit"":2000,""same_city_template_id"":0,""is_default_template_id"":1,""cost_template_error"":"""",""allergy_refund"":0,""is_wp_service"":0,""is_size_change_casually"":0,""origin_is_pre_sale"":0,""goods_srv_templates"":[],""is_only_for_remote_area"":false,""default_template_gray"":true,""shipment_limit_second_origin_value"":0,""elec_goods_attributes"":null,""delivery_one_day"":0,""is_sku_shipment"":0,""mai_jia_zi_ti"":null,""shang_men_an_zhuang"":null,""song_huo_an_zhuang"":null,""song_huo_ru_hu"":null,""qualification_id_list"":[],""skus"":[{""id"":2987502296033,""sku_id"":1786578055567,""limit_quantity"":999999,""out_sku_sn"":"""",""is_onsale"":1,""pre_sale_time"":0,""multi_price_in_yuan"":""52.2"",""price_in_yuan"":""53.2"",""multi_price"":5220,""price"":5320,""quantity_delta"":100,""thumb_url"":""https://img.pddpic.com/mms-material-img/2023-10-28/6600b1f4-fca3-4ecc-b148-a2ebed15dba3.jpeg"",""weight"":0,""spec"":[{""parent_id"":1473,""parent_name"":""型号"",""spec_id"":26152576539,""spec_name"":""黑珠加粗20+送2条"",""is_custom"":null},{""parent_id"":1218,""parent_name"":""款式"",""spec_id"":28116379993,""spec_name"":""加粗耐用##用断包退#"",""is_custom"":null}],""length"":null,""oversea_sku"":{},""sku_srv_templates"":"""",""shipment_limit_second_list"":[],""sku69_code"":""""},{""id"":2987502296034,""sku_id"":1786578055568,""limit_quantity"":999999,""out_sku_sn"":"""",""is_onsale"":1,""pre_sale_time"":0,""multi_price_in_yuan"":""53.7"",""price_in_yuan"":""54.7"",""multi_price"":5370,""price"":5470,""quantity_delta"":100,""thumb_url"":""https://img.pddpic.com/mms-material-img/2023-10-28/6600b1f4-fca3-4ecc-b148-a2ebed15dba3.jpeg"",""weight"":0,""spec"":[{""parent_id"":1473,""parent_name"":""型号"",""spec_id"":26152569947,""spec_name"":""黑珠加粗50+送2条"",""is_custom"":null},{""parent_id"":1218,""parent_name"":""款式"",""spec_id"":28116379993,""spec_name"":""加粗耐用##用断包退#"",""is_custom"":null}],""length"":null,""oversea_sku"":{},""sku_srv_templates"":"""",""shipment_limit_second_list"":[],""sku69_code"":""""},{""id"":2987502296035,""sku_id"":1786578055569,""limit_quantity"":999999,""out_sku_sn"":"""",""is_onsale"":1,""pre_sale_time"":0,""multi_price_in_yuan"":""55.17"",""price_in_yuan"":""56.17"",""multi_price"":5517,""price"":5617,""quantity_delta"":100,""thumb_url"":""https://img.pddpic.com/mms-material-img/2023-10-28/6600b1f4-fca3-4ecc-b148-a2ebed15dba3.jpeg"",""weight"":0,""spec"":[{""parent_id"":1473,""parent_name"":""型号"",""spec_id"":26131354541,""spec_name"":""黑珠加粗100条+送2条"",""is_custom"":null},{""parent_id"":1218,""parent_name"":""款式"",""spec_id"":28116379993,""spec_name"":""加粗耐用##用断包退#"",""is_custom"":null}],""length"":null,""oversea_sku"":{},""sku_srv_templates"":"""",""shipment_limit_second_list"":[],""sku69_code"":""""},{""id"":2987502296036,""sku_id"":1786578055570,""limit_quantity"":999999,""out_sku_sn"":"""",""is_onsale"":1,""pre_sale_time"":0,""multi_price_in_yuan"":""51.38"",""price_in_yuan"":""52.38"",""multi_price"":5138,""price"":5238,""quantity_delta"":100,""thumb_url"":""https://img.pddpic.com/mms-material-img/2023-10-28/0b505a40-3f30-4337-ac02-c7b86dd99818.jpeg"",""weight"":0,""spec"":[{""parent_id"":1473,""parent_name"":""型号"",""spec_id"":26448027901,""spec_name"":""普通黑色20条"",""is_custom"":null},{""parent_id"":1218,""parent_name"":""款式"",""spec_id"":28116379993,""spec_name"":""加粗耐用##用断包退#"",""is_custom"":null}],""length"":null,""oversea_sku"":{},""sku_srv_templates"":"""",""shipment_limit_second_list"":[],""sku69_code"":""""},{""id"":2987502296037,""sku_id"":1786578055571,""limit_quantity"":999999,""out_sku_sn"":"""",""is_onsale"":1,""pre_sale_time"":0,""multi_price_in_yuan"":""51.94"",""price_in_yuan"":""52.94"",""multi_price"":5194,""price"":5294,""quantity_delta"":100,""thumb_url"":""https://img.pddpic.com/mms-material-img/2023-10-28/0b505a40-3f30-4337-ac02-c7b86dd99818.jpeg"",""weight"":0,""spec"":[{""parent_id"":1473,""parent_name"":""型号"",""spec_id"":26448043249,""spec_name"":""普通黑色50条"",""is_custom"":null},{""parent_id"":1218,""parent_name"":""款式"",""spec_id"":28116379993,""spec_name"":""加粗耐用##用断包退#"",""is_custom"":null}],""length"":null,""oversea_sku"":{},""sku_srv_templates"":"""",""shipment_limit_second_list"":[],""sku69_code"":""""},{""id"":2987502296038,""sku_id"":1786578055572,""limit_quantity"":999999,""out_sku_sn"":"""",""is_onsale"":1,""pre_sale_time"":0,""multi_price_in_yuan"":""52.59"",""price_in_yuan"":""53.59"",""multi_price"":5259,""price"":5359,""quantity_delta"":100,""thumb_url"":""https://img.pddpic.com/mms-material-img/2023-10-28/0b505a40-3f30-4337-ac02-c7b86dd99818.jpeg"",""weight"":0,""spec"":[{""parent_id"":1473,""parent_name"":""型号"",""spec_id"":26448036633,""spec_name"":""普通黑色100条"",""is_custom"":null},{""parent_id"":1218,""parent_name"":""款式"",""spec_id"":28116379993,""spec_name"":""加粗耐用##用断包退#"",""is_custom"":null}],""length"":null,""oversea_sku"":{},""sku_srv_templates"":"""",""shipment_limit_second_list"":[],""sku69_code"":""""},{""id"":2987502296039,""sku_id"":1786578055573,""limit_quantity"":999999,""out_sku_sn"":"""",""is_onsale"":1,""pre_sale_time"":0,""multi_price_in_yuan"":""20.82"",""price_in_yuan"":""21.82"",""multi_price"":2082,""price"":2182,""quantity_delta"":100,""thumb_url"":""https://img.pddpic.com/mms-material-img/2023-10-28/0b505a40-3f30-4337-ac02-c7b86dd99818.jpeg"",""weight"":0,""spec"":[{""parent_id"":1473,""parent_name"":""型号"",""spec_id"":14739983001,""spec_name"":""普通黑色1条"",""is_custom"":null},{""parent_id"":1218,""parent_name"":""款式"",""spec_id"":28116379993,""spec_name"":""加粗耐用##用断包退#"",""is_custom"":null}],""length"":null,""oversea_sku"":{},""sku_srv_templates"":"""",""shipment_limit_second_list"":[],""sku69_code"":""""}],""market_price_in_yuan"":""57.17"",""market_price"":5717,""out_goods_sn"":"""",""dead_line_seconds"":86399,""two_pieces_discount"":95,""gold_price_template_id"":0,""processing_charges"":0,""processing_charges_in_yuan"":""0"",""processing_charges_type"":0,""gallery"":[{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/1f41bc24-0d8b-4f3e-a804-dec8baf8c0bc.jpeg.a.jpeg"",""type"":1,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2025-08-20/84dbb787-5108-41b4-b812-50983edbc7f4.jpeg.a.jpeg"",""type"":1,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2025-08-16/67a30d1d-7b57-4e3f-be73-ceeb0f116a5f.png.a.jpeg"",""type"":1,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/f51c21d6-c91e-444c-863b-e4e9eeb86147.jpeg.a.jpeg"",""type"":1,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/594efdf1-986b-4e1f-9066-2e66eb38c617.jpeg.a.jpeg"",""type"":1,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/3112213d-e0e2-4dc7-860b-d0a26b534a93.jpeg.a.jpeg"",""type"":1,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/00d6d0cd-688f-4be3-b53f-1a05c97f2b14.jpeg.a.jpeg"",""type"":1,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/590d0970-b81a-4c3e-aae0-0112b9e83b80.jpeg.a.jpeg"",""type"":1,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/b9d133ef-0406-457d-b0a9-4bdc936b87dc.jpeg.a.jpeg"",""type"":1,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/b4cd08ed-0d73-486c-8098-200cb2a7a653.jpeg.a.jpeg"",""type"":1,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/1f41bc24-0d8b-4f3e-a804-dec8baf8c0bc.jpeg.a.jpeg"",""type"":2,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2025-08-20/84dbb787-5108-41b4-b812-50983edbc7f4.jpeg.a.jpeg"",""type"":2,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2025-08-16/67a30d1d-7b57-4e3f-be73-ceeb0f116a5f.png.a.jpeg"",""type"":2,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/f51c21d6-c91e-444c-863b-e4e9eeb86147.jpeg.a.jpeg"",""type"":2,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/594efdf1-986b-4e1f-9066-2e66eb38c617.jpeg.a.jpeg"",""type"":2,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/3112213d-e0e2-4dc7-860b-d0a26b534a93.jpeg.a.jpeg"",""type"":2,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/00d6d0cd-688f-4be3-b53f-1a05c97f2b14.jpeg.a.jpeg"",""type"":2,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/590d0970-b81a-4c3e-aae0-0112b9e83b80.jpeg.a.jpeg"",""type"":2,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/b9d133ef-0406-457d-b0a9-4bdc936b87dc.jpeg.a.jpeg"",""type"":2,""file_id"":null},{""url"":""https://img.pddpic.com/mms-material-img/2021-08-30/b4cd08ed-0d73-486c-8098-200cb2a7a653.jpeg.a.jpeg"",""type"":2,""file_id"":null}],""is_sku_pre_sale"":0,""is_group_pre_sale"":0,""goods_properties"":[{""template_pid"":286862,""template_module_id"":48657,""ref_pid"":310,""pid"":5,""value"":"""",""value_unit"":"""",""content"":""""},{""template_pid"":292595,""template_module_id"":48657,""ref_pid"":317,""pid"":16,""vid"":10571,""value"":"""",""value_unit"":"""",""content"":""棉""},{""template_pid"":292917,""template_module_id"":48657,""ref_pid"":322,""pid"":12,""vid"":55441,""value"":"""",""value_unit"":"""",""content"":""日韩""},{""template_pid"":293164,""template_module_id"":48657,""ref_pid"":338,""pid"":32,""vid"":13287,""value"":"""",""value_unit"":"""",""content"":""女""},{""template_pid"":293217,""template_module_id"":48657,""ref_pid"":1285,""pid"":205,""vid"":91144,""value"":"""",""value_unit"":"""",""content"":""其它""},{""template_pid"":476195,""template_module_id"":48657,""ref_pid"":1906,""pid"":587,""vid"":2236202,""value"":"""",""value_unit"":"""",""content"":""2025年秋季""}],""is_goods_copy"":null,""is_auto_save"":false,"; + body += @"""validate_message"":""002a56d193d66ebf79bd00463b6e4b4478ab4b821ef57007d3b25462004c27b0"","; + body += @"""validate_message_v2"":""ee71076bef833c50e99b7a0129d066b8e04216cac5fdd4708b7d5d06009fbdb6"","; + body += @"""crawlerInfo"":""0asAntiContent""}"; + if (!string.IsNullOrEmpty(goods_json)) + { + body = goods_json; + } + + string refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=chance&id=" + commitId + + "&goods_id=" + goodsId + "&chance_tab=search&sourcePage=goodsListTopButton_CHANCE"; + + var result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti); + for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++) + { + shop.AntiContents.Remove(anti); + anti = shop.AntiContents.FirstOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + { + Thread.Sleep(Randomx.GetId(300, 500)); + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + body = "{\"goods_commit_id\":\"" + commitId + "\",\"goods_id\":\"" + goodsId + "\"}"; + result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti); + } + } + return result; + } + + private string GoodsSubmit(ShopLoginInfo shop, string goodsId, string commitId) + { + var anti = shop.AntiContents.LastOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + string url = "https://mms.pinduoduo.com/glide/v2/mms/edit/commit/submit"; + + string body = ""; + body = @"{""goods_commit_id"":""" + commitId + @""",""goods_id"":" + goodsId + + @",""is_onsale"":true,""third_type"":0,""if_allow_submit_mall_checking"":true," + + @"""crawlerInfo"":""0asAfacpYjo8Y9TFpfjqiS1b4Tbk4hfRZGuTBCmar9DzyS9lb5kwk9F8IPcZEaFnjkBa-l-rcJkOuJDGWRVEru8_Q36B0ZbaR6AhKmluJhISICKNvDnLF1dDa85t41uO0fum3FLaCc5YMFkrz1Xyc_TTr13vYA4RVfIOxdoK4T5edPjFoHTaaC5qrTxCcHlfsUXf7_C0eBscfybHOMdHqVefeFzND7qLh6h36ZrWKcZmB4e6HkxbLf88rPTmc39f6oGun0pUoQcmmTlWoy50zhhF9yQR9JGm8tbhCFkFKPLWF82m9tCIec6T2tAmaT8MMXPlUGUifflVLa872o1cCukaNgUBGyBlvc_ytWfUVR4DZeWSCkyOzbR2wZpBv-xeNh8sE-ZtkNh_4Lt0L7e-3DuhGYlJ4CwLrXbWYNDiLHamNMH88WFVgTZaH-PpIn874igQN0nW0ZqmAGBMW445EnoGrOOrQWLZNgkMMymurIGpbOaLXxiKNA7JRH7UWQiKSKqvK8K1Ya4omzGUNZTqEOK""}"; + + body = @"{""goods_commit_id"":""" + commitId + @""",""goods_id"":" + goodsId + + @",""is_onsale"":true,""third_type"":0,""if_allow_submit_mall_checking"":true," + + @"""crawlerInfo"":""0asAntiContent""}"; + + string refere = "https://mms.pinduoduo.com/goods/goods_add/index?type=add&from=chance&id=" + commitId + + "&goods_id=" + goodsId + "&chance_tab=search&sourcePage=goodsListTopButton_CHANCE"; + + var result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti); + for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++) + { + shop.AntiContents.Remove(anti); + anti = shop.AntiContents.FirstOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + { + Thread.Sleep(Randomx.GetId(300, 500)); + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + body = "{\"goods_commit_id\":\"" + commitId + "\",\"goods_id\":\"" + goodsId + "\"}"; + result = HttpResponseBLL.PDDPostResponse(shop, url, body.Replace("0asAntiContent", anti), refere, anti); + } + } + return result; + } + + private void chkChance_CheckedChanged(object sender, EventArgs e) + { + isChanceApi = chkChance.Checked; + } + + private void btnRandomAdd_Click(object sender, EventArgs e) + { + int addCount = txtAddCount.Text.Trim().ParseToInt(); + Task.Run(() => + { + while (addCount > 0) + { + int prodCount = 0; + var list = GetRandomProductList(out prodCount, 1, 50); + Invoke(new Action(() => + { + lblGoodsCount.Text = "产品库中共有 " + prodCount + " 件商品"; + })); + Thread.Sleep(Randomx.GetId(50,100)); + foreach (var prod in list) + { + var selectProd = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(prod)); + selectProd.out_product_Id = prod.id.ToString(); + selectProd.id = 1; + if(lstTemuDBProductSelect.Count > 0) + selectProd.id = lstTemuDBProductSelect.Max(p => p.id) + 1; + this.lstTemuDBProductSelect.Add(selectProd); + + Invoke(new Action(() => + { + lblWaitToUp.Text = "待上传商品 " + lstTemuDBProductSelect.Count + " 件"; + })); + addCount--; + if (addCount <= 0) + break; + } + NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_db_prod_upload_list", this.lstTemuDBProductSelect); + } + }); + } + + public List GetRandomProductList(out int totalCount, int page = 1, int pageSize = 50) + { + var lstShopId = dgvShop.Rows.Cast().Where(row + => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); + + List list = new List(); + int pageCount = 1; + totalCount = 0; + + var url = BaseClass.BuildObjString("product/get_product_list_random"); + var data = ""; + Invoke(new Action(() => + { + data = UserLogin.GetSignaturex() + + "&page=" + 1 + + "&page_size=" + pageSize; + })); + var html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + { + Invoke(new Action(() => + { + BaseMsgForm.ShowError("获取商品失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg")); + })); + return new List(); + } + + int count = BaseRegex.GetIntJson(ref html, "count"); + totalCount = count; + pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt(); + pageCount = Math.Max(pageCount, 1); + + var jArr = JObject.Parse(html)["data"]; + if (jArr.Count() == 0) + return list; + var sProd = JsonHelper.SerializeObject(jArr); + + try + { + list = JsonHelper.DeserializeJsonToList(sProd); + return list; + } + catch (Exception ex) + { + return new List(); + } + } + + private void btnClearUpload_Click(object sender, EventArgs e) + { + if (BaseMsgForm.ShowConfirm("确定清空待上传商品吗?清空后不可恢复!").DialogResult == DialogResult.Cancel) + return; + + this.lstTemuDBProductSelect.Clear(); + NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_db_prod_upload_list", this.lstTemuDBProductSelect); + lblWaitToUp.Text = "待上传商品 " + lstTemuDBProductSelect.Count + " 件"; + } + + private void lblNewAddPrice_Click(object sender, EventArgs e) + { + var ucPrice = new UcAddPrice(); + if (IsSetFontScaleNone) + { + Font of = ucPrice.Font; + Font nf = new Font(of.FontFamily, (of.Size * 96.0 / FormDpi).ParseToFloat(), of.Style, of.Unit, of.GdiCharSet, of.Bold); + ucPrice.Font = nf; + } + ucPrice.PriceChange += ucAddPrice_PriceChange; + this.fPnlPriceRule.Controls.Add(ucPrice); + } + + private void ucAddPrice_PriceChange(object obj) + { + List priceRuleLst = new List(); + foreach (var ucItem in fPnlPriceRule.Controls) + { + var ucPrice = ucItem as UcAddPrice; + if (ucPrice != null) + { + priceRuleLst.Add(new AddPriceRule() + { + AddMorePrice = ucPrice.PriceAddMore, + AddPriceTimes = ucPrice.PriceAddTimes, + LessThanPrice = ucPrice.PriceEnd, + MoreThanPrice = ucPrice.PriceStart, + SinglePriceAdd = ucPrice.SinglePriceAdd, + }); + } + } + this.lstAddPriceRule.Clear(); + this.lstAddPriceRule.AddRange(priceRuleLst); + + NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_add_price_rules", lstAddPriceRule); + } + + private void txtAddPrice_TextChanged(object sender, EventArgs e) + { + defaultAddPriceRule.AddPriceTimes = txtAddTimes.Text.Trim().ParseToDecimal(); + defaultAddPriceRule.AddMorePrice = txtAddMorePrice.Text.Trim().ParseToDecimal(); + defaultAddPriceRule.SinglePriceAdd = txtSinglePriceAdd.Text.Trim().ParseToDecimal(); + NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_default_add_price_rule", defaultAddPriceRule); + } + + private void chkStepAddPrice_CheckedChanged(object sender, EventArgs e) + { + isStepAddPrice = this.chkChance.Checked; + } + + private void btnClearDgv_Click(object sender, EventArgs e) + { + //this.dgvSelectProduct.Rows.Clear(); + var rows = this.dgvSelectProduct.Rows.Cast().ToList(); //Cast后Rows做foreach循环时仍会夹花跳过,所以要ToList转一个新的数组。 + foreach (var row in rows) + { + if (row.Cells["colCheck"].Value.ParseToBool() == true) + this.dgvSelectProduct.Rows.Remove(row); + } + } + + private void chkAddFirst_CheckedChanged(object sender, EventArgs e) + { + isAddMorePriceFirst = chkAddMorePriceFirst.Checked; + } + + private void chkSizeSpec_CheckedChanged(object sender, EventArgs e) + { + isUseUpperSizeSpec = chkSizeSpec.Checked; + } + } + + public class AddPriceRule + { + /// + /// 加价金额区间大于 不包含 + /// + public decimal MoreThanPrice { get; set; } + /// + /// 加价金额区间小于 包含 + /// + public decimal LessThanPrice { get; set; } + /// + /// 加价倍数 + /// + public decimal AddPriceTimes { get; set; } + /// + /// 额外加价金额 + /// + public decimal AddMorePrice { get; set; } + /// + /// 单买加价 + /// + public decimal SinglePriceAdd { get; set; } } } diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.resx b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.resx index ba1b70d..b087732 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.resx +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.resx @@ -195,6 +195,9 @@ True + + True + True diff --git a/TEMUKJD/PDDForms/ProductSelectForms/UcAddPrice.Designer.cs b/TEMUKJD/PDDForms/ProductSelectForms/UcAddPrice.Designer.cs new file mode 100644 index 0000000..0da2e25 --- /dev/null +++ b/TEMUKJD/PDDForms/ProductSelectForms/UcAddPrice.Designer.cs @@ -0,0 +1,223 @@ + +namespace TemuKJD.PDDForms.ProductSelectForms +{ + partial class UcAddPrice + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.txtPriceStart = new System.Windows.Forms.TextBox(); + this.lblPrice = new System.Windows.Forms.Label(); + this.txtPriceEnd = new System.Windows.Forms.TextBox(); + this.label9 = new System.Windows.Forms.Label(); + this.txtAddTimes = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.txtAddMorePrice = new System.Windows.Forms.TextBox(); + this.label11 = new System.Windows.Forms.Label(); + this.txtSinglePriceAdd = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.lblClose = new System.Windows.Forms.Label(); + this.flowLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.AutoSize = true; + this.flowLayoutPanel1.Controls.Add(this.txtPriceStart); + this.flowLayoutPanel1.Controls.Add(this.lblPrice); + this.flowLayoutPanel1.Controls.Add(this.txtPriceEnd); + this.flowLayoutPanel1.Controls.Add(this.label9); + this.flowLayoutPanel1.Controls.Add(this.txtAddTimes); + this.flowLayoutPanel1.Controls.Add(this.label10); + this.flowLayoutPanel1.Controls.Add(this.txtAddMorePrice); + this.flowLayoutPanel1.Controls.Add(this.label11); + this.flowLayoutPanel1.Controls.Add(this.txtSinglePriceAdd); + this.flowLayoutPanel1.Controls.Add(this.label1); + this.flowLayoutPanel1.Controls.Add(this.lblClose); + this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(336, 18); + this.flowLayoutPanel1.TabIndex = 0; + // + // txtPriceStart + // + this.txtPriceStart.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.txtPriceStart.Location = new System.Drawing.Point(0, 0); + this.txtPriceStart.Margin = new System.Windows.Forms.Padding(0); + this.txtPriceStart.Name = "txtPriceStart"; + this.txtPriceStart.Size = new System.Drawing.Size(38, 23); + this.txtPriceStart.TabIndex = 551; + this.txtPriceStart.Text = "0.0"; + this.txtPriceStart.TextChanged += new System.EventHandler(this.Price_TextChanged); + // + // lblPrice + // + this.lblPrice.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblPrice.AutoSize = true; + this.lblPrice.Location = new System.Drawing.Point(38, 3); + this.lblPrice.Margin = new System.Windows.Forms.Padding(0); + this.lblPrice.Name = "lblPrice"; + this.lblPrice.Size = new System.Drawing.Size(58, 17); + this.lblPrice.TabIndex = 550; + this.lblPrice.Text = "< 价格 ≤"; + // + // txtPriceEnd + // + this.txtPriceEnd.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.txtPriceEnd.Location = new System.Drawing.Point(96, 0); + this.txtPriceEnd.Margin = new System.Windows.Forms.Padding(0); + this.txtPriceEnd.Name = "txtPriceEnd"; + this.txtPriceEnd.Size = new System.Drawing.Size(38, 23); + this.txtPriceEnd.TabIndex = 549; + this.txtPriceEnd.Text = "999.0"; + this.txtPriceEnd.TextChanged += new System.EventHandler(this.Price_TextChanged); + // + // label9 + // + this.label9.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(134, 3); + this.label9.Margin = new System.Windows.Forms.Padding(0); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(44, 17); + this.label9.TabIndex = 545; + this.label9.Text = ",加价"; + // + // txtAddTimes + // + this.txtAddTimes.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.txtAddTimes.Location = new System.Drawing.Point(178, 0); + this.txtAddTimes.Margin = new System.Windows.Forms.Padding(0); + this.txtAddTimes.Name = "txtAddTimes"; + this.txtAddTimes.Size = new System.Drawing.Size(31, 23); + this.txtAddTimes.TabIndex = 544; + this.txtAddTimes.Text = "2.0"; + this.txtAddTimes.TextChanged += new System.EventHandler(this.Price_TextChanged); + // + // label10 + // + this.label10.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(209, 3); + this.label10.Margin = new System.Windows.Forms.Padding(0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(44, 17); + this.label10.TabIndex = 546; + this.label10.Text = "倍再加"; + // + // txtAddMorePrice + // + this.txtAddMorePrice.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.txtAddMorePrice.Location = new System.Drawing.Point(253, 0); + this.txtAddMorePrice.Margin = new System.Windows.Forms.Padding(0); + this.txtAddMorePrice.Name = "txtAddMorePrice"; + this.txtAddMorePrice.Size = new System.Drawing.Size(31, 23); + this.txtAddMorePrice.TabIndex = 547; + this.txtAddMorePrice.Text = "5.0"; + this.txtAddMorePrice.TextChanged += new System.EventHandler(this.Price_TextChanged); + // + // label11 + // + this.label11.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(0, 26); + this.label11.Margin = new System.Windows.Forms.Padding(0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(68, 17); + this.label11.TabIndex = 548; + this.label11.Text = "元,单买加"; + // + // txtSinglePriceAdd + // + this.txtSinglePriceAdd.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.txtSinglePriceAdd.Location = new System.Drawing.Point(68, 23); + this.txtSinglePriceAdd.Margin = new System.Windows.Forms.Padding(0); + this.txtSinglePriceAdd.Name = "txtSinglePriceAdd"; + this.txtSinglePriceAdd.Size = new System.Drawing.Size(31, 23); + this.txtSinglePriceAdd.TabIndex = 553; + this.txtSinglePriceAdd.Text = "1.0"; + this.txtSinglePriceAdd.TextChanged += new System.EventHandler(this.Price_TextChanged); + // + // label1 + // + this.label1.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(99, 26); + this.label1.Margin = new System.Windows.Forms.Padding(0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(20, 17); + this.label1.TabIndex = 554; + this.label1.Text = "元"; + // + // lblClose + // + this.lblClose.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblClose.AutoSize = true; + this.lblClose.Cursor = System.Windows.Forms.Cursors.Hand; + this.lblClose.ForeColor = System.Drawing.SystemColors.HotTrack; + this.lblClose.Location = new System.Drawing.Point(119, 26); + this.lblClose.Margin = new System.Windows.Forms.Padding(0); + this.lblClose.Name = "lblClose"; + this.lblClose.Size = new System.Drawing.Size(17, 17); + this.lblClose.TabIndex = 552; + this.lblClose.Text = "×"; + this.lblClose.Click += new System.EventHandler(this.lblClose_Click); + // + // UcAddPrice + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.AutoSize = true; + this.Controls.Add(this.flowLayoutPanel1); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.MinimumSize = new System.Drawing.Size(0, 20); + this.Name = "UcAddPrice"; + this.Size = new System.Drawing.Size(336, 18); + this.Load += new System.EventHandler(this.UcAddPrice_Load); + this.flowLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.TextBox txtPriceEnd; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.TextBox txtAddMorePrice; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox txtAddTimes; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label lblPrice; + private System.Windows.Forms.TextBox txtPriceStart; + public System.Windows.Forms.Label lblClose; + private System.Windows.Forms.TextBox txtSinglePriceAdd; + private System.Windows.Forms.Label label1; + } +} diff --git a/TEMUKJD/PDDForms/ProductSelectForms/UcAddPrice.cs b/TEMUKJD/PDDForms/ProductSelectForms/UcAddPrice.cs new file mode 100644 index 0000000..1b4e180 --- /dev/null +++ b/TEMUKJD/PDDForms/ProductSelectForms/UcAddPrice.cs @@ -0,0 +1,202 @@ +using NaiBa.Util.Extension; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace TemuKJD.PDDForms.ProductSelectForms +{ + public partial class UcAddPrice : UserControl + { + /// + /// 额外加价 + /// + [Description("显示最小值"), Category("UserProperty")] + public bool isShowMin + { + get + { + return this.txtPriceStart.Visible; + } + set + { + if (this.txtPriceStart.Visible != value) + { + this.txtPriceStart.Visible = value; + if (value == false) + { + this.lblPrice.Text = "价格 ≤"; + isShowMax = true; + } + else + this.lblPrice.Text = "< 价格 ≤"; + this.Invalidate(); + } + } + } + + /// + /// 额外加价 + /// + [Description("显示最大值"), Category("UserProperty")] + public bool isShowMax + { + get + { + return this.txtPriceEnd.Visible; + } + set + { + if (this.txtPriceEnd.Visible != value) + { + this.txtPriceEnd.Visible = value; + if (value == false) + { + isShowMin = true; + this.lblPrice.Text = "< 价格"; + } + else + this.lblPrice.Text = "< 价格 ≤"; + this.Invalidate(); + } + } + } + + /// + /// 开始价格 + /// + [Description("开始价格"), Category("UserProperty")] + public decimal PriceStart + { + get + { + return this.txtPriceStart.Text.Trim().ParseToDecimal(); + } + set + { + if (this.txtPriceStart.Text.Trim().ParseToDecimal() != value) + { + this.txtPriceStart.Text = value.ToString(); + this.Invalidate(); + } + } + } + + /// + /// 结束价格 + /// + [Description("结束价格"), Category("UserProperty")] + public decimal PriceEnd + { + get + { + return this.txtPriceEnd.Text.Trim().ParseToDecimal(); + } + set + { + if (this.txtPriceEnd.Text.Trim().ParseToDecimal() != value) + { + this.txtPriceEnd.Text = value.ToString(); + this.Invalidate(); + } + } + } + + /// + /// 加价倍数 + /// + [Description("加价倍数"), Category("UserProperty")] + public decimal PriceAddTimes + { + get + { + return this.txtAddTimes.Text.Trim().ParseToDecimal(); + } + set + { + if (this.txtAddTimes.Text.Trim().ParseToDecimal() != value) + { + this.txtAddTimes.Text = value.ToString(); + this.Invalidate(); + } + } + } + + + /// + /// 额外加价 + /// + [Description("额外加价"), Category("UserProperty")] + public decimal PriceAddMore + { + get + { + return this.txtAddMorePrice.Text.Trim().ParseToDecimal(); + } + set + { + if (this.txtAddMorePrice.Text.Trim().ParseToDecimal() != value) + { + this.txtAddMorePrice.Text = value.ToString(); + this.Invalidate(); + } + } + } + + /// + /// 额外加价 + /// + [Description("单买加价"), Category("UserProperty")] + public decimal SinglePriceAdd + { + get + { + return Math.Max(1, this.txtSinglePriceAdd.Text.Trim().ParseToDecimal()); + } + set + { + if (this.txtSinglePriceAdd.Text.Trim().ParseToDecimal() != value) + { + if (value < 1) + value = 1; + this.txtSinglePriceAdd.Text = value.ToString(); + this.Invalidate(); + } + } + } + + public UcAddPrice() + { + InitializeComponent(); + } + + private void UcAddPrice_Load(object sender, EventArgs e) + { + OnPriceChange(this); + } + + private void lblClose_Click(object sender, EventArgs e) + { + this.Dispose(); + OnPriceChange(this); + } + + private void Price_TextChanged(object sender, EventArgs e) + { + OnPriceChange(this); + } + + #region 价格发生改变事件 + public event Action PriceChange; + protected virtual void OnPriceChange(object param) + { + this.PriceChange?.Invoke(param); + } + #endregion + } +} diff --git a/TEMUKJD/PDDForms/ProductSelectForms/UcAddPrice.resx b/TEMUKJD/PDDForms/ProductSelectForms/UcAddPrice.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/TEMUKJD/PDDForms/ProductSelectForms/UcAddPrice.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/TEMUKJD/PDDForms/ShopForms/PDDShopBrowserObject.cs b/TEMUKJD/PDDForms/ShopForms/PDDShopBrowserObject.cs index 494981f..10d41ba 100644 --- a/TEMUKJD/PDDForms/ShopForms/PDDShopBrowserObject.cs +++ b/TEMUKJD/PDDForms/ShopForms/PDDShopBrowserObject.cs @@ -32,7 +32,8 @@ namespace TemuKJD.PDDForms.ShopForms BaseMsgForm.ShowError("商品Id不存在!"); return "failed"; } - var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == supplierId.ParseToString()); + //var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == supplierId.ParseToString()); + var shop = PDDAdminShopListForm.lstAdminShopInfo.FirstOrDefault(s => s.ShopId == supplierId.ParseToString()); if (string.IsNullOrEmpty(supplierId) || shop == null) { BaseMsgForm.ShowError("店铺不存在!"); @@ -77,7 +78,48 @@ namespace TemuKJD.PDDForms.ShopForms return; } } - catch (Exception ex) { } + catch (Exception ex) + { + OnInfoReceived("商品获取失败!商品数据格式获取失败!" + ex.Message); + return; + } + + var size_json = "{}"; + if (product.size_spec_id.ParseToLong() != 0) + { + try + { + var prod_size_rst = GetPddProdSizeSpec(sourceShop, sourceProdId.ToString(), commitId, product.size_spec_id.ParseToString()); + prod_size_rst = GetHtml.Unicode2String(prod_size_rst); + JObject prod_size_obj = JObject.Parse(prod_size_rst); + size_json = JsonHelper.SerializeObject(prod_size_obj["result"]); + var size = JsonHelper.DeserializeJsonToObject(size_json); + if (size == null) + { + OnInfoReceived("尺码表获取失败!尺码数据格式获取失败!"); + return; + } + } + catch (Exception ex) + { + OnInfoReceived("尺码表获取失败!尺码数据格式获取失败!" + ex.Message); + return; + } + } + //temu尺码表暂时注释 + //if (product.sizeTemplateId > 0) + //{ + // html = SizeSpecQuery(shop1, prodId1.ToString(), product.sizeTemplateId.ToString()); + // if(!html.Contains("\"success\":true")) + // { + // success_err_msg += " 尺码表获取失败!" + BaseRegex.GetStringJson(ref html, "errorMsg"); + // } + // else + // { + // obj = JObject.Parse(html); + // sizeRst = JsonHelper.SerializeObject(obj["result"]); + // } + //} var property_json = "{}"; PDDProductPropertyInfo property = null; @@ -142,22 +184,6 @@ namespace TemuKJD.PDDForms.ShopForms // return; //} - var sizeRst = ""; - //尺码表暂时注释 - //if (product.sizeTemplateId > 0) - //{ - // html = SizeSpecQuery(shop1, prodId1.ToString(), product.sizeTemplateId.ToString()); - // if(!html.Contains("\"success\":true")) - // { - // success_err_msg += " 尺码表获取失败!" + BaseRegex.GetStringJson(ref html, "errorMsg"); - // } - // else - // { - // obj = JObject.Parse(html); - // sizeRst = JsonHelper.SerializeObject(obj["result"]); - // } - //} - bool isExist = false; var existUrl = BaseClass.BuildObjString("product/get_product_list"); string existData = UserLogin.GetSignaturex() + "&search_spu=" + product.goods_id; @@ -172,7 +198,8 @@ namespace TemuKJD.PDDForms.ShopForms isExist = true; } - string product_json = "{\"detail\":" + detail_json + ",\"decoration\":" + decoration_json + ",\"property\":" + property_json + "}"; + + string product_json = "{\"detail\":" + detail_json + ",\"size\":" + size_json + ",\"decoration\":" + decoration_json + ",\"property\":" + property_json + "}"; string main_img = product.image_url; if (string.IsNullOrEmpty(main_img)) main_img = product.hd_thumb_url; @@ -200,12 +227,15 @@ namespace TemuKJD.PDDForms.ShopForms "&from_shop_id=" + shop.ShopId + "&spu_id=" + product.goods_id.ParseToString() + "&skc_id=" + product.goods_id.ParseToString() + + "&price_text=" + product.sku.Min(s => s.multi_price).ParseToInt() * 0.01m + "-" + product.sku.Max(s => s.multi_price).ParseToInt() * 0.01m + + "&main_cat_id=" + (product.cat_ids?.FirstOrDefault(c => c != null)).ParseToString() + + "&main_cat_name=" + HttpUtility.UrlEncode((product.cats?.FirstOrDefault(c => !string.IsNullOrEmpty(c))).ParseToString(), Encoding.UTF8) + "&cat_id=" + (product.cat_id).ParseToString() + "&cat_name=" + HttpUtility.UrlEncode((product.cats?.LastOrDefault(c => !string.IsNullOrEmpty(c))).ParseToString(), Encoding.UTF8) + "&ext_code=" + HttpUtility.UrlEncode(product.out_goods_sn, Encoding.UTF8) + "&product_name=" + HttpUtility.UrlEncode(product.goods_name, Encoding.UTF8) + "&product_json=" + HttpUtility.UrlEncode(product_json, Encoding.UTF8) + - "&size_json=" + HttpUtility.UrlEncode(sizeRst, Encoding.UTF8) + + "&size_json=" + HttpUtility.UrlEncode(size_json, Encoding.UTF8) + "&main_img=" + HttpUtility.UrlEncode(main_img, Encoding.UTF8); html = GetHtml.PostUtf8(url, data); @@ -496,6 +526,29 @@ namespace TemuKJD.PDDForms.ShopForms } return result; } + private string GetPddProdSizeSpec(ShopLoginInfo shop, string prodId, string commitId, string sizeSpecId) + { + var anti = shop.AntiContents.LastOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + string url = "https://mms.pinduoduo.com/cabernet/mms/sizespec/query/draft"; + //string body = @"{""goods_id"":" + prodId + "}"; + string body = @"{""id"":" + sizeSpecId + @"}"; + string refere = "https://mms.pinduoduo.com/goods/goods_add/index?id=" + commitId + "&goods_id=" + prodId + "&type=edit"; + var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++) + { + shop.AntiContents.Remove(anti); + anti = shop.AntiContents.FirstOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + { + Thread.Sleep(Randomx.GetId(300, 500)); + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + } + } + return result; + } private string GetPddProdProperty(ShopLoginInfo shop, string prodId, string commitId) { var anti = shop.AntiContents.LastOrDefault().ParseToString(); diff --git a/TEMUKJD/PDDForms/ShopForms/PDDShopLoginForm.Designer.cs b/TEMUKJD/PDDForms/ShopForms/PDDShopLoginForm.Designer.cs index 3f3a4e4..490efab 100644 --- a/TEMUKJD/PDDForms/ShopForms/PDDShopLoginForm.Designer.cs +++ b/TEMUKJD/PDDForms/ShopForms/PDDShopLoginForm.Designer.cs @@ -30,6 +30,7 @@ { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PDDShopLoginForm)); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.btnReturnPackage = new TemuKJD.UserControls.ButtonEx(); this.btnLoginAgain = new TemuKJD.UserControls.ButtonEx(); this.pnlMultiLogin = new System.Windows.Forms.Panel(); this.cmbMultiCookieName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); @@ -46,7 +47,6 @@ this.chkCloseAfterLogin = new DevComponents.DotNetBar.Controls.CheckBoxX(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.txtAddress = new System.Windows.Forms.TextBox(); - this.btnReturnPackage = new TemuKJD.UserControls.ButtonEx(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); @@ -82,11 +82,29 @@ this.splitContainer1.Panel2.Controls.Add(this.btnStop); this.splitContainer1.Panel2.Controls.Add(this.btnReload); this.splitContainer1.Panel2.Controls.Add(this.chkCloseAfterLogin); - this.splitContainer1.Size = new System.Drawing.Size(1438, 736); - this.splitContainer1.SplitterDistance = 675; + this.splitContainer1.Size = new System.Drawing.Size(1438, 755); + this.splitContainer1.SplitterDistance = 690; this.splitContainer1.SplitterWidth = 3; this.splitContainer1.TabIndex = 4; // + // btnReturnPackage + // + this.btnReturnPackage.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.btnReturnPackage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnReturnPackage.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnReturnPackage.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnReturnPackage.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnReturnPackage.ForeColor = System.Drawing.Color.White; + this.btnReturnPackage.Location = new System.Drawing.Point(674, 30); + this.btnReturnPackage.Margin = new System.Windows.Forms.Padding(2); + this.btnReturnPackage.Name = "btnReturnPackage"; + this.btnReturnPackage.Size = new System.Drawing.Size(136, 25); + this.btnReturnPackage.TabIndex = 464; + this.btnReturnPackage.Text = "提交退货到库存管理"; + this.btnReturnPackage.UseVisualStyleBackColor = false; + this.btnReturnPackage.Visible = false; + this.btnReturnPackage.Click += new System.EventHandler(this.btnReturnPackage_Click); + // // btnLoginAgain // this.btnLoginAgain.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -304,7 +322,7 @@ this.splitContainer2.BackColor = System.Drawing.Color.White; this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; - this.splitContainer2.Location = new System.Drawing.Point(1, 33); + this.splitContainer2.Location = new System.Drawing.Point(1, 14); this.splitContainer2.Name = "splitContainer2"; this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; // @@ -315,7 +333,7 @@ // splitContainer2.Panel2 // this.splitContainer2.Panel2.Controls.Add(this.splitContainer1); - this.splitContainer2.Size = new System.Drawing.Size(1438, 766); + this.splitContainer2.Size = new System.Drawing.Size(1438, 785); this.splitContainer2.SplitterDistance = 26; this.splitContainer2.TabIndex = 5; // @@ -330,23 +348,6 @@ this.txtAddress.TabIndex = 7; this.txtAddress.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtAddress_KeyDown); // - // btnReturnPackage - // - this.btnReturnPackage.Anchor = System.Windows.Forms.AnchorStyles.Top; - this.btnReturnPackage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnReturnPackage.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnReturnPackage.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnReturnPackage.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnReturnPackage.ForeColor = System.Drawing.Color.White; - this.btnReturnPackage.Location = new System.Drawing.Point(674, 30); - this.btnReturnPackage.Margin = new System.Windows.Forms.Padding(2); - this.btnReturnPackage.Name = "btnReturnPackage"; - this.btnReturnPackage.Size = new System.Drawing.Size(136, 25); - this.btnReturnPackage.TabIndex = 464; - this.btnReturnPackage.Text = "提交退货到库存管理"; - this.btnReturnPackage.UseVisualStyleBackColor = false; - this.btnReturnPackage.Visible = false; - // // PDDShopLoginForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; diff --git a/TEMUKJD/PDDForms/ShopForms/PDDShopLoginForm.cs b/TEMUKJD/PDDForms/ShopForms/PDDShopLoginForm.cs index ac01bc3..72a3615 100644 --- a/TEMUKJD/PDDForms/ShopForms/PDDShopLoginForm.cs +++ b/TEMUKJD/PDDForms/ShopForms/PDDShopLoginForm.cs @@ -68,7 +68,7 @@ namespace TemuKJD.PDDForms.ShopForms private void ShopLoginForm_Load(object sender, EventArgs e) { - //this.splitContainer1.SplitterDistance = 674; + this.splitContainer1.SplitterDistance = this.splitContainer1.Height - 62; if (isMultiLogin && shop != null) { @@ -906,6 +906,13 @@ function fireKeyEvent(el, evtType, keyCode) { private void ShopLoginForm_FormClosed(object sender, FormClosedEventArgs e) { //OnSaveComplete(shop); + Task.Run(() => { + Thread.Sleep(500); + if (!this.IsDisposed) + { + MainForm.instance.Invoke(new Action(() => { this.Dispose(); })); + } + }); } private void txtAddress_KeyDown(object sender, KeyEventArgs e) @@ -1007,5 +1014,11 @@ function getElementWithText(sText) InputUserNameAndPassword(cefWebBrowser, shop.LoginName, DataOpenSSL.DecryptString(shop.Password)); }); } + + private void btnReturnPackage_Click(object sender, EventArgs e) + { + //ReturnPackageDetailForm form = new ReturnPackageDetailForm(this.shop); + //form.ShowDialog(); + } } } diff --git a/TEMUKJD/StartUp.cs b/TEMUKJD/StartUp.cs index 68b515f..d864e52 100644 --- a/TEMUKJD/StartUp.cs +++ b/TEMUKJD/StartUp.cs @@ -221,6 +221,9 @@ namespace TemuKJD #region 读取库存信息 Task.Run(() => { + if (BaseClass.MainPath != "kuajingda") + return; + while (!IsShopInit) { Thread.Sleep(100);