diff --git a/TEMUKJD/KJD.csproj b/TEMUKJD/KJD.csproj index 077d6a7..0856cde 100644 --- a/TEMUKJD/KJD.csproj +++ b/TEMUKJD/KJD.csproj @@ -172,6 +172,12 @@ JstBanPlatformForm.cs + + Form + + + PDDFissionProdByChanceImgForm.cs + Form @@ -1265,6 +1271,9 @@ JstBanPlatformForm.cs + + PDDFissionProdByChanceImgForm.cs + PDDGetChanceProdByImgForm.cs diff --git a/TEMUKJD/PDDForms/AdminForms/PDDAdminForm.cs b/TEMUKJD/PDDForms/AdminForms/PDDAdminForm.cs index a0fe956..a35e915 100644 --- a/TEMUKJD/PDDForms/AdminForms/PDDAdminForm.cs +++ b/TEMUKJD/PDDForms/AdminForms/PDDAdminForm.cs @@ -110,6 +110,9 @@ namespace TemuKJD.PDDForms.AdminForms case "以图搜品采集": SetForm(getChanceProdByImgForm.Value); break; + case "以图搜品裂变": + SetForm(getChanceProdByImgForm.Value); + break; case "厂家商品采集": SetForm(getJuShuitanProdForm.Value); break; diff --git a/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.cs b/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.cs index 8b3ed6b..85e8663 100644 --- a/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.cs +++ b/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.cs @@ -658,8 +658,10 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms } } - activityRst1 = activity_goods_info(shop, prodParams.Select(p => p.goods_id.ParseToString()).ToList(), "20981"); - //activityRst1 = activity_goods_price_rule(shop, string.Join(",", prodParams.Select(p => p.goods_id.ParseToString()).ToList()), 20981, 27); + // 老接口 + //activityRst1 = activity_goods_info(shop, prodParams.Select(p => p.goods_id.ParseToString()).ToList(), "20981"); + // 新接口 + activityRst1 = activity_goods_price_rule(shop, string.Join(",", prodParams.Select(p => p.goods_id.ParseToString()).ToList()), 20981, 27); Thread.Sleep(Randomx.GetId(1000, 2000)); Thread.Sleep((moreSleepTime * 1000).ParseToInt()); } @@ -678,34 +680,70 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms try { var jObj = JObject.Parse(activityRst1); - var jStr = JsonHelper.SerializeObject(jObj["result"]["result"]); - var queryActivityInfoRstLst = (JsonHelper.DeserializeJsonToObject(jStr)?.theme_activity_quick_enroll_goods_render_form_list).ToList(); - if (queryActivityInfoRstLst == null) - queryActivityInfoRstLst = new List(); + + // 老接口 + //var jStr = JsonHelper.SerializeObject(jObj["result"]["result"]); + //var queryActivityInfoRstLst = (JsonHelper.DeserializeJsonToObject(jStr)?.theme_activity_quick_enroll_goods_render_form_list).ToList(); + //if (queryActivityInfoRstLst == null) + // queryActivityInfoRstLst = new List(); + + //foreach (var prodParam in prodParams) + //{ + // var pddActivitiInfo = queryActivityInfoRstLst.FirstOrDefault(act => act.goods_id == prodParam.goods_id); + // if (pddActivitiInfo == null) + // { + // addActivityFailLst.Add(new AddActivityFailInfo { goods_id = prodParam.goods_id, error_msg = "校验失败 981查询/新建失败 商品未提交成功或不满足参加活动条件" }); + // continue; + // } + // foreach (var activitySku in pddActivitiInfo.activity_price_render.sku_activity_price_render_dtolist) + // { + // var sku = prodParam.skus.FirstOrDefault(sk => string.Join(",", sk.spec.Select(s => s.spec_name)) == activitySku.sku_name); + // if (sku == null) + // { + // addActivityFailLst.Add(new AddActivityFailInfo { goods_id = prodParam.goods_id, error_msg = "校验失败 981sku丢失 " + activitySku.sku_name }); + // break; + // } + // if (sku.multi_price > activitySku.suggest_price) + // { + // // 此处临时用sku69_code记录一下需要改动库存的sku,库存为0的也记录后面再处理 + // sku.sku69_code = "yes"; + // sku.multi_price = activitySku.suggest_price; + // } + // } + // if (prodParam.skus.All(s => s.sku69_code == "yes")) + // { + // addActivityFailLst.Add(new AddActivityFailInfo { goods_id = prodParam.goods_id, error_msg = "校验失败 所有活动报价均低于产品期望价格" }); + // } + //} + + var jStr = JsonHelper.SerializeObject(jObj["result"]); + var pddActivitiPriceInfo = JsonHelper.DeserializeJsonToObject(jStr); foreach (var prodParam in prodParams) { - var pddActivitiInfo = queryActivityInfoRstLst.FirstOrDefault(act => act.goods_id == prodParam.goods_id); - if (pddActivitiInfo == null) + var pddActivitiPriceProd = pddActivitiPriceInfo.enroll_goods_rule_vos.FirstOrDefault(p => p.goods_id == prodParam.goods_id); + if (pddActivitiPriceProd == null) { - addActivityFailLst.Add(new AddActivityFailInfo { goods_id = prodParam.goods_id, error_msg = "校验失败 981查询/新建失败 商品未提交成功或不满足参加活动条件" }); + activityErr = "校验失败 981查询/新建失败 商品未提交成功或不满足参加活动条件"; + addActivityFailLst.Add(new AddActivityFailInfo { goods_id = prodParam.goods_id, error_msg = activityErr }); continue; } - foreach (var activitySku in pddActivitiInfo.activity_price_render.sku_activity_price_render_dtolist) + foreach (var activitySkuInfo in pddActivitiPriceProd.enroll_rule_param.enroll_goods_big_sale_price.sku_info_list) { - var sku = prodParam.skus.FirstOrDefault(sk => string.Join(",", sk.spec.Select(s => s.spec_name)) == activitySku.sku_name); + var sku = prodParam.skus.FirstOrDefault(sk => string.Join(",", sk.spec.Select(s => s.spec_name)) == activitySkuInfo.spec_info_str); if (sku == null) { - addActivityFailLst.Add(new AddActivityFailInfo { goods_id = prodParam.goods_id, error_msg = "校验失败 981sku丢失 " + activitySku.sku_name }); + addActivityFailLst.Add(new AddActivityFailInfo { goods_id = prodParam.goods_id, error_msg = "校验失败 981sku丢失 " + activitySkuInfo.spec_info_str }); break; } - if (sku.multi_price > activitySku.suggest_price) + if (sku.multi_price > activitySkuInfo.require_price) { // 此处临时用sku69_code记录一下需要改动库存的sku,库存为0的也记录后面再处理 sku.sku69_code = "yes"; - sku.multi_price = activitySku.suggest_price; + sku.multi_price = activitySkuInfo.require_price; } } + if (prodParam.skus.All(s => s.sku69_code == "yes")) { addActivityFailLst.Add(new AddActivityFailInfo { goods_id = prodParam.goods_id, error_msg = "校验失败 所有活动报价均低于产品期望价格" }); @@ -754,8 +792,10 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms } } - activityRst1 = activity_goods_info(shop, prodParams.Select(p => p.goods_id.ParseToString()).ToList(), "20981"); - //activityRst1 = activity_goods_price_rule(shop, string.Join(",", prodParams.Select(p => p.goods_id.ParseToString()).ToList()), 20981, 27); + // 老接口 + //activityRst1 = activity_goods_info(shop, prodParams.Select(p => p.goods_id.ParseToString()).ToList(), "20981"); + // 新接口 + activityRst1 = activity_goods_price_rule(shop, string.Join(",", prodParams.Select(p => p.goods_id.ParseToString()).ToList()), 20981, 27); Thread.Sleep(Randomx.GetId(1000, 2000)); Thread.Sleep((moreSleepTime * 1000).ParseToInt()); } @@ -773,41 +813,105 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms } try { - var jObj = JObject.Parse(activityRst1); - var jStr = JsonHelper.SerializeObject(jObj["result"]["result"]); - var queryActivityInfoRstLst = (JsonHelper.DeserializeJsonToObject(jStr)?.theme_activity_quick_enroll_goods_render_form_list).ToList(); - if (queryActivityInfoRstLst == null) - queryActivityInfoRstLst = new List(); - PDDActivitySubmitParam actSubmitParam = new PDDActivitySubmitParam(); actSubmitParam.activity_id = 20981; - actSubmitParam.enroll_source_ctx.enroll_type = 34; //入口1 - //actSubmitParam.enroll_source_ctx.enroll_type = 3; //入口2 - actSubmitParam.enroll_source_ctx.scene_full_coverage = "mmsActQuickEnrollMultiActivityRealTableV1"; //入口1 - //actSubmitParam.enroll_source_ctx.scene_full_coverage = "mmsActBatchEnrollV1"; //入口2 - actSubmitParam.enroll_source_ctx.source_type = "OwnHome_MultiActEnrollMMS"; //入口1 - //actSubmitParam.enroll_source_ctx.source_type = "MMSActicon"; //入口2 - actSubmitParam.enroll_source_ctx.scene_type = null; //入口1 - //actSubmitParam.enroll_source_ctx.scene_type = "ActivityCard"; //入口2 + // 入口1 + //actSubmitParam.enroll_source_ctx.enroll_type = 34; //入口1 + //actSubmitParam.enroll_source_ctx.scene_full_coverage = "mmsActQuickEnrollMultiActivityRealTableV1"; //入口1 + //actSubmitParam.enroll_source_ctx.source_type = "OwnHome_MultiActEnrollMMS"; //入口1 + //actSubmitParam.enroll_source_ctx.scene_type = null; //入口1 + // 入口2 + actSubmitParam.enroll_source_ctx.enroll_type = 3; //入口2 + actSubmitParam.enroll_source_ctx.scene_full_coverage = "mmsActBatchEnrollV1"; //入口2 + actSubmitParam.enroll_source_ctx.source_type = "MMSActicon"; //入口2 + actSubmitParam.enroll_source_ctx.scene_type = "ActivityCard"; //入口2 + actSubmitParam.create_protocol_vo.need_create_cost_template = true; + var jObj = JObject.Parse(activityRst1); + + //var jStr = JsonHelper.SerializeObject(jObj["result"]["result"]); + //var queryActivityInfoRstLst = (JsonHelper.DeserializeJsonToObject(jStr)?.theme_activity_quick_enroll_goods_render_form_list).ToList(); + //if (queryActivityInfoRstLst == null) + // queryActivityInfoRstLst = new List(); + + //foreach (var prodParam in prodParams) + //{ + // var pddActivitiInfo = queryActivityInfoRstLst.FirstOrDefault(act => act.goods_id == prodParam.goods_id); + // if (pddActivitiInfo == null) + // { + // addActivityFailLst.Add(new AddActivityFailInfo { goods_id = prodParam.goods_id, error_msg = "报名错误 981查询/新建失败 商品未提交成功或不满足参加活动条件" }); + // continue; + // } + // foreach (var activitySku in pddActivitiInfo.activity_price_render.sku_activity_price_render_dtolist) + // { + // //var sku = prodParam.skus.FirstOrDefault(s => s.sku_id == activitySku.sku_id); + // var sku = prodParam.skus.FirstOrDefault(sk => string.Join(",", sk.spec.Select(s => s.spec_name)) == activitySku.sku_name); + // if (sku != null && sku.multi_price == activitySku.suggest_price + 1) + // sku.multi_price -= 1; + // if (sku == null || sku.multi_price > activitySku.suggest_price) + // { + // activityErr = "报名错误 981价格低于产品价 " + activitySku.suggest_price + " < " + sku.multi_price; + // addActivityFailLst.Add(new AddActivityFailInfo { goods_id = prodParam.goods_id, error_msg = activityErr }); + // break; + // } + // } + // if (addActivityFailLst.Any(aa => aa.goods_id == prodParam.goods_id)) + // continue; + + // var goods_vo_item = new goods_vo_param(); + // goods_vo_item.goods_id = prodParam.goods_id; + // var skuSamePrice = prodParam.skus.Max(s => s.multi_price); + // foreach (var activitySku in pddActivitiInfo.activity_price_render.sku_activity_price_render_dtolist) + // { + // //var sku = prodParam.skus.FirstOrDefault(s => s.sku_id == activitySku.sku_id); + // var sku = prodParam.skus.FirstOrDefault(sk => string.Join(",", sk.spec.Select(s => s.spec_name)) == activitySku.sku_name); + // if (sku == null) + // { + // activityErr = "报名错误 981价格sku未找到"; + // addActivityFailLst.Add(new AddActivityFailInfo { goods_id = prodParam.goods_id, error_msg = activityErr }); + // break; + // } + + // create_sku_vo_param sku_vo_item = new create_sku_vo_param(); + // sku_vo_item.sku_id = activitySku.sku_id; + // sku_vo_item.sku_activity_price = sku.multi_price; //skuSamePrice; //sku.multi_price; //activitySku.suggest_price; + // sku_vo_item.sku_front_ctx_vo = new sku_front_ctx_vo_param() + // { + // filling_sku_price = sku.multi_price, //skuSamePrice, //sku.multi_price, //activitySku.suggest_price, + // gear_rule = activitySku.gear_rule, + // require_price = sku.multi_price, //skuSamePrice, //sku.multi_price, //activitySku.suggest_price, + // }; + // goods_vo_item.create_activity_price_vo.create_sku_vos.Add(sku_vo_item); + // } + // if (addActivityFailLst.Any(aa => aa.goods_id == prodParam.goods_id)) + // continue; + + // if (pddActivitiInfo.need_goods_activity_price == true) + // goods_vo_item.view_confirmed_goods_protocol_vo.confirm_hit_cut_price = true; + + // actSubmitParam.goods_volist.Add(goods_vo_item); + //} + + var jStr = JsonHelper.SerializeObject(jObj["result"]); + var pddActivitiPriceInfo = JsonHelper.DeserializeJsonToObject(jStr); foreach (var prodParam in prodParams) { - var pddActivitiInfo = queryActivityInfoRstLst.FirstOrDefault(act => act.goods_id == prodParam.goods_id); - if (pddActivitiInfo == null) + var pddActivitiPriceProd = pddActivitiPriceInfo.enroll_goods_rule_vos.FirstOrDefault(p => p.goods_id == prodParam.goods_id); + if (pddActivitiPriceProd == null) { - addActivityFailLst.Add(new AddActivityFailInfo { goods_id = prodParam.goods_id, error_msg = "报名错误 981查询/新建失败 商品未提交成功或不满足参加活动条件" }); + activityErr = "报名错误 347查询/新建失败 商品未提交成功或不满足参加活动条件"; + addActivityFailLst.Add(new AddActivityFailInfo { goods_id = prodParam.goods_id, error_msg = activityErr }); continue; } - foreach (var activitySku in pddActivitiInfo.activity_price_render.sku_activity_price_render_dtolist) + + foreach (var activitySkuInfo in pddActivitiPriceProd.enroll_rule_param.enroll_goods_big_sale_price.sku_info_list) { //var sku = prodParam.skus.FirstOrDefault(s => s.sku_id == activitySku.sku_id); - var sku = prodParam.skus.FirstOrDefault(sk => string.Join(",", sk.spec.Select(s => s.spec_name)) == activitySku.sku_name); - if (sku != null && sku.multi_price == activitySku.suggest_price + 1) - sku.multi_price -= 1; - if (sku == null || sku.multi_price > activitySku.suggest_price) + var sku = prodParam.skus.FirstOrDefault(sk => string.Join(",", sk.spec.Select(s => s.spec_name)) == activitySkuInfo.spec_info_str); + if (sku == null || sku.multi_price > activitySkuInfo.require_price) { - activityErr = "报名错误 981价格低于产品价 " + activitySku.suggest_price + " < " + sku.multi_price; + activityErr = "报名错误 981价格低于产品价 " + activitySkuInfo.require_price + " < " + sku.multi_price; addActivityFailLst.Add(new AddActivityFailInfo { goods_id = prodParam.goods_id, error_msg = activityErr }); break; } @@ -818,10 +922,10 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms var goods_vo_item = new goods_vo_param(); goods_vo_item.goods_id = prodParam.goods_id; var skuSamePrice = prodParam.skus.Max(s => s.multi_price); - foreach (var activitySku in pddActivitiInfo.activity_price_render.sku_activity_price_render_dtolist) + foreach (var activitySkuInfo in pddActivitiPriceProd.enroll_rule_param.enroll_goods_big_sale_price.sku_info_list) { //var sku = prodParam.skus.FirstOrDefault(s => s.sku_id == activitySku.sku_id); - var sku = prodParam.skus.FirstOrDefault(sk => string.Join(",", sk.spec.Select(s => s.spec_name)) == activitySku.sku_name); + var sku = prodParam.skus.FirstOrDefault(sk => string.Join(",", sk.spec.Select(s => s.spec_name)) == activitySkuInfo.spec_info_str); if (sku == null) { activityErr = "报名错误 981价格sku未找到"; @@ -830,24 +934,26 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms } create_sku_vo_param sku_vo_item = new create_sku_vo_param(); - sku_vo_item.sku_id = activitySku.sku_id; + sku_vo_item.sku_id = activitySkuInfo.sku_id; sku_vo_item.sku_activity_price = sku.multi_price; //skuSamePrice; //sku.multi_price; //activitySku.suggest_price; sku_vo_item.sku_front_ctx_vo = new sku_front_ctx_vo_param() { - filling_sku_price = sku.multi_price, //skuSamePrice, //sku.multi_price, //activitySku.suggest_price, - gear_rule = activitySku.gear_rule, - require_price = sku.multi_price, //skuSamePrice, //sku.multi_price, //activitySku.suggest_price, + filling_sku_price = sku.multi_price, + gear_rule = activitySkuInfo.gear_rule, + require_price = sku.multi_price, + filling_sku_price_gear_rule = activitySkuInfo.filling_sku_price_gear_rule, }; goods_vo_item.create_activity_price_vo.create_sku_vos.Add(sku_vo_item); } if (addActivityFailLst.Any(aa => aa.goods_id == prodParam.goods_id)) continue; - if (pddActivitiInfo.need_goods_activity_price == true) - goods_vo_item.view_confirmed_goods_protocol_vo.confirm_hit_cut_price = true; + //if (pddActivitiInfo.need_goods_activity_price == true) + goods_vo_item.view_confirmed_goods_protocol_vo.confirm_hit_cut_price = true; actSubmitParam.goods_volist.Add(goods_vo_item); } + if (actSubmitParam.goods_volist.Count == 0) { return "{\"success\":true,\"msg\":\"" + activityErr + "\",\"fail_list\":" + JsonHelper.SerializeObject(addActivityFailLst) + "}"; @@ -1214,7 +1320,7 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms Thread.Sleep((moreSleepTime * 1000).ParseToInt()); if (!activityRst2.Contains("\"success\":true")) { - activity_goods_price_rule(shop, prodParam.goods_id.ParseToString(), 23513, 414); + activityRst2 = activity_goods_price_rule(shop, prodParam.goods_id.ParseToString(), 23513, 414); Thread.Sleep(Randomx.GetId(1000, 2000)); Thread.Sleep((moreSleepTime * 1000).ParseToInt()); } diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs index d59a893..ccfd99b 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs @@ -772,7 +772,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms "", "是", "否"}); - this.cmbPddRelation.Location = new System.Drawing.Point(743, 7); + this.cmbPddRelation.Location = new System.Drawing.Point(743, 5); this.cmbPddRelation.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbPddRelation.Name = "cmbPddRelation"; this.cmbPddRelation.Size = new System.Drawing.Size(47, 25); @@ -827,7 +827,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // this.cmbCat2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.cmbCat2.FormattingEnabled = true; - this.cmbCat2.Location = new System.Drawing.Point(278, 75); + this.cmbCat2.Location = new System.Drawing.Point(278, 77); this.cmbCat2.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat2.Name = "cmbCat2"; this.cmbCat2.Size = new System.Drawing.Size(46, 25); @@ -912,7 +912,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms "机会商品", "以图搜品", "外部数据"}); - this.cmbSourceType.Location = new System.Drawing.Point(278, 40); + this.cmbSourceType.Location = new System.Drawing.Point(278, 42); this.cmbSourceType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbSourceType.Name = "cmbSourceType"; this.cmbSourceType.Size = new System.Drawing.Size(46, 25); @@ -958,7 +958,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms "", "是", "否"}); - this.cmbWxCat.Location = new System.Drawing.Point(622, 5); + this.cmbWxCat.Location = new System.Drawing.Point(622, 7); this.cmbWxCat.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbWxCat.Name = "cmbWxCat"; this.cmbWxCat.Size = new System.Drawing.Size(47, 25); @@ -980,7 +980,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.cmbSort.Items.AddRange(new object[] { "入库时间", "认领总数"}); - this.cmbSort.Location = new System.Drawing.Point(381, 40); + this.cmbSort.Location = new System.Drawing.Point(381, 42); this.cmbSort.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbSort.Name = "cmbSort"; this.cmbSort.Size = new System.Drawing.Size(46, 25); @@ -1056,7 +1056,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // this.cmbGroupFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.cmbGroupFilter.FormattingEnabled = true; - this.cmbGroupFilter.Location = new System.Drawing.Point(175, 40); + this.cmbGroupFilter.Location = new System.Drawing.Point(175, 42); this.cmbGroupFilter.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbGroupFilter.Name = "cmbGroupFilter"; this.cmbGroupFilter.Size = new System.Drawing.Size(46, 25); @@ -1071,7 +1071,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms "是", "否", "导出未拉回"}); - this.cmbExportToOutServer.Location = new System.Drawing.Point(622, 40); + this.cmbExportToOutServer.Location = new System.Drawing.Point(622, 42); this.cmbExportToOutServer.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbExportToOutServer.Name = "cmbExportToOutServer"; this.cmbExportToOutServer.Size = new System.Drawing.Size(47, 25); @@ -1107,7 +1107,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms "安全商品", "违规商品", "未校验"}); - this.cmbWxSafe.Location = new System.Drawing.Point(501, 40); + this.cmbWxSafe.Location = new System.Drawing.Point(501, 42); this.cmbWxSafe.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbWxSafe.Name = "cmbWxSafe"; this.cmbWxSafe.Size = new System.Drawing.Size(47, 25); @@ -1149,7 +1149,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // this.cmbCat1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.cmbCat1.FormattingEnabled = true; - this.cmbCat1.Location = new System.Drawing.Point(175, 75); + this.cmbCat1.Location = new System.Drawing.Point(175, 77); this.cmbCat1.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat1.Name = "cmbCat1"; this.cmbCat1.Size = new System.Drawing.Size(46, 25); @@ -1171,7 +1171,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // this.cmbCat3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.cmbCat3.FormattingEnabled = true; - this.cmbCat3.Location = new System.Drawing.Point(381, 75); + this.cmbCat3.Location = new System.Drawing.Point(381, 77); this.cmbCat3.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat3.Name = "cmbCat3"; this.cmbCat3.Size = new System.Drawing.Size(46, 25); @@ -1268,7 +1268,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms "是", "否", "修复回传未拉回"}); - this.cmbHasReturn.Location = new System.Drawing.Point(743, 40); + this.cmbHasReturn.Location = new System.Drawing.Point(743, 42); this.cmbHasReturn.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbHasReturn.Name = "cmbHasReturn"; this.cmbHasReturn.Size = new System.Drawing.Size(47, 25); diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs index 7ad6b7f..02310ca 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs @@ -1638,7 +1638,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms prodParam.nutrition_gallery = new List(); prodParam.origin_country_id = prodInfo.detail.origin_country_id; prodParam.origin_is_pre_sale = 0; - prodParam.out_goods_sn = dbProd.ext_code; //prodInfo.detail.out_goods_sn; + + var extCode = dbProd.ext_code.IsNullOrEmpty() ? prodInfo.detail.out_goods_sn : dbProd.ext_code; + if (extCode.IsNullOrEmpty() || extCode.Length < 4) + extCode = "EC1" + dbProd.spu_id + "A"; + prodParam.out_goods_sn = extCode; //prodInfo.detail.out_goods_sn; + prodParam.oversea_goods = prodInfo.detail.oversea_goods == null ? new object() : prodInfo.detail.oversea_goods; prodParam.prefillWhitePic = ""; // 白底图,需要研究如何获取 // 白底图 @@ -7466,7 +7471,12 @@ Content-Type: image/jpeg pddApi.Data["is_refundable"] = false; // 7天无理由退换货 pddApi.Data["market_price"] = prodInfo.detail.market_price; - pddApi.Data["out_goods_id"] = prodInfo.detail.out_goods_sn; + + var extCode = dbProd.ext_code.IsNullOrEmpty() ? prodInfo.detail.out_goods_sn : dbProd.ext_code; + if (extCode.IsNullOrEmpty() || extCode.Length < 4) + extCode = "EC1" + dbProd.spu_id + "A"; + pddApi.Data["out_goods_id"] = extCode; + pddApi.Data["second_hand"] = false; // 是否二手商品 pddApi.Data["shipment_limit_second"] = 172800; @@ -9601,7 +9611,10 @@ Content-Type: image/jpeg //pddApi.Data["operate_type"] = 0; // 是否提交草稿,默认提交 0:提交,1:保存 pddApi.Data["order_limit"] = prodRstObj["order_limit"]; pddApi.Data["origin_country_id"] = prodRstObj["origin_country_id"]; - pddApi.Data["out_goods_id"] = prodInfo.detail.out_goods_sn; //prodRstObj["out_goods_id"]; + var extCode = dbProd.ext_code.IsNullOrEmpty() ? prodInfo.detail.out_goods_sn : dbProd.ext_code; + if (extCode.IsNullOrEmpty() || extCode.Length < 4) + extCode = "EC1" + dbProd.spu_id + "A"; + pddApi.Data["out_goods_id"] = extCode; //prodRstObj["out_goods_id"]; if (!prodRstObj["out_source_goods_id"].IsJTokenNullOrEmpty()) pddApi.Data["out_source_goods_id"] = prodRstObj["out_source_goods_id"]; if (!prodRstObj["out_source_type"].IsJTokenNullOrEmpty()) diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDFissionProdByChanceImgForm.Designer.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDFissionProdByChanceImgForm.Designer.cs new file mode 100644 index 0000000..680dbef --- /dev/null +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDFissionProdByChanceImgForm.Designer.cs @@ -0,0 +1,1203 @@ + +namespace TemuKJD.PDDForms.ProductSelectForms +{ + partial class PDDFissionProdByChanceImgForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + 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 dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.chkReGet = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.label12 = new System.Windows.Forms.Label(); + this.btnUrlSearch = new DevComponents.DotNetBar.PanelEx(); + this.txtImgUrl = new System.Windows.Forms.TextBox(); + this.chkFilterSameName = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.label7 = new System.Windows.Forms.Label(); + this.chkOverride = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.label6 = new System.Windows.Forms.Label(); + this.txtMinPrice = new System.Windows.Forms.TextBox(); + this.btnClear = new DevComponents.DotNetBar.PanelEx(); + this.btnSelectSuccess = new DevComponents.DotNetBar.PanelEx(); + this.btnStop = new DevComponents.DotNetBar.PanelEx(); + this.btnStopStop = new DevComponents.DotNetBar.PanelEx(); + this.btnSearch = new DevComponents.DotNetBar.PanelEx(); + this.btnAddToDb = new DevComponents.DotNetBar.PanelEx(); + this.btnGetDetail = new DevComponents.DotNetBar.PanelEx(); + this.txtShopId = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.btnEmpty = new DevComponents.DotNetBar.PanelEx(); + this.txtShopName = new System.Windows.Forms.TextBox(); + this.txtNotes = new System.Windows.Forms.TextBox(); + this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx(); + this.label4 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.splitContainer3 = new System.Windows.Forms.SplitContainer(); + this.pbShopLoading = new System.Windows.Forms.PictureBox(); + this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx(); + this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colUserName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.txtSearchChance = new System.Windows.Forms.TextBox(); + this.txtSearchCount = new System.Windows.Forms.TextBox(); + this.cmbSearchLabel = new System.Windows.Forms.ComboBox(); + this.label11 = new System.Windows.Forms.Label(); + this.pbLoading = new System.Windows.Forms.PictureBox(); + this.txtSearchMaxPrice = new System.Windows.Forms.TextBox(); + this.panel2 = new System.Windows.Forms.Panel(); + this.txtSearchMinPrice = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.cmbCat1 = new System.Windows.Forms.ComboBox(); + this.lblGroupFilter = new System.Windows.Forms.Label(); + this.cmbCat2 = new System.Windows.Forms.ComboBox(); + this.pnlEmpty = new DevComponents.DotNetBar.PanelEx(); + this.label9 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.dgvChanceProduct = new TemuKJD.UserComponent.DataGridViewEx(); + this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colChanceId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colImg = new System.Windows.Forms.DataGridViewImageColumn(); + this.colGoodsName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colHotValue = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colCate = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colDel = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.chk = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.ucGroupBoxEx1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); + this.splitContainer3.Panel1.SuspendLayout(); + this.splitContainer3.Panel2.SuspendLayout(); + this.splitContainer3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvChanceProduct)).BeginInit(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.BackColor = System.Drawing.Color.White; + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); + this.splitContainer1.Size = new System.Drawing.Size(1344, 635); + this.splitContainer1.SplitterDistance = 140; + this.splitContainer1.TabIndex = 4; + // + // ucGroupBoxEx1 + // + this.ucGroupBoxEx1.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.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.ucGroupBoxEx1.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx1.Controls.Add(this.chkReGet); + this.ucGroupBoxEx1.Controls.Add(this.label12); + this.ucGroupBoxEx1.Controls.Add(this.btnUrlSearch); + this.ucGroupBoxEx1.Controls.Add(this.txtImgUrl); + this.ucGroupBoxEx1.Controls.Add(this.chkFilterSameName); + this.ucGroupBoxEx1.Controls.Add(this.label7); + this.ucGroupBoxEx1.Controls.Add(this.chkOverride); + this.ucGroupBoxEx1.Controls.Add(this.label6); + this.ucGroupBoxEx1.Controls.Add(this.txtMinPrice); + this.ucGroupBoxEx1.Controls.Add(this.btnClear); + this.ucGroupBoxEx1.Controls.Add(this.btnSelectSuccess); + this.ucGroupBoxEx1.Controls.Add(this.btnStop); + this.ucGroupBoxEx1.Controls.Add(this.btnStopStop); + this.ucGroupBoxEx1.Controls.Add(this.btnSearch); + this.ucGroupBoxEx1.Controls.Add(this.btnAddToDb); + this.ucGroupBoxEx1.Controls.Add(this.btnGetDetail); + this.ucGroupBoxEx1.Controls.Add(this.txtShopId); + this.ucGroupBoxEx1.Controls.Add(this.label2); + this.ucGroupBoxEx1.Controls.Add(this.btnEmpty); + this.ucGroupBoxEx1.Controls.Add(this.txtShopName); + this.ucGroupBoxEx1.Controls.Add(this.txtNotes); + this.ucGroupBoxEx1.Controls.Add(this.btnRefreshShop); + this.ucGroupBoxEx1.Controls.Add(this.label4); + this.ucGroupBoxEx1.Controls.Add(this.label3); + this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2); + this.ucGroupBoxEx1.Name = "ucGroupBoxEx1"; + this.ucGroupBoxEx1.Size = new System.Drawing.Size(1339, 138); + this.ucGroupBoxEx1.TabIndex = 0; + this.ucGroupBoxEx1.TabStop = false; + this.ucGroupBoxEx1.Text = "操作"; + // + // chkReGet + // + this.chkReGet.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.chkReGet.AutoSize = true; + this.chkReGet.Location = new System.Drawing.Point(1173, 21); + this.chkReGet.Name = "chkReGet"; + this.chkReGet.Size = new System.Drawing.Size(159, 21); + this.chkReGet.TabIndex = 1096; + this.chkReGet.Text = "再次获取已获取过的商品"; + this.chkReGet.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label12.AutoSize = true; + this.label12.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.label12.Location = new System.Drawing.Point(658, 19); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(200, 17); + this.label12.TabIndex = 966; + this.label12.Text = "图片地址贴入下方文本框,一行一个"; + // + // btnUrlSearch + // + this.btnUrlSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnUrlSearch.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnUrlSearch.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnUrlSearch.DisabledBackColor = System.Drawing.Color.Empty; + this.btnUrlSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnUrlSearch.Location = new System.Drawing.Point(858, 15); + this.btnUrlSearch.Name = "btnUrlSearch"; + this.btnUrlSearch.Size = new System.Drawing.Size(106, 25); + this.btnUrlSearch.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnUrlSearch.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnUrlSearch.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnUrlSearch.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnUrlSearch.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnUrlSearch.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnUrlSearch.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnUrlSearch.Style.GradientAngle = 90; + this.btnUrlSearch.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnUrlSearch.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnUrlSearch.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnUrlSearch.TabIndex = 935; + this.btnUrlSearch.Text = "图片链接搜索"; + this.btnUrlSearch.Click += new System.EventHandler(this.btnUrlSearch_Click); + // + // txtImgUrl + // + this.txtImgUrl.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.txtImgUrl.Location = new System.Drawing.Point(419, 43); + this.txtImgUrl.Multiline = true; + this.txtImgUrl.Name = "txtImgUrl"; + this.txtImgUrl.Size = new System.Drawing.Size(545, 56); + this.txtImgUrl.TabIndex = 931; + // + // chkFilterSameName + // + this.chkFilterSameName.AutoSize = true; + this.chkFilterSameName.Location = new System.Drawing.Point(419, 17); + this.chkFilterSameName.Name = "chkFilterSameName"; + this.chkFilterSameName.Size = new System.Drawing.Size(99, 21); + this.chkFilterSameName.TabIndex = 903; + this.chkFilterSameName.Text = "过滤相同标题"; + this.chkFilterSameName.UseVisualStyleBackColor = true; + // + // label7 + // + this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(1148, 83); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(44, 17); + this.label7.TabIndex = 844; + this.label7.Text = "元SKU"; + // + // chkOverride + // + this.chkOverride.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.chkOverride.AutoSize = true; + this.chkOverride.Location = new System.Drawing.Point(1197, 81); + this.chkOverride.Name = "chkOverride"; + this.chkOverride.Size = new System.Drawing.Size(135, 21); + this.chkOverride.TabIndex = 757; + this.chkOverride.Text = "覆盖库中已存在商品"; + this.chkOverride.UseVisualStyleBackColor = true; + // + // label6 + // + this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(993, 83); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(116, 17); + this.label6.TabIndex = 843; + this.label6.Text = "入库时移除价格低于"; + // + // txtMinPrice + // + this.txtMinPrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.txtMinPrice.Location = new System.Drawing.Point(1109, 80); + this.txtMinPrice.Name = "txtMinPrice"; + this.txtMinPrice.Size = new System.Drawing.Size(39, 23); + this.txtMinPrice.TabIndex = 842; + this.txtMinPrice.Text = "10"; + // + // btnClear + // + this.btnClear.CanvasColor = System.Drawing.SystemColors.Control; + this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClear.DisabledBackColor = System.Drawing.Color.Empty; + this.btnClear.Location = new System.Drawing.Point(295, 88); + this.btnClear.Name = "btnClear"; + this.btnClear.Size = new System.Drawing.Size(100, 25); + this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnClear.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnClear.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnClear.Style.GradientAngle = 90; + this.btnClear.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.TabIndex = 875; + this.btnClear.Text = "清除列表"; + this.btnClear.Click += new System.EventHandler(this.btnClear_Click); + // + // btnSelectSuccess + // + this.btnSelectSuccess.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnSelectSuccess.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSelectSuccess.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSelectSuccess.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSelectSuccess.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSelectSuccess.Location = new System.Drawing.Point(1046, 44); + this.btnSelectSuccess.Name = "btnSelectSuccess"; + this.btnSelectSuccess.Size = new System.Drawing.Size(153, 25); + this.btnSelectSuccess.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSelectSuccess.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSelectSuccess.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSelectSuccess.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSelectSuccess.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSelectSuccess.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSelectSuccess.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSelectSuccess.Style.GradientAngle = 90; + this.btnSelectSuccess.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSelectSuccess.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSelectSuccess.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSelectSuccess.TabIndex = 786; + this.btnSelectSuccess.Text = "一键勾选已采集详情商品"; + this.btnSelectSuccess.Click += new System.EventHandler(this.btnSelectSuccess_Click); + // + // btnStop + // + 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(295, 26); + this.btnStop.Name = "btnStop"; + this.btnStop.Size = new System.Drawing.Size(100, 25); + 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))))); + this.btnStop.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnStop.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnStop.Style.GradientAngle = 90; + this.btnStop.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnStop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnStop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnStop.TabIndex = 761; + this.btnStop.Text = "停止当前操作"; + this.btnStop.Click += new System.EventHandler(this.btnStop_Click); + // + // btnStopStop + // + this.btnStopStop.CanvasColor = System.Drawing.SystemColors.Control; + this.btnStopStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnStopStop.DisabledBackColor = System.Drawing.Color.Empty; + this.btnStopStop.Location = new System.Drawing.Point(295, 57); + this.btnStopStop.Name = "btnStopStop"; + this.btnStopStop.Size = new System.Drawing.Size(100, 25); + this.btnStopStop.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnStopStop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnStopStop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnStopStop.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnStopStop.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStopStop.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnStopStop.Style.GradientAngle = 90; + this.btnStopStop.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnStopStop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnStopStop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStopStop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStopStop.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnStopStop.TabIndex = 814; + this.btnStopStop.Text = "强制解除查询"; + this.btnStopStop.Click += new System.EventHandler(this.btnStopStop_Click); + // + // 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(518, 15); + this.btnSearch.Name = "btnSearch"; + this.btnSearch.Size = new System.Drawing.Size(106, 25); + 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 = 643; + this.btnSearch.Text = "选择图片搜索"; + this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click); + // + // btnAddToDb + // + this.btnAddToDb.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnAddToDb.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnAddToDb.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnAddToDb.DisabledBackColor = System.Drawing.Color.Empty; + this.btnAddToDb.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnAddToDb.Location = new System.Drawing.Point(1205, 103); + this.btnAddToDb.Name = "btnAddToDb"; + this.btnAddToDb.Size = new System.Drawing.Size(116, 25); + this.btnAddToDb.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnAddToDb.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnAddToDb.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnAddToDb.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnAddToDb.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnAddToDb.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnAddToDb.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnAddToDb.Style.GradientAngle = 90; + this.btnAddToDb.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnAddToDb.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnAddToDb.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnAddToDb.TabIndex = 718; + this.btnAddToDb.Text = "机会商品入库"; + this.btnAddToDb.Click += new System.EventHandler(this.btnAddToDb_Click); + // + // btnGetDetail + // + this.btnGetDetail.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnGetDetail.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnGetDetail.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnGetDetail.DisabledBackColor = System.Drawing.Color.Empty; + this.btnGetDetail.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnGetDetail.Location = new System.Drawing.Point(1205, 44); + this.btnGetDetail.Name = "btnGetDetail"; + this.btnGetDetail.Size = new System.Drawing.Size(116, 25); + this.btnGetDetail.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnGetDetail.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnGetDetail.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnGetDetail.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnGetDetail.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnGetDetail.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnGetDetail.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnGetDetail.Style.GradientAngle = 90; + this.btnGetDetail.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnGetDetail.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnGetDetail.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnGetDetail.TabIndex = 683; + this.btnGetDetail.Text = "获取机会商品详情"; + this.btnGetDetail.Click += new System.EventHandler(this.btnGetDetail_Click); + // + // txtShopId + // + this.txtShopId.Location = new System.Drawing.Point(76, 28); + this.txtShopId.Name = "txtShopId"; + this.txtShopId.Size = new System.Drawing.Size(183, 23); + this.txtShopId.TabIndex = 704; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(30, 31); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(57, 17); + this.label2.TabIndex = 705; + this.label2.Text = "店铺ID:"; + // + // btnEmpty + // + this.btnEmpty.CanvasColor = System.Drawing.SystemColors.Control; + this.btnEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnEmpty.DisabledBackColor = System.Drawing.Color.Empty; + this.btnEmpty.Location = new System.Drawing.Point(223, 100); + this.btnEmpty.Name = "btnEmpty"; + this.btnEmpty.Size = new System.Drawing.Size(36, 23); + this.btnEmpty.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnEmpty.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnEmpty.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnEmpty.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnEmpty.Style.GradientAngle = 90; + this.btnEmpty.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnEmpty.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnEmpty.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnEmpty.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnEmpty.TabIndex = 711; + this.btnEmpty.Text = "重置"; + this.btnEmpty.Click += new System.EventHandler(this.btnEmpty_Click); + // + // txtShopName + // + this.txtShopName.Location = new System.Drawing.Point(76, 52); + this.txtShopName.Name = "txtShopName"; + this.txtShopName.Size = new System.Drawing.Size(183, 23); + this.txtShopName.TabIndex = 706; + // + // txtNotes + // + this.txtNotes.Location = new System.Drawing.Point(76, 76); + this.txtNotes.Name = "txtNotes"; + this.txtNotes.Size = new System.Drawing.Size(183, 23); + this.txtNotes.TabIndex = 708; + // + // btnRefreshShop + // + this.btnRefreshShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnRefreshShop.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnRefreshShop.DisabledBackColor = System.Drawing.Color.Empty; + this.btnRefreshShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnRefreshShop.Location = new System.Drawing.Point(163, 100); + this.btnRefreshShop.Name = "btnRefreshShop"; + this.btnRefreshShop.Size = new System.Drawing.Size(58, 23); + this.btnRefreshShop.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnRefreshShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRefreshShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRefreshShop.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnRefreshShop.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnRefreshShop.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnRefreshShop.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnRefreshShop.Style.GradientAngle = 90; + this.btnRefreshShop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnRefreshShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnRefreshShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnRefreshShop.TabIndex = 710; + this.btnRefreshShop.Text = "查询店铺"; + this.btnRefreshShop.Click += new System.EventHandler(this.btnRefreshShop_Click); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(19, 79); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(68, 17); + this.label4.TabIndex = 709; + this.label4.Text = "店铺备注:"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(19, 55); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(68, 17); + this.label3.TabIndex = 707; + this.label3.Text = "店铺名称:"; + // + // splitContainer2 + // + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.splitContainer3); + this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.chk); + this.splitContainer2.Panel2.Controls.Add(this.statusBar); + this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1); + this.splitContainer2.Size = new System.Drawing.Size(1344, 491); + this.splitContainer2.SplitterDistance = 462; + this.splitContainer2.TabIndex = 0; + // + // splitContainer3 + // + this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer3.Location = new System.Drawing.Point(4, 0); + this.splitContainer3.Name = "splitContainer3"; + // + // splitContainer3.Panel1 + // + this.splitContainer3.Panel1.Controls.Add(this.pbShopLoading); + this.splitContainer3.Panel1.Controls.Add(this.dgvShop); + // + // splitContainer3.Panel2 + // + this.splitContainer3.Panel2.Controls.Add(this.txtSearchChance); + this.splitContainer3.Panel2.Controls.Add(this.txtSearchCount); + this.splitContainer3.Panel2.Controls.Add(this.cmbSearchLabel); + this.splitContainer3.Panel2.Controls.Add(this.label11); + this.splitContainer3.Panel2.Controls.Add(this.pbLoading); + this.splitContainer3.Panel2.Controls.Add(this.txtSearchMaxPrice); + this.splitContainer3.Panel2.Controls.Add(this.panel2); + this.splitContainer3.Panel2.Controls.Add(this.txtSearchMinPrice); + this.splitContainer3.Panel2.Controls.Add(this.label10); + this.splitContainer3.Panel2.Controls.Add(this.cmbCat1); + this.splitContainer3.Panel2.Controls.Add(this.lblGroupFilter); + this.splitContainer3.Panel2.Controls.Add(this.cmbCat2); + this.splitContainer3.Panel2.Controls.Add(this.pnlEmpty); + this.splitContainer3.Panel2.Controls.Add(this.label9); + this.splitContainer3.Panel2.Controls.Add(this.label1); + this.splitContainer3.Panel2.Controls.Add(this.label8); + this.splitContainer3.Panel2.Controls.Add(this.label5); + this.splitContainer3.Panel2.Controls.Add(this.dgvChanceProduct); + this.splitContainer3.Size = new System.Drawing.Size(1336, 462); + this.splitContainer3.SplitterDistance = 290; + this.splitContainer3.TabIndex = 9; + // + // pbShopLoading + // + this.pbShopLoading.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pbShopLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; + this.pbShopLoading.Location = new System.Drawing.Point(120, 206); + this.pbShopLoading.Name = "pbShopLoading"; + this.pbShopLoading.Size = new System.Drawing.Size(50, 50); + this.pbShopLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbShopLoading.TabIndex = 8; + this.pbShopLoading.TabStop = false; + // + // dgvShop + // + this.dgvShop.AllowUserToAddRows = false; + this.dgvShop.AllowUserToDeleteRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvShop.AutoRowNumber = true; + 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; + this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colSelect, + this.colUserName, + this.colShopLoginName, + this.colShopId, + this.colShopName, + this.colShopNotes, + this.colLoginStatus, + this.colCanUse, + this.colMessage}); + this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvShop.Location = new System.Drawing.Point(0, 0); + this.dgvShop.MultiSelectCheckBox = true; + this.dgvShop.Name = "dgvShop"; + this.dgvShop.ReadOnly = true; + this.dgvShop.RowHeadersWidth = 25; + this.dgvShop.RowTemplate.Height = 23; + this.dgvShop.Size = new System.Drawing.Size(290, 462); + this.dgvShop.TabIndex = 7; + this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); + // + // colSelect + // + this.colSelect.HeaderText = "全选"; + this.colSelect.Name = "colSelect"; + this.colSelect.ReadOnly = true; + this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSelect.Width = 28; + // + // colUserName + // + this.colUserName.HeaderText = "店铺所属用户名称"; + this.colUserName.Name = "colUserName"; + this.colUserName.ReadOnly = true; + this.colUserName.Visible = false; + // + // colShopLoginName + // + this.colShopLoginName.HeaderText = "店铺登录名"; + this.colShopLoginName.Name = "colShopLoginName"; + this.colShopLoginName.ReadOnly = true; + this.colShopLoginName.Visible = false; + // + // colShopId + // + this.colShopId.HeaderText = "店铺Id"; + this.colShopId.Name = "colShopId"; + this.colShopId.ReadOnly = true; + this.colShopId.Visible = false; + this.colShopId.Width = 55; + // + // colShopName + // + this.colShopName.FillWeight = 150F; + this.colShopName.HeaderText = "店铺名称"; + this.colShopName.Name = "colShopName"; + this.colShopName.ReadOnly = true; + this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colShopName.Width = 70; + // + // colShopNotes + // + this.colShopNotes.HeaderText = "备注"; + this.colShopNotes.Name = "colShopNotes"; + this.colShopNotes.ReadOnly = true; + this.colShopNotes.Width = 70; + // + // colLoginStatus + // + this.colLoginStatus.HeaderText = "状态"; + this.colLoginStatus.Name = "colLoginStatus"; + this.colLoginStatus.ReadOnly = true; + this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colLoginStatus.Width = 40; + // + // colCanUse + // + this.colCanUse.HeaderText = "可用"; + this.colCanUse.Name = "colCanUse"; + this.colCanUse.ReadOnly = true; + this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colCanUse.Visible = false; + this.colCanUse.Width = 28; + // + // colMessage + // + this.colMessage.HeaderText = "消息"; + this.colMessage.Name = "colMessage"; + this.colMessage.ReadOnly = true; + // + // txtSearchChance + // + this.txtSearchChance.Location = new System.Drawing.Point(86, 106); + this.txtSearchChance.Name = "txtSearchChance"; + this.txtSearchChance.Size = new System.Drawing.Size(268, 23); + this.txtSearchChance.TabIndex = 679; + this.txtSearchChance.Visible = false; + // + // txtSearchCount + // + this.txtSearchCount.Location = new System.Drawing.Point(421, 51); + this.txtSearchCount.Name = "txtSearchCount"; + this.txtSearchCount.Size = new System.Drawing.Size(40, 23); + this.txtSearchCount.TabIndex = 738; + this.txtSearchCount.Text = "500"; + this.txtSearchCount.Visible = false; + // + // cmbSearchLabel + // + this.cmbSearchLabel.FormattingEnabled = true; + this.cmbSearchLabel.Items.AddRange(new object[] { + "不限", + "当季新品", + "热门跟款", + "全网热销", + "潜力商品", + "热门商品"}); + this.cmbSearchLabel.Location = new System.Drawing.Point(86, 78); + this.cmbSearchLabel.Name = "cmbSearchLabel"; + this.cmbSearchLabel.Size = new System.Drawing.Size(100, 25); + this.cmbSearchLabel.TabIndex = 653; + this.cmbSearchLabel.Text = "不限"; + this.cmbSearchLabel.Visible = false; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(294, 82); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(20, 17); + this.label11.TabIndex = 943; + this.label11.Text = "至"; + this.label11.Visible = false; + // + // 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(496, 206); + this.pbLoading.Name = "pbLoading"; + this.pbLoading.Size = new System.Drawing.Size(50, 50); + this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbLoading.TabIndex = 7; + this.pbLoading.TabStop = false; + this.pbLoading.Visible = false; + // + // txtSearchMaxPrice + // + this.txtSearchMaxPrice.Location = new System.Drawing.Point(314, 79); + this.txtSearchMaxPrice.Name = "txtSearchMaxPrice"; + this.txtSearchMaxPrice.Size = new System.Drawing.Size(40, 23); + this.txtSearchMaxPrice.TabIndex = 942; + this.txtSearchMaxPrice.Visible = false; + // + // panel2 + // + this.panel2.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.panel2.Location = new System.Drawing.Point(409, 355); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(610, 87); + this.panel2.TabIndex = 8; + // + // txtSearchMinPrice + // + this.txtSearchMinPrice.Location = new System.Drawing.Point(254, 79); + this.txtSearchMinPrice.Name = "txtSearchMinPrice"; + this.txtSearchMinPrice.Size = new System.Drawing.Size(40, 23); + this.txtSearchMinPrice.TabIndex = 941; + this.txtSearchMinPrice.Visible = false; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(192, 82); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(56, 17); + this.label10.TabIndex = 940; + this.label10.Text = "商品价格"; + this.label10.Visible = false; + // + // cmbCat1 + // + this.cmbCat1.FormattingEnabled = true; + this.cmbCat1.Items.AddRange(new object[] { + "不限"}); + this.cmbCat1.Location = new System.Drawing.Point(86, 50); + this.cmbCat1.Name = "cmbCat1"; + this.cmbCat1.Size = new System.Drawing.Size(100, 25); + this.cmbCat1.TabIndex = 907; + this.cmbCat1.Text = "不限"; + this.cmbCat1.Visible = false; + this.cmbCat1.TextChanged += new System.EventHandler(this.cmbCat1_TextChanged); + // + // lblGroupFilter + // + this.lblGroupFilter.AutoSize = true; + this.lblGroupFilter.Location = new System.Drawing.Point(23, 82); + this.lblGroupFilter.Name = "lblGroupFilter"; + this.lblGroupFilter.Size = new System.Drawing.Size(68, 17); + this.lblGroupFilter.TabIndex = 641; + this.lblGroupFilter.Text = "热门主题:"; + this.lblGroupFilter.Visible = false; + // + // cmbCat2 + // + this.cmbCat2.FormattingEnabled = true; + this.cmbCat2.Items.AddRange(new object[] { + "不限"}); + this.cmbCat2.Location = new System.Drawing.Point(254, 50); + this.cmbCat2.Name = "cmbCat2"; + this.cmbCat2.Size = new System.Drawing.Size(100, 25); + this.cmbCat2.TabIndex = 908; + this.cmbCat2.Text = "不限"; + this.cmbCat2.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(575, 50); + this.pnlEmpty.Name = "pnlEmpty"; + this.pnlEmpty.Size = new System.Drawing.Size(56, 25); + 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 = 431; + this.pnlEmpty.Text = "清空条件"; + this.pnlEmpty.Visible = false; + this.pnlEmpty.Click += new System.EventHandler(this.pnlEmpty_Click); + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(192, 54); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(68, 17); + this.label9.TabIndex = 909; + this.label9.Text = "二级类目:"; + this.label9.Visible = false; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(36, 109); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(56, 17); + this.label1.TabIndex = 678; + this.label1.Text = "搜索词:"; + this.label1.Visible = false; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(23, 54); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(68, 17); + this.label8.TabIndex = 906; + this.label8.Text = "商品类目:"; + this.label8.Visible = false; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(360, 54); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(68, 17); + this.label5.TabIndex = 737; + this.label5.Text = "搜索数量:"; + this.label5.Visible = false; + // + // dgvChanceProduct + // + this.dgvChanceProduct.AllowUserToAddRows = false; + this.dgvChanceProduct.AllowUserToDeleteRows = false; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvChanceProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dgvChanceProduct.AutoRowNumber = true; + this.dgvChanceProduct.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dgvChanceProduct.BackgroundColor = System.Drawing.Color.White; + this.dgvChanceProduct.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.dgvChanceProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dgvChanceProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvChanceProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colCheck, + this.colChanceId, + this.colImgUrl, + this.colImg, + this.colGoodsName, + this.colHotValue, + this.colCate, + this.colPrice, + this.colDel, + this.colMsg}); + this.dgvChanceProduct.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvChanceProduct.Location = new System.Drawing.Point(0, 0); + this.dgvChanceProduct.MultiSelectCheckBox = true; + this.dgvChanceProduct.Name = "dgvChanceProduct"; + this.dgvChanceProduct.ReadOnly = true; + this.dgvChanceProduct.RowTemplate.Height = 23; + this.dgvChanceProduct.Size = new System.Drawing.Size(1042, 462); + this.dgvChanceProduct.TabIndex = 6; + this.dgvChanceProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvChanceProduct_CellContentClick); + // + // colCheck + // + this.colCheck.FillWeight = 26F; + this.colCheck.HeaderText = "选"; + this.colCheck.Name = "colCheck"; + this.colCheck.ReadOnly = true; + this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // colChanceId + // + this.colChanceId.FillWeight = 50F; + this.colChanceId.HeaderText = "机会Id"; + this.colChanceId.Name = "colChanceId"; + this.colChanceId.ReadOnly = true; + // + // colImgUrl + // + this.colImgUrl.FillWeight = 300F; + this.colImgUrl.HeaderText = "图片路径"; + this.colImgUrl.Name = "colImgUrl"; + this.colImgUrl.ReadOnly = true; + this.colImgUrl.Visible = false; + // + // colImg + // + this.colImg.FillWeight = 40F; + this.colImg.HeaderText = "图片"; + this.colImg.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; + this.colImg.Name = "colImg"; + this.colImg.ReadOnly = true; + this.colImg.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colImg.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // colGoodsName + // + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colGoodsName.DefaultCellStyle = dataGridViewCellStyle5; + this.colGoodsName.FillWeight = 120F; + this.colGoodsName.HeaderText = "商品名称"; + this.colGoodsName.Name = "colGoodsName"; + this.colGoodsName.ReadOnly = true; + // + // colHotValue + // + this.colHotValue.FillWeight = 60F; + this.colHotValue.HeaderText = "热度"; + this.colHotValue.Name = "colHotValue"; + this.colHotValue.ReadOnly = true; + // + // colCate + // + this.colCate.HeaderText = "类目"; + this.colCate.Name = "colCate"; + this.colCate.ReadOnly = true; + // + // colPrice + // + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colPrice.DefaultCellStyle = dataGridViewCellStyle6; + this.colPrice.FillWeight = 70F; + this.colPrice.HeaderText = "价格"; + this.colPrice.Name = "colPrice"; + this.colPrice.ReadOnly = true; + // + // colDel + // + this.colDel.FillWeight = 35F; + this.colDel.HeaderText = "删除"; + this.colDel.Name = "colDel"; + this.colDel.ReadOnly = true; + // + // colMsg + // + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colMsg.DefaultCellStyle = dataGridViewCellStyle7; + this.colMsg.FillWeight = 200F; + this.colMsg.HeaderText = "操作结果"; + this.colMsg.Name = "colMsg"; + this.colMsg.ReadOnly = true; + // + // chk + // + this.chk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.chk.AutoSize = true; + this.chk.Checked = true; + this.chk.CheckState = System.Windows.Forms.CheckState.Checked; + this.chk.Location = new System.Drawing.Point(1277, 3); + this.chk.Name = "chk"; + this.chk.Size = new System.Drawing.Size(63, 21); + this.chk.TabIndex = 671; + this.chk.Text = "多选框"; + this.chk.UseVisualStyleBackColor = true; + this.chk.Visible = false; + // + // statusBar + // + this.statusBar.BackColor = System.Drawing.Color.White; + this.statusBar.Dock = System.Windows.Forms.DockStyle.Left; + 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(296, 0); + this.statusBar.Margin = new System.Windows.Forms.Padding(0); + this.statusBar.Name = "statusBar"; + this.statusBar.Size = new System.Drawing.Size(743, 25); + this.statusBar.TabIndex = 5; + // + // ucSplitPage1 + // + this.ucSplitPage1.CurrentPage = 1; + this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Left; + this.ucSplitPage1.IsShowPageSize = false; + this.ucSplitPage1.Location = new System.Drawing.Point(0, 0); + this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); + this.ucSplitPage1.Name = "ucSplitPage1"; + this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.ucSplitPage1.PageSize = 50; + this.ucSplitPage1.Size = new System.Drawing.Size(296, 25); + this.ucSplitPage1.TabIndex = 6; + this.ucSplitPage1.TotalPage = 1; + this.ucSplitPage1.PageChange += new System.Action(this.ucSplitPage1_PageChange); + // + // PDDFissionProdByChanceImgForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(1344, 635); + this.Controls.Add(this.splitContainer1); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.KeyPreview = true; + this.Name = "PDDFissionProdByChanceImgForm"; + this.Text = "PDDGetChanceProd"; + this.Load += new System.EventHandler(this.PDDGetChanceProd_Load); + this.VisibleChanged += new System.EventHandler(this.PDDGetChanceProdForm_VisibleChanged); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.ucGroupBoxEx1.ResumeLayout(false); + this.ucGroupBoxEx1.PerformLayout(); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + this.splitContainer2.Panel2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + this.splitContainer3.Panel1.ResumeLayout(false); + this.splitContainer3.Panel2.ResumeLayout(false); + this.splitContainer3.Panel2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit(); + this.splitContainer3.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvChanceProduct)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private DevComponents.DotNetBar.PanelEx btnSearch; + private DevComponents.DotNetBar.PanelEx pnlEmpty; + private System.Windows.Forms.ComboBox cmbSearchLabel; + private System.Windows.Forms.Label lblGroupFilter; + private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.PictureBox pbLoading; + private System.Windows.Forms.Panel panel2; + private UserComponent.DataGridViewEx dgvChanceProduct; + private UserControls.UcSplitPage ucSplitPage1; + private UserControls.StatusBarUserControl statusBar; + private UserComponent.UcCheckBox chk; + private System.Windows.Forms.SplitContainer splitContainer3; + private UserComponent.DataGridViewEx dgvShop; + private System.Windows.Forms.Label label1; + private DevComponents.DotNetBar.PanelEx btnGetDetail; + private System.Windows.Forms.TextBox txtSearchChance; + private DevComponents.DotNetBar.PanelEx btnEmpty; + private System.Windows.Forms.TextBox txtNotes; + private System.Windows.Forms.Label label4; + private DevComponents.DotNetBar.PanelEx btnRefreshShop; + private System.Windows.Forms.TextBox txtShopId; + private System.Windows.Forms.TextBox txtShopName; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private UserComponent.UcGroupBoxEx ucGroupBoxEx1; + private DevComponents.DotNetBar.PanelEx btnAddToDb; + private System.Windows.Forms.PictureBox pbShopLoading; + private System.Windows.Forms.TextBox txtSearchCount; + private System.Windows.Forms.Label label5; + private UserComponent.UcCheckBox chkOverride; + private DevComponents.DotNetBar.PanelEx btnStop; + private DevComponents.DotNetBar.PanelEx btnSelectSuccess; + private DevComponents.DotNetBar.PanelEx btnStopStop; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck; + private System.Windows.Forms.DataGridViewTextBoxColumn colChanceId; + private System.Windows.Forms.DataGridViewTextBoxColumn colImgUrl; + private System.Windows.Forms.DataGridViewImageColumn colImg; + private System.Windows.Forms.DataGridViewTextBoxColumn colGoodsName; + private System.Windows.Forms.DataGridViewTextBoxColumn colHotValue; + private System.Windows.Forms.DataGridViewTextBoxColumn colCate; + private System.Windows.Forms.DataGridViewTextBoxColumn colPrice; + private System.Windows.Forms.DataGridViewLinkColumn colDel; + private System.Windows.Forms.DataGridViewTextBoxColumn colMsg; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TextBox txtMinPrice; + private DevComponents.DotNetBar.PanelEx btnClear; + private System.Windows.Forms.ComboBox cmbCat2; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.ComboBox cmbCat1; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.TextBox txtSearchMaxPrice; + private System.Windows.Forms.TextBox txtSearchMinPrice; + private System.Windows.Forms.Label label10; + private UserComponent.UcCheckBox chkFilterSameName; + private DevComponents.DotNetBar.PanelEx btnUrlSearch; + private System.Windows.Forms.TextBox txtImgUrl; + private System.Windows.Forms.Label label12; + private UserComponent.UcCheckBox chkReGet; + private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; + private System.Windows.Forms.DataGridViewTextBoxColumn colUserName; + 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 colLoginStatus; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse; + private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; + } +} \ No newline at end of file diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDFissionProdByChanceImgForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDFissionProdByChanceImgForm.cs new file mode 100644 index 0000000..4c6a243 --- /dev/null +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDFissionProdByChanceImgForm.cs @@ -0,0 +1,1254 @@ +using AllBase; +using AllBase.Model.Result; +using AllBase.Model.Result.PDDResult; +using NaiBa.Util; +using NaiBa.Util.Extension; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using TemuKJD.BaseForms; +using TemuKJD.BLL; +using TemuKJD.Extension; +using TemuKJD.PDDForms.AdminForms; +using TemuKJD.PDDForms.ShopForms; +using TemuKJD.ToolForms; +using Work; + +namespace TemuKJD.PDDForms.ProductSelectForms +{ + public partial class PDDFissionProdByChanceImgForm : Form + { + CheckBox chkSelectAll; + ChanceProductConfig chanceProductConfig; + public CancellationTokenSource cancellationTokenSource { get; set; } = null; + public ConcurrentList lstAdminShopInfo { get; set; } = new ConcurrentList(); + public ConcurrentList lstChanceProductResult { get; set; } = new ConcurrentList(); + public List lstChanceCateInfo { get; set; } = new List(); + /// + /// 查找以图搜品 + /// + public PDDFissionProdByChanceImgForm() + { + InitializeComponent(); + } + + private void PDDGetChanceProd_Load(object sender, EventArgs e) + { + this.panel2.Location = new Point(45, 55); + this.panel2.Width = Math.Max(10, this.panel2.Parent.Width - 90); + this.panel2.Height = Math.Max(10, this.panel2.Parent.Height - 90); + this.panel2.SendToBack(); + + chkSelectAll = dgvShop.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false, null, true); + chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged; + this.dgvChanceProduct.AddSelectorColumn("colCheck"); + this.dgvChanceProduct.AddImgColumn("colImg", "colImgUrl"); + + chanceProductConfig = NaiBa.Util.Helper.ConfigHelper.LoadConfig("pdd_chance_product_config"); + if (chanceProductConfig == null) + chanceProductConfig = new ChanceProductConfig(); + this.txtNotes.Text = chanceProductConfig.SearchNotes; + this.txtShopId.Text = chanceProductConfig.SearchShopId; + this.txtShopName.Text = chanceProductConfig.SearchShopName; + + this.txtNotes.TextChanged += Txt_TextChanged; + this.txtShopId.TextChanged += Txt_TextChanged; + this.txtShopName.TextChanged += Txt_TextChanged; + + Task.Run(() => { ReacCate(); }); + + var tmpChanceProductLst = NaiBa.Util.Helper.ConfigHelper.LoadConfig>("pdd_chance_product_by_img_list_" + MainForm.ProcessCount); + if (tmpChanceProductLst == null) + tmpChanceProductLst = new List(); + lstChanceProductResult.AddRange(tmpChanceProductLst); + pbLoading.Visible = true; + Task.Run(() => + { + int id = 0; + foreach (var chanceProductResult in lstChanceProductResult) + { + id++; + if (id % 50 == 0) + Thread.Sleep(1); + Invoke(new Action(() => + { + var rowId = this.dgvChanceProduct.Rows.Add( + true, + chanceProductResult.chance_id, + chanceProductResult.pic_url.Replace("https://", "http://"), + DataGridViewExtension.defaultBitmap, + chanceProductResult.keywords, + chanceProductResult.hot_index, + chanceProductResult.cat_id_3.ParseToLong() == 0 ? new long?() : chanceProductResult.cat_id_3.ParseToLong(), + "采集详情后显示", + "删除", + chanceProductResult.getProductMsg + ); + dgvChanceProduct.Rows[rowId].Height = 60; + + if (chanceProductResult.dbProduct != null) + { + var dbProd = chanceProductResult.dbProduct; + var row = dgvChanceProduct.Rows[rowId]; + row.Cells["colGoodsName"].Value = dbProd.product_name; + row.Cells["colCate"].Value = dbProd.cat_name; + row.Cells["colPrice"].Value = dbProd.price_text; + } + })); + } + Invoke(new Action(() => + { + pbLoading.Visible = false; + })); + }); + } + + void ReacCate() + { + string filePath = Path.Combine(Environment.CurrentDirectory, "temp\\pdd_chance_cate.cty"); + if (!File.Exists(filePath)) + return; + using (StreamReader sr = new StreamReader(filePath, System.Text.Encoding.UTF8)) + { + try + { + string cateStr = sr.ReadToEnd().Trim(); + lstChanceCateInfo = JsonHelper.DeserializeJsonToList(cateStr); + } + catch (Exception ex) + { + BaseMsgForm.ShowError("以图搜品类目获取失败:" + ex.Message); + } + if (lstChanceCateInfo == null) + lstChanceCateInfo = new List(); + } + var lstChanceCateInfo1 = lstChanceCateInfo.Where(c => c.cate_lvl == 1).ToList(); + var lstChanceCateInfo2 = lstChanceCateInfo.Where(c => c.cate_lvl == 2).ToList(); + Invoke(new Action(() => + { + foreach(var cateInfo in lstChanceCateInfo1) + { + this.cmbCat1.Items.Add(cateInfo.cate_name); + } + })); + } + + private void cmbCat1_TextChanged(object sender, EventArgs e) + { + cmbCat2.Items.Clear(); + cmbCat2.Items.Add("不限"); + + var chanceCateInfo1 = lstChanceCateInfo.FirstOrDefault(c => c.cate_lvl == 1 && c.cate_name == cmbCat1.Text); + if (chanceCateInfo1 != null) + { + var lstChanceCateInfo2 = lstChanceCateInfo.Where(c => c.cate_lvl == 2 && c.cate1_id == chanceCateInfo1.cate_id).ToList(); + foreach (var cateInfo in lstChanceCateInfo2) + { + this.cmbCat2.Items.Add(cateInfo.cate_name); + } + } + } + + private void Txt_TextChanged(object sender, EventArgs e) + { + chanceProductConfig.SearchNotes = this.txtNotes.Text.Trim(); + chanceProductConfig.SearchShopId = this.txtShopId.Text.Trim(); + chanceProductConfig.SearchShopName = this.txtShopName.Text.Trim(); + + NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_chance_product_config", chanceProductConfig); + } + + private void chkSelectAll_CheckedChanged(object sender, EventArgs e) + { + if (!chkSelectAll.Checked) + { + foreach (DataGridViewRow row in dgvShop.Rows) + { + row.Cells["colSelect"].Value = false; + } + } + else + { + var list = lstAdminShopInfo.Where(s => s.LoginStatus == "登录成功").ToList(); + foreach (DataGridViewRow row in dgvShop.Rows) + { + if (list.Any(l => l.ShopId == row.Cells["colShopId"]?.Value?.ToString())) + row.Cells["colSelect"].Value = true; + } + } + } + + + private void PDDGetChanceProdForm_VisibleChanged(object sender, EventArgs e) + { + this.pbShopLoading.Visible = true; + SearchShop(this.ucSplitPage1.CurrentPage); + } + + private void btnRefreshShop_Click(object sender, EventArgs e) + { + if (this.ucSplitPage1.CurrentPage != 1) + this.ucSplitPage1.CurrentPage = 1; + else + SearchShop(1); + } + + public void SearchShop(int page) + { + List userShopIdList = dgvShop.Rows.Cast() + .Where(r => r.Cells["colSelect"].Value.ParseToBool()) + .Select(r => r.Cells["colShopId"].Value.ParseToString() + r.Cells["colUserName"].Value.ParseToString()).ToList(); + if (InvokeRequired) + { + Invoke(new Action(() => + { + this.pbShopLoading.Visible = true; + this.dgvShop.Rows.Clear(); + lstAdminShopInfo.Clear(); + })); + } + else + { + this.pbShopLoading.Visible = true; + this.dgvShop.Rows.Clear(); + lstAdminShopInfo.Clear(); + } + if (cancellationTokenSource == null || cancellationTokenSource.IsCancellationRequested) + cancellationTokenSource = new CancellationTokenSource(); + Task.Run(() => + { + int pageCount; + var list = AdminGetServerShopLst(out pageCount, page); + lstAdminShopInfo.AddRange(list); + this.ucSplitPage1.TotalPage = pageCount; + + foreach (var shop in lstAdminShopInfo) + { + bool canUse = shop.LoginStatus2 == "国际版在线"; + Invoke(new Action(() => + { + int rowIndex = this.dgvShop.Rows.Add( + userShopIdList.Contains(shop.ShopId + shop.UserName), + shop.UserName, + shop.LoginName, + shop.ShopId, + shop.ShopAccount, + shop.Notes, + canUse ? "在线" : "掉线", + canUse, + string.Empty + ); + displayShopStatus(shop); + })); + } + + Invoke(new Action(() => + { + this.pbShopLoading.Visible = false; + })); + }, cancellationTokenSource.Token); + } + + void displayShopStatus(ShopLoginInfo shop) + { + bool canUse = shop.LoginStatus == "登录成功"; + var rows = this.dgvShop.Rows.Cast().Where(r => r.Cells["colShopLoginName"].Value.ParseToString() == shop?.LoginName); + foreach (var row in rows) + { + row.Cells["colCanUse"].Value = canUse; + row.Cells["colLoginStatus"].Value = canUse ? "在线" : "掉线"; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightGreen : Color.OrangeRed; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkGreen : Color.DarkRed; + + } + } + + public List AdminGetServerShopLst(out int pageCount, int page = 1, int pageSize = 50) + { + List list = new List(); + pageCount = 1; + + var url = BaseClass.BuildObjString("shop/admin_get_shop_list"); + var data = UserLogin.GetSignaturex() + + "&page=" + page + + "&page_size=" + pageSize + + "&shop_ids=" + string.Join(",", txtShopId.Text.Trim().Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) + + "&shop_names=" + string.Join(",", txtShopName.Text.Trim().Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) + + "&search_notes=" + txtNotes.Text.Trim().Trim(','); + 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("shop_id") || !html.Contains("shop_account") || !html.Contains("login_pass")) + { + return list; + } + + int count = BaseRegex.GetIntJson(ref html, "count"); + pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt(); + pageCount = Math.Max(pageCount, 1); + + return ShopBLL.DeserializationShop(html); + } + + private void ucSplitPage1_PageChange(object obj) + { + SearchShop(this.ucSplitPage1.CurrentPage); + } + + private void btnEmpty_Click(object sender, EventArgs e) + { + txtNotes.Text = txtShopId.Text = txtShopName.Text = ""; + } + + private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + string headerText = dgvShop.Columns[e.ColumnIndex].HeaderText; + string loginName = dgvShop.Rows[e.RowIndex].Cells["colShopLoginName"].Value.ParseToString(); + string accountId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToString(); + ShopLoginInfo shop = null; + shop = lstAdminShopInfo.FirstOrDefault(s => s.LoginName == loginName && s.ShopId == accountId); + + switch (headerText) + { + case "登录": + case "状态": + { + { + PDDAdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + if (shop.LoginStatus == "登录成功") + { + PDDAdminShopLoginForm shopLoginForm = new PDDAdminShopLoginForm(shop); + shopLoginForm.openType = EnumOpenType.manage; + shopLoginForm.WindowState = FormWindowState.Maximized; + shopLoginForm.InitUrl = "https://mms.pinduoduo.com/home/"; + shopLoginForm.Show(); + } + else + { + PDDAdminShopLoginForm shopLoginForm = new PDDAdminShopLoginForm(shop); + shopLoginForm.openType = EnumOpenType.login; + //shopLoginForm.SaveComplete += shopLoginForm_SaveComplete; + shopLoginForm.ShowDialog(); + displayShopStatus(shop); + } + } + } + break; + case "": + dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value; + break; + default: + break; + } + } + private void shopLoginForm_SaveComplete(object obj) + { + //var shop = obj as ShopLoginInfo; + //if (shop == null) + // return; + + //displayShopStatus(shop); + } + + private void btnUrlSearch_Click(object sender, EventArgs e) + { + var shopIds = this.dgvShop.Rows.Cast().Where(r => r.Cells["colSelect"].Value.ParseToBool() == true) + .Select(r => r.Cells["colShopId"].Value.ParseToString()).ToList(); + if (shopIds.Count <= 0) + { + BaseMsgForm.ShowError("请选择店铺"); + return; + } + + List fileNameLst = new List(); + + string tempImgPath = Path.GetTempPath().Trim('\\') + "\\" + Randomx.GetWordWithNumber(8).ToLower(); + if (!Directory.Exists(tempImgPath)) + Directory.CreateDirectory(tempImgPath); + var imgUrlLst = this.txtImgUrl.Text.Split(new string[] { "\r", "\n", ";", " " }, StringSplitOptions.RemoveEmptyEntries); + foreach (var imgUrl in imgUrlLst) + { + try + { + string getImgError; + var image = GetHtml.GetUrlImg(imgUrl.Replace("https://", "http://"), out getImgError); + var imageBg = new Bitmap(800, 800); + if (!string.IsNullOrEmpty(getImgError) || image == null) + { + BaseMsgForm.ShowError("图片获取失败:" + imgUrl + " " + getImgError); + return; + } + using (Graphics g = Graphics.FromImage(imageBg)) + { + g.DrawImage(image, new Rectangle(0, 0, imageBg.Width, imageBg.Height), 0, 0, image.Width, image.Height, GraphicsUnit.Pixel); + } + string imgFullPath = tempImgPath + "\\" + imgUrl.Replace("https://", "").Replace("/", "_").Replace("?", "_") + ".jpg"; + imageBg.Save(imgFullPath, System.Drawing.Imaging.ImageFormat.Jpeg); + fileNameLst.Add(imgFullPath); + } + catch(Exception ex) + { + + } + } + SearchWithFile(fileNameLst); + } + + private void btnSearch_Click(object sender, EventArgs e) + { + var shopIds = this.dgvShop.Rows.Cast().Where(r => r.Cells["colSelect"].Value.ParseToBool() == true) + .Select(r => r.Cells["colShopId"].Value.ParseToString()).ToList(); + if (shopIds.Count <= 0) + { + BaseMsgForm.ShowError("请选择店铺"); + return; + } + + List fileNameLst = new List(); + OpenFileDialog openFileDialog = new OpenFileDialog(); + openFileDialog.Multiselect = true; + // 设置过滤条件,只显示文本文件 + openFileDialog.Filter = "图片文件 (*.jpeg;*.jpg;*.png)|*.jpeg;*.jpg;*.png|All files (*.*)|*.*"; + // 显示对话框并获取结果 + if (openFileDialog.ShowDialog() == DialogResult.OK) + { + try + { + // 读取文件内容 + //text = File.ReadAllText(openFileDialog.FileName); + fileNameLst = openFileDialog.FileNames.ToList(); + } + catch (Exception ex) + { + BaseMsgForm.ShowError("打开自定义图片失败 " + ex.Message); + return; + } + } + + if (fileNameLst.Count <= 0) + { + BaseMsgForm.ShowError("请选择要搜索的图片"); + return; + } + + SearchWithFile(fileNameLst); + } + + void SearchWithFile(List fileNameLst) + { + var shopIds = this.dgvShop.Rows.Cast().Where(r => r.Cells["colSelect"].Value.ParseToBool() == true) + .Select(r => r.Cells["colShopId"].Value.ParseToString()).ToList(); + if (shopIds.Count <= 0) + { + BaseMsgForm.ShowError("请选择店铺"); + return; + } + + dgvChanceProduct.Rows.Clear(); + lstChanceProductResult.Clear(); + pbLoading.Visible = true; + if (cancellationTokenSource == null || cancellationTokenSource.IsCancellationRequested) + cancellationTokenSource = new CancellationTokenSource(); + Task.Run(() => + { + ShopLoginInfo shop = null; + while (shop == null || shop.LoginStatus != "登录成功") + { + shop = GetOneShop(shopIds); + if (shop == null) + { + break; + } + } + + int index = 0; + foreach (var imgName in fileNameLst) + { + if (cancellationTokenSource.IsCancellationRequested) + break; + + index++; + if ((index - 1) % 5 == 0) + { + PDDShopLoginForm loginForm = null; + Invoke(new Action(() => + { + this.panel2.SendToBack(); + //this.panel2.BringToFront(); + loginForm = new PDDShopLoginForm(shop); + loginForm.TopLevel = false; + loginForm.openType = EnumOpenType.manage; + loginForm.WindowState = FormWindowState.Maximized; + loginForm.InitUrl = "https://mms.pinduoduo.com/goods/goods_list/chance?sourcePage=goodsListTopButton"; + loginForm.Dock = DockStyle.Fill; + this.panel2.Controls.Add(loginForm); + loginForm.Show(); + })); + Thread.Sleep(Randomx.GetId(3000, 5000)); + Invoke(new Action(() => + { + this.panel2.SendToBack(); + if (loginForm != null) + loginForm.Close(); + })); + } + else + { + Thread.Sleep(Randomx.GetId(3000, 8000)); + } + + string img_signature = ""; + var img_signature_rst = get_upload_chance_img_signature(shop); + img_signature_rst = GetHtml.Unicode2String(img_signature_rst); + if (!img_signature_rst.Contains("\"success\":true")) + { + var error = BaseRegex.GetStringJson(ref img_signature_rst, "error_msg"); + if (string.IsNullOrEmpty(error)) + error = img_signature_rst; + Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "请求上传图片失败 " + error; + })); + continue; + } + else + { + img_signature = BaseRegex.GetStringJson(ref img_signature_rst, "signature"); + } + + string imgUrl = ""; + var imgRst = PddUploadChanceImg(shop, imgName, img_signature); + if (!imgRst.Contains("\"url\":\"http")) + { + var error = BaseRegex.GetStringJson(ref imgRst, "error_msg"); + if (string.IsNullOrEmpty(error)) + error = imgRst; + Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "图片上传失败 " + error; + })); + continue; + } + else + { + imgUrl = BaseRegex.GetStringJson(ref imgRst, "url"); + imgUrl = imgUrl.Split('?').FirstOrDefault(); + } + + + var rst = get_chance_by_img(shop, imgUrl); + if (!rst.Contains("success\":true")) + { + PDDAdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + while (shop == null || shop.LoginStatus != "登录成功") + { + shop = GetOneShop(shopIds); + + if (cancellationTokenSource.IsCancellationRequested) + { + shop = null; + break; + } + if (shop == null) break; + } + if (shop == null) break; + continue; + } + + GetChanceProductResult getResult = null; + try + { + JObject jObj = JObject.Parse(rst); + getResult = new GetChanceProductResult() { list = new List(), }; + foreach (var obj in jObj["result"]["list"]) + { + var prodName = obj["goods_name"].ParseToString(); + if (chkFilterSameName.Checked && getResult.list.Any(r => r.keywords == prodName)) + continue; + + getResult.list.Add(new ChanceProductResult() + { + chance_id = obj["trick_id"].ParseToString(), + refer_price = obj["price"].ParseToInt(), + keywords = obj["goods_name"].ParseToString(), + pic_url = obj["thumb_url"].ParseToString(), + hot_index = obj["hot_index"].ParseToInt(), + gallery_img_url_list = new List() { obj["thumb_url"].ParseToString() }, + }); + } + lstChanceProductResult.AddRange(getResult.list.Where(r => !lstChanceProductResult.Any(p => p.chance_id == r.chance_id))); + foreach(var chanceProductResult in getResult.list) + { + Invoke(new Action(() => + { + var rowId = this.dgvChanceProduct.Rows.Add( + true, + chanceProductResult.chance_id, + chanceProductResult.pic_url.Replace("https://", "http://"), + DataGridViewExtension.defaultBitmap, + chanceProductResult.keywords, + chanceProductResult.hot_index, + chanceProductResult.cat_id_3.ParseToLong() == 0 ? new long?() : chanceProductResult.cat_id_3.ParseToLong(), + "预估:" + chanceProductResult.refer_price / 100.0 + " 采集详情后显示实际值", + "删除" + ); + dgvChanceProduct.Rows[rowId].Height = 60; + })); + } + } + catch (Exception ex) + { + BaseMsgForm.ShowError("查询失败" + ex.Message); + Invoke(new Action(() => + { + pbLoading.Visible = false; + })); + return; + } + } + + Invoke(new Action(() => + { + pbLoading.Visible = false; + if (cancellationTokenSource?.IsCancellationRequested == true) + { + BaseMsgForm.ShowInfo("列表获取停止!"); + } + else + BaseMsgForm.ShowInfo("列表获取完毕!"); + })); + }, cancellationTokenSource.Token); + } + + private void dgvChanceProduct_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + string headerText = dgvChanceProduct.Columns[e.ColumnIndex].HeaderText; + var chanceId = dgvChanceProduct.Rows[e.RowIndex].Cells["colChanceId"].Value.ParseToString(); + var chanceProd = lstChanceProductResult.FirstOrDefault(p => p.chance_id == chanceId); + var row = dgvChanceProduct.Rows[e.RowIndex]; + + switch (headerText) + { + case "删除": + //if (BaseMsgForm.ShowConfirm("确定删除商品吗?删除后不可恢复!").DialogResult == DialogResult.Cancel) + // return; + //DeleteProduct(dbId); + dgvChanceProduct.Rows.Remove(row); + lstChanceProductResult.Remove(chanceProd); + NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_chance_product_by_img_list_" + MainForm.ProcessCount, lstChanceProductResult); + break; + case "图片": + var imgUrl = dgvChanceProduct.Rows[e.RowIndex].Cells["colImgUrl"].Value.ParseToString().Replace("?imageView2/2/w/90/h/90", ""); + Dictionary dic = new Dictionary(); + dic[imgUrl] = imgUrl; + foreach (var imgPath in chanceProd.gallery_img_url_list) + { + dic[imgPath.Replace("https", "http")] = imgPath.Replace("https", "http"); + } + ShowImgForm imgFrom = new ShowImgForm(imgUrl, dic); + imgFrom.ShowDialog(); + break; + case "": + dgvChanceProduct.Rows[e.RowIndex].Cells["colCheck"].Value = !(bool)dgvChanceProduct.Rows[e.RowIndex].Cells["colCheck"].Value; + break; + default: + break; + } + } + + private string GetChanceGoodsList(ShopLoginInfo shop, string searchWord, List labels = null, string desc="", int page = 1, + long? cat1 = null, long? cat2 = null, decimal? price1 = null, decimal? price2 = null) + { + return PDDDBProdUserSelectForm.GetChanceGoodsList(shop, searchWord, labels, desc, page, cat1, cat2, price1, price2); + } + + private void pnlEmpty_Click(object sender, EventArgs e) + { + cmbSearchLabel.Text = "不限"; + txtSearchChance.Text = ""; + txtSearchCount.Text = "500"; + } + + private void btnGetDetail_Click(object sender, EventArgs e) + { + var shopIds = this.dgvShop.Rows.Cast().Where(r => r.Cells["colSelect"].Value.ParseToBool() == true) + .Select(r => r.Cells["colShopId"].Value.ParseToString()).ToList(); + if (shopIds.Count <= 0) + { + BaseMsgForm.ShowError("请选择店铺"); + return; + } + + ConcurrentList rowLst = new ConcurrentList(); + rowLst.AddRange(dgvChanceProduct.Rows.Cast().Where(r => r.Cells["colCheck"].Value.ParseToBool() == true)); + this.statusBar.pgbTaskProgress.Maximum = rowLst.Count; + this.statusBar.UpdateProgressBar(0); + this.pbLoading.Visible = true; + + if (cancellationTokenSource == null || cancellationTokenSource.IsCancellationRequested) + cancellationTokenSource = new CancellationTokenSource(); + + Task.Run(() => { + + + ShopLoginInfo shop = null; + int getId = 0; + foreach (DataGridViewRow row in rowLst) + { + Invoke(new Action(() => + { + this.statusBar.UpdateProgressBar(this.statusBar.pgbTaskProgress.Value + 1); + this.statusBar.lblTaskStatus.Text = "正在获取详情 " + this.statusBar.pgbTaskProgress.Value + "/" + rowLst.Count; + })); + + if (row.Cells["colCheck"].Value.ParseToBool() != true) + continue; + + var chanceId = row.Cells["colChanceId"].Value.ParseToString(); + var chanceProd = lstChanceProductResult.FirstOrDefault(c => c.chance_id == chanceId); + if (chanceProd == null || (chanceProd.dbProduct != null && !chkReGet.Checked)) + continue; + + if (cancellationTokenSource.IsCancellationRequested) + break; + + if (getId % 10 == 0) + { + shop = GetOneShop(shopIds); + while (shop == null || shop.LoginStatus != "登录成功") + { + shop = GetOneShop(shopIds); + + if (cancellationTokenSource.IsCancellationRequested) + { + shop = null; + break; + } + if (shop == null) break; + } + if (shop == null) break; + + + PDDShopLoginForm loginForm = null; + Invoke(new Action(() => + { + this.panel2.SendToBack(); + //this.panel2.BringToFront(); + loginForm = new PDDShopLoginForm(shop); + loginForm.TopLevel = false; + loginForm.openType = EnumOpenType.manage; + loginForm.WindowState = FormWindowState.Maximized; + loginForm.InitUrl = "https://mms.pinduoduo.com/goods/goods_list/chance?sourcePage=goodsListTopButton"; + loginForm.Dock = DockStyle.Fill; + this.panel2.Controls.Add(loginForm); + loginForm.Show(); + })); + Thread.Sleep(Randomx.GetId(3000, 5000)); + Invoke(new Action(() => + { + this.panel2.SendToBack(); + if (loginForm != null) + loginForm.Close(); + })); + } + else + { + Thread.Sleep(Randomx.GetId(1000, 3500)); + } + getId++; + + + var rst = get_chance_img_prod_id(shop, chanceProd.chance_id); + if (rst.Contains("操作太过频繁,请稍后再试!")) + { + Thread.Sleep(Randomx.GetId(10000, 20000)); + rst = get_chance_img_prod_id(shop, chanceProd.chance_id); + } + if (!rst.Contains("\"success\":true")) + { + var error = BaseRegex.GetStringJson(ref rst, "error_msg"); + if (string.IsNullOrEmpty(error)) + error = rst; + Invoke(new Action(() => + { + chanceProd.getProductMsg = "获取失败 " + error; + row.Cells["colMsg"].Value = chanceProd.getProductMsg; + })); + continue; + } + + var commitId = BaseRegex.GetStringJson(ref rst, "draft_id"); + var goodsId = BaseRegex.GetLongJson(ref rst, "goods_id"); + var catid = chanceProd.cat_id_3.ParseToLong() > 0 ? chanceProd.cat_id_3 : chanceProd.cat_id_2; + + //ISBN编号 定价 出版社名称 作者 书名 + List propLst = new List(); + //if (!string.IsNullOrEmpty(txtIsbn.Text.Trim())) + // propLst.Add(new goods_propertie_item() { name = "ISBN编号", values = new List() { new value_item() { value = txtIsbn.Text.Trim(), raw_value = txtIsbn.Text.Trim(), } } }); + //if (!string.IsNullOrEmpty(txtPublishers.Text.Trim())) + // propLst.Add(new goods_propertie_item() { name = "出版社名称", values = new List() { new value_item() { value = txtPublishers.Text.Trim(), raw_value = txtPublishers.Text.Trim(), } } }); + //if (!string.IsNullOrEmpty(txtAuthor.Text.Trim())) + // propLst.Add(new goods_propertie_item() { name = "作者", values = new List() { new value_item() { value = txtAuthor.Text.Trim(), raw_value = txtAuthor.Text.Trim(), } } }); + //if (!string.IsNullOrEmpty(txtPrice.Text.Trim())) + // propLst.Add(new goods_propertie_item() { name = "定价", values = new List() { new value_item() { value = txtPrice.Text.Trim(), raw_value = txtPrice.Text.Trim(), } } }); + + rst = new PDDShopBrowserObject().getPDDProductWidthEdit(shop, goodsId.ParseToString(), commitId, catid.ParseToString(), true, true, propLst); + if (rst.StartsWith("success")) + { + try + { + var dbProd = JsonHelper.DeserializeJsonToObject(rst.Substring(7)); + chanceProd.dbProduct = dbProd; + + Invoke(new Action(() => + { + chanceProd.getProductMsg = "获取成功"; + row.Cells["colMsg"].Value = chanceProd.getProductMsg; + row.Cells["colGoodsName"].Value = dbProd.product_name; + row.Cells["colCate"].Value = dbProd.cat_name; + row.Cells["colPrice"].Value = dbProd.price_text; + })); + } + catch (Exception ex) + { + + Invoke(new Action(() => + { + chanceProd.getProductMsg = "获取失败 " + ex.Message; + row.Cells["colMsg"].Value = chanceProd.getProductMsg; + })); + } + } + else + { + Invoke(new Action(() => + { + chanceProd.getProductMsg = "获取失败 " + rst; + row.Cells["colMsg"].Value = chanceProd.getProductMsg; + })); + } + + if (rowLst.IndexOf(row) % 20 == 0) + NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_chance_product_by_img_list_" + MainForm.ProcessCount, lstChanceProductResult); + } + NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_chance_product_by_img_list_" + MainForm.ProcessCount, lstChanceProductResult); + + Invoke(new Action(() => + { + this.pbLoading.Visible = false; + if (cancellationTokenSource?.IsCancellationRequested == true) + { + BaseMsgForm.ShowInfo("以图搜品详情获取停止!"); + this.statusBar.lblTaskStatus.Text = "以图搜品详情获取停止!计数 " + this.statusBar.pgbTaskProgress.Value; + } + else + { + BaseMsgForm.ShowInfo("以图搜品详情获取完毕!"); + this.statusBar.lblTaskStatus.Text = "以图搜品详情获取完毕!计数 " + this.statusBar.pgbTaskProgress.Value; + } + })); + }); + } + + private ShopLoginInfo GetOneShop(List shopIds) + { + try + { + var shopList = lstAdminShopInfo.Where(s => shopIds.Contains(s.ShopId) && s.LoginStatus == "登录成功").ToList(); + if (shopList.Count == 0) + { + Invoke(new Action(() => + { + BaseMsgForm.ShowError("没有可用的店铺,无法进行以图搜品!"); + })); + return null; + } + var shop = shopList[Randomx.GetId(shopList.Count)]; + PDDAdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + return shop; + } + catch (Exception ex) + { + return null; + } + } + + private void btnAddToDb_Click(object sender, EventArgs e) + { + ConcurrentList rowLst = new ConcurrentList(); + rowLst.AddRange(dgvChanceProduct.Rows.Cast().Where(r => r.Cells["colCheck"].Value.ParseToBool() == true)); + this.statusBar.pgbTaskProgress.Maximum = rowLst.Count; + this.statusBar.UpdateProgressBar(0); + this.pbLoading.Visible = true; + + if (cancellationTokenSource == null || cancellationTokenSource.IsCancellationRequested) + cancellationTokenSource = new CancellationTokenSource(); + + Task.Run(() => + { + foreach (var row in rowLst) + { + Invoke(new Action(() => + { + this.statusBar.UpdateProgressBar(this.statusBar.pgbTaskProgress.Value + 1); + this.statusBar.lblTaskStatus.Text = "正在入库 " + this.statusBar.pgbTaskProgress.Value + "/" + rowLst.Count; + })); + + if (cancellationTokenSource.IsCancellationRequested) + break; + + var chanceId = row.Cells["colChanceId"].Value.ParseToString(); + var chanceProd = lstChanceProductResult.FirstOrDefault(c => c.chance_id == chanceId); + if (chanceProd == null || chanceProd.dbProduct == null) + continue; + + var dbProd = chanceProd.dbProduct; + PDDProductDetailInfo prodDetail = null; + try + { + // 序列化第一组,从中获取所有价格不达标需要剔除的spec + var prodJObj = JObject.Parse(dbProd.product_json); + var skuJArr = prodJObj["detail"]["sku"] as JArray; + List specIdLst = new List(); + List specNameLst = new List(); + foreach (var skuJObj in skuJArr) + { + if (skuJObj["multi_price"].ParseToInt() < this.txtMinPrice.Text.Trim().ParseToDecimal() * 100) + { + foreach(var specJObj in skuJObj["spec"] as JArray) + { + specIdLst.Add(specJObj["spec_id"].ParseToLong()); + specNameLst.Add(specJObj["spec_name"].ParseToString()); + } + } + } + skuJArr.RemoveAll(); + + // 序列化第二组,从组中挑选符合价格条件的sku往第一组内填写 + var prodJObj2 = JObject.Parse(dbProd.product_json); + var skuJArr2 = prodJObj2["detail"]["sku"] as JArray; + foreach (var skuJObj2 in skuJArr2) + { + //var specJArr2 = skuJArr2["spec"] as JArray; + //if (specJArr2.Count > 0 && specIdLst.Contains(specJArr2[0]["spec_id"].ParseToLong())) + // continue; + //if (specJArr2.Count > 1 && specIdLst.Contains(specJArr2[1]["spec_id"].ParseToLong())) + // continue; + if (skuJObj2["multi_price"].ParseToInt() >= this.txtMinPrice.Text.Trim().ParseToDecimal() * 100) + skuJArr.Add(skuJObj2); + } + if (skuJArr.Count == 0) + { + Invoke(new Action(() => + { + row.Cells["colMsg"].Value = "商品价格低于设定,跳过"; + })); + continue; + } + + dbProd.product_json = JsonHelper.SerializeObject(prodJObj); + prodDetail = JsonHelper.DeserializeJsonToObject(dbProd.product_json).detail; + } + catch (Exception ex) + { + Invoke(new Action(() => + { + row.Cells["colMsg"].Value = "商品入库错误:" + ex.Message; + })); + continue; + } + + bool isExist = false; + var existUrl = BaseClass.BuildObjString("product/get_product_list"); + // 每次获取的以图搜品goods_id都不同,此处根据以图搜品的chanceId来获取库中是否存在 + string existData = UserLogin.GetSignaturex() + "&from_shop_id=" + chanceId; + string html = GetHtml.PostUtf8(existUrl, existData); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(existUrl, existData); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(existUrl, existData); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + { + Invoke(new Action(() => + { + row.Cells["colMsg"].Value = "入库失败,产品数据库连接失败"; + })); + continue; + } + else + { + if (html.Contains("\"data\":[") && !html.Contains("\"data\":[]")) + isExist = true; + } + + var url = BaseClass.BuildObjString("product/add_product"); + if (isExist) + { + if (chkOverride.Checked) + { + var oldSpuId = BaseRegex.GetLongJson(ref html, "spu_id"); + if (oldSpuId > 0) + { + // 将商品Id替换成老的商品Id + dbProd.product_json = dbProd.product_json.Replace(prodDetail.goods_id.ParseToString(), oldSpuId.ParseToString()); + prodDetail.goods_id = oldSpuId; + } + url = BaseClass.BuildObjString("product/mdy_product"); + } + else + { + Invoke(new Action(() => + { + row.Cells["colMsg"].Value = "已存在相同id商品,跳过"; + })); + continue; + } + } + + var data = Work.UserLogin.GetSignaturex() + + "&from_shop_id=" + chanceId + + "&spu_id=" + prodDetail.goods_id.ParseToString() + + "&skc_id=" + prodDetail.goods_id.ParseToString() + + "&price_text=" + prodDetail.sku.Min(s => s.multi_price).ParseToInt() * 0.01m + "-" + prodDetail.sku.Max(s => s.multi_price).ParseToInt() * 0.01m + + "&main_cat_id=" + (prodDetail.cat_ids?.FirstOrDefault(c => c != null)).ParseToString() + + "&main_cat_name=" + HttpUtility.UrlEncode((prodDetail.cats?.FirstOrDefault(c => !string.IsNullOrEmpty(c))).ParseToString(), Encoding.UTF8) + + "&cat_id=" + (prodDetail.cat_id).ParseToString() + + "&cat_name=" + HttpUtility.UrlEncode((prodDetail.cats?.LastOrDefault(c => !string.IsNullOrEmpty(c))).ParseToString(), Encoding.UTF8) + + "&ext_code=" + HttpUtility.UrlEncode(prodDetail.out_goods_sn, Encoding.UTF8) + + "&product_name=" + HttpUtility.UrlEncode(prodDetail.goods_name, Encoding.UTF8) + + "&product_json=" + HttpUtility.UrlEncode(dbProd.product_json, Encoding.UTF8) + + "&size_json=" + HttpUtility.UrlEncode(dbProd.size_json, Encoding.UTF8) + + "&main_img=" + HttpUtility.UrlEncode(dbProd.main_img, Encoding.UTF8) + + "&product_get_type=" + HttpUtility.UrlEncode("以图搜品", Encoding.UTF8); + if (dbProd.main_cat_id == "15543" || dbProd.main_cat_name == "书籍/杂志/报纸") + { + data += "&special_prod_type=" + HttpUtility.UrlEncode("书籍", Encoding.UTF8); + } + + 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")) + { + string msg = "商品采集保存失败!请检查网络连接:" + BaseRegex.GetStringJson(ref html, "msg"); + Invoke(new Action(() => + { + row.Cells["colMsg"].Value = msg; + })); + } + else + { + string msg = "商品采集保存成功!"; + Invoke(new Action(() => + { + row.Cells["colMsg"].Value = msg; + })); + } + } + + Invoke(new Action(() => + { + this.pbLoading.Visible = false; + if (cancellationTokenSource?.IsCancellationRequested == true) + { + BaseMsgForm.ShowInfo("商品入库停止!"); + this.statusBar.lblTaskStatus.Text = "商品入库停止!计数 " + this.statusBar.pgbTaskProgress.Value; + } + else + { + BaseMsgForm.ShowInfo("商品入库完毕!"); + this.statusBar.lblTaskStatus.Text = "商品入库完毕!计数 " + this.statusBar.pgbTaskProgress.Value; + } + })); + }); + } + + private void btnStop_Click(object sender, EventArgs e) + { + if (cancellationTokenSource != null) + cancellationTokenSource.Cancel(); + } + + private void btnStopStop_Click(object sender, EventArgs e) + { + if (cancellationTokenSource != null) + cancellationTokenSource.Cancel(); + pbLoading.Visible = false; + pbShopLoading.Visible = false; + } + + private void btnSelectSuccess_Click(object sender, EventArgs e) + { + foreach (DataGridViewRow row in dgvChanceProduct.Rows) + { + var chanceId = row.Cells["colChanceId"].Value.ParseToString(); + var chanceProd = lstChanceProductResult.FirstOrDefault(p => p.chance_id == chanceId); + + if (chanceProd != null && chanceProd.dbProduct != null) + { + row.Cells["colCheck"].Value = true; + } + else + { + row.Cells["colCheck"].Value = false; + } + } + } + + private void btnClear_Click(object sender, EventArgs e) + { + if(BaseMsgForm.ShowConfirm("确定清除列表数据?").DialogResult == DialogResult.OK) + { + dgvChanceProduct.Rows.Clear(); + lstChanceProductResult.Clear(); + NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_chance_product_by_img_list_" + MainForm.ProcessCount, lstChanceProductResult); + } + } + + private string get_upload_chance_img_signature(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/galerie/business/get_signature"; + string body = @"{""bucket_tag"":""mms-image-search""}"; + string refere = "https://mms.pinduoduo.com/goods/goods_list/chance/chance_list?searchTab=&imgSearchOrigin=&imgWidth=800&imgHeight=800"; + + var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + for (int i = 0; i < 5 && (result.Contains("\\u975E\\u6CD5\\u8BF7\\u6C42") || 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 PddUploadChanceImg(ShopLoginInfo shop, string imgPath, string img_signature) + { + string abc = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; + string boundaryRandom = ""; + while (boundaryRandom.Length < 16) + boundaryRandom += abc[Randomx.GetId(abc.Length)]; + string boundary = "----WebKitFormBoundary" + boundaryRandom; + string body = @"--" + boundary + @" +Content-Disposition: form-data; name=""image""; filename=""" + Path.GetFileName(imgPath) + @""" +Content-Type: image/jpeg + +" + imgPath + @" +--" + boundary + @" +Content-Disposition: form-data; name=""upload_sign"" + +" + img_signature + @" +--" + boundary + @" +Content-Disposition: form-data; name=""url_sign"" + +1 +--" + boundary + @" +Content-Disposition: form-data; name=""pic_operations"" + +{""rules"":[{""rule"":""imageView2/2/w/800/q/50""}]} +--" + boundary + @"-- +"; + Thread.Sleep(Randomx.GetId(5, 20)); + var uploadImgRst = PddUploadImg(shop, body, boundary); + return uploadImgRst; + } + + private string PddUploadImg(ShopLoginInfo shop, string _body, string boundary) + { + var anti = shop.AntiContents.LastOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + string url = "https://file.pinduoduo.com/v3/store_image"; + string body = _body; + string refere = "https://mms.pinduoduo.com/"; + var result = HttpResponseBLL.PDDPostResponseUpload(shop, url, body, refere, boundary, 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.PDDPostResponseUpload(shop, url, body, refere, boundary, anti); + } + } + return result; + } + + private string get_chance_by_img(ShopLoginInfo shop, string imgUrl) + { + 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/witcher/api/image-search-query"; + string body = @"{""url"":""" + imgUrl + @""",""scene"":""chanceGoods"",""useOriginUrl"":true}"; + string refere = "https://mms.pinduoduo.com/goods/goods_list/chance/chance_list?searchTab=&imgSearchOrigin=&imgWidth=800&imgHeight=800"; + + var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + for (int i = 0; i < 5 && (result.Contains("\\u975E\\u6CD5\\u8BF7\\u6C42") || 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; + } + + public string get_chance_img_prod_id(ShopLoginInfo shop, string chance_id) + { + 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/witcher/api/image-search-release"; + string body = @"{""trick_id"":""" + chance_id + @""",""scene"":""mmsChanceGoods"",""source"":3}"; + string refere = "https://mms.pinduoduo.com/goods/goods_list/chance/chance_list?searchTab=&imgSearchOrigin=&imgWidth=800&imgHeight=800"; + + var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + for (int i = 0; i < 5 && (result.Contains("\\u975E\\u6CD5\\u8BF7\\u6C42") || 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; + } + } +} diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDFissionProdByChanceImgForm.resx b/TEMUKJD/PDDForms/ProductSelectForms/PDDFissionProdByChanceImgForm.resx new file mode 100644 index 0000000..ce08b3e --- /dev/null +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDFissionProdByChanceImgForm.resx @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs index 44186d6..6abee15 100644 --- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs @@ -1779,7 +1779,7 @@ namespace TemuKJD.WXForms.ProductForms #region 设置货号 var extCode = dbProd.ext_code.IsNullOrEmpty() ? prodInfo.detail.out_goods_sn : dbProd.ext_code; - if (extCode.IsNullOrEmpty()) + if (extCode.IsNullOrEmpty() || extCode.Length < 4) { //extCode = "EC" + Randomx.GetId(1000).ToString().PadLeft(3, '0') + dbProd.spu_id + "C"; extCode = "EC1" + dbProd.spu_id + "A"; diff --git a/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.Designer.cs index 8fe73a0..fa314c7 100644 --- a/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.Designer.cs +++ b/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.Designer.cs @@ -420,7 +420,7 @@ namespace TemuKJD.WXForms.ProductForms this.cmbCat3.DropDownWidth = 1; this.cmbCat3.FormattingEnabled = true; this.cmbCat3.IntegralHeight = false; - this.cmbCat3.Location = new System.Drawing.Point(718, 5); + this.cmbCat3.Location = new System.Drawing.Point(718, 7); this.cmbCat3.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat3.Name = "cmbCat3"; this.cmbCat3.Size = new System.Drawing.Size(146, 25); @@ -448,7 +448,7 @@ namespace TemuKJD.WXForms.ProductForms this.cmbCat2.DropDownWidth = 1; this.cmbCat2.FormattingEnabled = true; this.cmbCat2.IntegralHeight = false; - this.cmbCat2.Location = new System.Drawing.Point(515, 5); + this.cmbCat2.Location = new System.Drawing.Point(515, 7); this.cmbCat2.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat2.Name = "cmbCat2"; this.cmbCat2.Size = new System.Drawing.Size(146, 25); @@ -476,7 +476,7 @@ namespace TemuKJD.WXForms.ProductForms this.cmbCat1.DropDownWidth = 1; this.cmbCat1.FormattingEnabled = true; this.cmbCat1.IntegralHeight = false; - this.cmbCat1.Location = new System.Drawing.Point(293, 7); + this.cmbCat1.Location = new System.Drawing.Point(293, 5); this.cmbCat1.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat1.Name = "cmbCat1"; this.cmbCat1.Size = new System.Drawing.Size(146, 25); @@ -536,7 +536,7 @@ namespace TemuKJD.WXForms.ProductForms "安全+未校验", "安全商品", "未校验"}); - this.cmbWxSafe.Location = new System.Drawing.Point(71, 42); + this.cmbWxSafe.Location = new System.Drawing.Point(71, 40); this.cmbWxSafe.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbWxSafe.Name = "cmbWxSafe"; this.cmbWxSafe.Size = new System.Drawing.Size(146, 25); @@ -559,7 +559,7 @@ namespace TemuKJD.WXForms.ProductForms // this.cmbGroupFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.cmbGroupFilter.FormattingEnabled = true; - this.cmbGroupFilter.Location = new System.Drawing.Point(938, 5); + this.cmbGroupFilter.Location = new System.Drawing.Point(938, 7); this.cmbGroupFilter.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbGroupFilter.Name = "cmbGroupFilter"; this.cmbGroupFilter.Size = new System.Drawing.Size(146, 25); @@ -580,7 +580,7 @@ namespace TemuKJD.WXForms.ProductForms "机会商品", "以图搜品", "外部数据"}); - this.cmbSourceType.Location = new System.Drawing.Point(718, 40); + this.cmbSourceType.Location = new System.Drawing.Point(718, 42); this.cmbSourceType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbSourceType.Name = "cmbSourceType"; this.cmbSourceType.Size = new System.Drawing.Size(146, 25); @@ -610,7 +610,7 @@ namespace TemuKJD.WXForms.ProductForms "", "是", "否"}); - this.cmbRelation.Location = new System.Drawing.Point(938, 40); + this.cmbRelation.Location = new System.Drawing.Point(938, 42); this.cmbRelation.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbRelation.Name = "cmbRelation"; this.cmbRelation.Size = new System.Drawing.Size(146, 25);