云收藏 增加AI检测图片
This commit is contained in:
1 parent
b28940c02d
commit
b54a5f5310
36 files changed
+1978
-523
No files matched your search
@@ -12,7 +12,7 @@ namespace TemuKJD.BLL.ImportConverts
|
||||
{
|
||||
public class ConverterToPddFactory
|
||||
{
|
||||
private static List<IGoodsConverter> _converters = new List<IGoodsConverter>
|
||||
private static List<IGoodsConverter> CreateConverters() => new List<IGoodsConverter>
|
||||
{
|
||||
new ConverterToPddV5(),
|
||||
new ConverterWXToPddV1(),
|
||||
@@ -24,7 +24,7 @@ namespace TemuKJD.BLL.ImportConverts
|
||||
public static PDDFrontProductInfo5 Convert(string filePath)
|
||||
{
|
||||
|
||||
foreach (IGoodsConverter item in _converters)
|
||||
foreach (IGoodsConverter item in CreateConverters())
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -47,7 +47,7 @@ namespace TemuKJD.BLL.ImportConverts
|
||||
public static PDDFrontProductInfo5 SetContentConvert(string content)
|
||||
{
|
||||
|
||||
foreach (IGoodsConverter item in _converters)
|
||||
foreach (IGoodsConverter item in CreateConverters())
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
|
||||
namespace TemuKJD.BLL.ImportConverters
|
||||
{
|
||||
|
||||
+5
-2
@@ -68,10 +68,10 @@
|
||||
<ProjectReference Include="..\Work\Work.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="PDDForms\ProductSelectForms\CloudGoodsFavoriteForm.cs">
|
||||
<Compile Update="WXForms\ProductForms\CloudGoodsFavoriteForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PDDForms\ProductSelectForms\CloudGoodsForm.cs">
|
||||
<Compile Update="WXForms\ProductForms\CloudGoodsForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
@@ -86,4 +86,7 @@
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Remove="BLL\PDDProdFormConverter.cs;BLL\ImportConverters\*.cs" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -44,6 +44,9 @@
|
||||
<Compile Update="InitForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="KJDForms\SystemForms\SystemGoodsComplianceForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="KJDForms\SystemForms\SystemViolationDetectionForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -65,6 +68,9 @@
|
||||
<Compile Update="PDDForms\ProductSelectForms\PDDDBProdGroupManageFrom.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="UserComponent\UcNumericRange.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Update="WXForms\AdminForms\WXAdminOemWithdrawal.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
||||
+3
-1
@@ -30,8 +30,9 @@
|
||||
{
|
||||
System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("解除限制");
|
||||
System.Windows.Forms.TreeNode violationNode = new System.Windows.Forms.TreeNode("违规检测");
|
||||
System.Windows.Forms.TreeNode complianceNode = new System.Windows.Forms.TreeNode("商品 AI 检测");
|
||||
System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("系统设置", new System.Windows.Forms.TreeNode[] {
|
||||
treeNode1, violationNode});
|
||||
treeNode1, violationNode, complianceNode});
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
@@ -104,6 +105,7 @@
|
||||
this.tv.Name = "tv";
|
||||
treeNode1.Name = "解除限制";
|
||||
treeNode1.Text = "解除限制";
|
||||
complianceNode.Name = "商品 AI 检测";
|
||||
violationNode.Name = "违规检测";
|
||||
violationNode.Text = "违规检测";
|
||||
treeNode2.Name = "系统设置";
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace TemuKJD.KJDForms.SystemForms
|
||||
{
|
||||
public Lazy<SystemRemoveRestrictionsForm> systemRemoveRestrictionsForm = new Lazy<SystemRemoveRestrictionsForm>();
|
||||
public Lazy<SystemViolationDetectionForm> systemViolationDetectionForm = new Lazy<SystemViolationDetectionForm>();
|
||||
private readonly Lazy<SystemGoodsComplianceForm> goodsComplianceForm = new Lazy<SystemGoodsComplianceForm>();
|
||||
|
||||
public SystemForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -47,6 +49,9 @@ namespace TemuKJD.KJDForms.SystemForms
|
||||
case "解除限制":
|
||||
SetForm(systemRemoveRestrictionsForm.Value);
|
||||
break;
|
||||
case "商品 AI 检测":
|
||||
SetForm(goodsComplianceForm.Value);
|
||||
break;
|
||||
case "违规检测":
|
||||
SetForm(systemViolationDetectionForm.Value);
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,186 @@
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TemuKJD.KJDForms.SystemForms
|
||||
{
|
||||
partial class SystemGoodsComplianceForm
|
||||
{
|
||||
private GroupBox imagesGroup;
|
||||
private Label mainLabel;
|
||||
private ComboBox main;
|
||||
private NumericUpDown mainCount;
|
||||
private Label mainUnit;
|
||||
private Label detailLabel;
|
||||
private ComboBox detail;
|
||||
private NumericUpDown detailCount;
|
||||
private Label detailUnit;
|
||||
private CheckBox sku;
|
||||
private GroupBox keywordsGroup;
|
||||
private TextBox keywords;
|
||||
private Label keywordsHint;
|
||||
private Button btnSaveDetection;
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.imagesGroup = new GroupBox();
|
||||
this.mainLabel = new Label();
|
||||
this.main = new ComboBox();
|
||||
this.mainCount = new NumericUpDown();
|
||||
this.mainUnit = new Label();
|
||||
this.detailLabel = new Label();
|
||||
this.detail = new ComboBox();
|
||||
this.detailCount = new NumericUpDown();
|
||||
this.detailUnit = new Label();
|
||||
this.sku = new CheckBox();
|
||||
this.keywordsGroup = new GroupBox();
|
||||
this.keywords = new TextBox();
|
||||
this.keywordsHint = new Label();
|
||||
this.btnSaveDetection = new Button();
|
||||
this.imagesGroup.SuspendLayout();
|
||||
this.keywordsGroup.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.mainCount)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.detailCount)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
|
||||
this.imagesGroup.Name = "imagesGroup";
|
||||
this.imagesGroup.Location = new Point(20, 16);
|
||||
this.imagesGroup.TabIndex = 0;
|
||||
this.imagesGroup.Size = new Size(760, 153);
|
||||
this.imagesGroup.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
this.imagesGroup.Text = "检测图片";
|
||||
this.imagesGroup.Controls.Add(this.mainLabel);
|
||||
this.imagesGroup.Controls.Add(this.main);
|
||||
this.imagesGroup.Controls.Add(this.mainCount);
|
||||
this.imagesGroup.Controls.Add(this.mainUnit);
|
||||
this.imagesGroup.Controls.Add(this.detailLabel);
|
||||
this.imagesGroup.Controls.Add(this.detail);
|
||||
this.imagesGroup.Controls.Add(this.detailCount);
|
||||
this.imagesGroup.Controls.Add(this.detailUnit);
|
||||
this.imagesGroup.Controls.Add(this.sku);
|
||||
|
||||
this.mainLabel.Name = "mainLabel";
|
||||
this.mainLabel.Location = new Point(16, 34);
|
||||
this.mainLabel.TabIndex = 0;
|
||||
this.mainLabel.AutoSize = true;
|
||||
this.mainLabel.Text = "商品主图";
|
||||
|
||||
this.main.Name = "main";
|
||||
this.main.Location = new Point(106, 30);
|
||||
this.main.TabIndex = 1;
|
||||
this.main.Width = 110;
|
||||
this.main.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
this.main.Items.AddRange(new object[] { "全部", "前几张" });
|
||||
this.main.SelectedIndexChanged += new System.EventHandler(this.ImageRangeChanged);
|
||||
|
||||
this.mainCount.Name = "mainCount";
|
||||
this.mainCount.Location = new Point(228, 30);
|
||||
this.mainCount.TabIndex = 2;
|
||||
this.mainCount.Enabled = false;
|
||||
this.mainCount.Minimum = 1M;
|
||||
this.mainCount.Maximum = 999M;
|
||||
this.mainCount.Value = 1M;
|
||||
this.mainCount.Width = 60;
|
||||
this.mainCount.AccessibleName = "商品主图检测张数";
|
||||
|
||||
this.mainUnit.Name = "mainUnit";
|
||||
this.mainUnit.Location = new Point(294, 34);
|
||||
this.mainUnit.TabIndex = 3;
|
||||
this.mainUnit.AutoSize = true;
|
||||
this.mainUnit.Text = "张";
|
||||
|
||||
this.detailLabel.Name = "detailLabel";
|
||||
this.detailLabel.Location = new Point(16, 72);
|
||||
this.detailLabel.TabIndex = 4;
|
||||
this.detailLabel.AutoSize = true;
|
||||
this.detailLabel.Text = "详情图";
|
||||
|
||||
this.detail.Name = "detail";
|
||||
this.detail.Location = new Point(106, 68);
|
||||
this.detail.TabIndex = 5;
|
||||
this.detail.Width = 110;
|
||||
this.detail.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
this.detail.Items.AddRange(new object[] { "不检测", "前几张", "全部" });
|
||||
this.detail.SelectedIndexChanged += new System.EventHandler(this.ImageRangeChanged);
|
||||
|
||||
this.detailCount.Name = "detailCount";
|
||||
this.detailCount.Location = new Point(228, 68);
|
||||
this.detailCount.TabIndex = 6;
|
||||
this.detailCount.Enabled = false;
|
||||
this.detailCount.Minimum = 1M;
|
||||
this.detailCount.Maximum = 999M;
|
||||
this.detailCount.Value = 1M;
|
||||
this.detailCount.Width = 60;
|
||||
this.detailCount.AccessibleName = "详情图检测张数";
|
||||
|
||||
this.detailUnit.Name = "detailUnit";
|
||||
this.detailUnit.Location = new Point(294, 72);
|
||||
this.detailUnit.TabIndex = 7;
|
||||
this.detailUnit.AutoSize = true;
|
||||
this.detailUnit.Text = "张";
|
||||
|
||||
this.sku.Name = "sku";
|
||||
this.sku.Location = new Point(106, 112);
|
||||
this.sku.TabIndex = 8;
|
||||
this.sku.AutoSize = true;
|
||||
this.sku.Text = "检测 SKU 图片";
|
||||
|
||||
this.keywordsGroup.Name = "keywordsGroup";
|
||||
this.keywordsGroup.Location = new Point(20, 183);
|
||||
this.keywordsGroup.TabIndex = 1;
|
||||
this.keywordsGroup.Size = new Size(760, 143);
|
||||
this.keywordsGroup.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
this.keywordsGroup.Text = "检测关键词";
|
||||
this.keywordsGroup.Controls.Add(this.keywords);
|
||||
this.keywordsGroup.Controls.Add(this.keywordsHint);
|
||||
|
||||
this.keywords.Name = "keywords";
|
||||
this.keywords.Location = new Point(16, 27);
|
||||
this.keywords.TabIndex = 0;
|
||||
this.keywords.Size = new Size(728, 68);
|
||||
this.keywords.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
this.keywords.Multiline = true;
|
||||
this.keywords.AcceptsReturn = true;
|
||||
this.keywords.ScrollBars = ScrollBars.Vertical;
|
||||
this.keywords.AccessibleName = "检测关键词";
|
||||
|
||||
this.keywordsHint.Name = "keywordsHint";
|
||||
this.keywordsHint.Location = new Point(16, 105);
|
||||
this.keywordsHint.TabIndex = 1;
|
||||
this.keywordsHint.AutoSize = true;
|
||||
this.keywordsHint.ForeColor = SystemColors.GrayText;
|
||||
this.keywordsHint.Text = "多个关键词可用逗号、分号、空格或换行分隔。";
|
||||
|
||||
this.btnSaveDetection.Name = "btnSaveDetection";
|
||||
this.btnSaveDetection.Location = new Point(20, 341);
|
||||
this.btnSaveDetection.TabIndex = 2;
|
||||
this.btnSaveDetection.Size = new Size(96, 32);
|
||||
this.btnSaveDetection.Text = "保存条件";
|
||||
this.btnSaveDetection.BackColor = Color.FromArgb(63, 126, 255);
|
||||
this.btnSaveDetection.ForeColor = Color.White;
|
||||
this.btnSaveDetection.FlatStyle = FlatStyle.Flat;
|
||||
this.btnSaveDetection.UseVisualStyleBackColor = false;
|
||||
this.btnSaveDetection.Cursor = Cursors.Hand;
|
||||
this.btnSaveDetection.FlatAppearance.BorderSize = 0;
|
||||
this.btnSaveDetection.Click += new System.EventHandler(this.SaveDetectionClick);
|
||||
|
||||
this.AutoScaleMode = AutoScaleMode.None;
|
||||
this.AutoScroll = true;
|
||||
this.AutoScrollMinSize = new Size(365, 390);
|
||||
this.BackColor = Color.White;
|
||||
this.ClientSize = new Size(800, 450);
|
||||
this.Font = new Font("微软雅黑", 9F);
|
||||
this.Controls.Add(this.imagesGroup);
|
||||
this.Controls.Add(this.keywordsGroup);
|
||||
this.Controls.Add(this.btnSaveDetection);
|
||||
this.Name = "SystemGoodsComplianceForm";
|
||||
this.Text = "商品 AI 检测";
|
||||
this.imagesGroup.ResumeLayout(false);
|
||||
this.imagesGroup.PerformLayout();
|
||||
this.keywordsGroup.ResumeLayout(false);
|
||||
this.keywordsGroup.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.mainCount)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.detailCount)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Work.Services;
|
||||
using AllBase.Helper;
|
||||
using TemuKJD.BaseForms;
|
||||
|
||||
namespace TemuKJD.KJDForms.SystemForms
|
||||
{
|
||||
public partial class SystemGoodsComplianceForm : BaseForm
|
||||
{
|
||||
public SystemGoodsComplianceForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
VisibleChanged += (sender, e) => { if (Visible) LoadSettings(); };
|
||||
LoadSettings();
|
||||
}
|
||||
|
||||
private void LoadSettings()
|
||||
{
|
||||
var options = GlobalConfig.GlobalSettings.GoodsCompliance ?? new ComplianceOptions();
|
||||
main.SelectedIndex = options.MainCount.HasValue ? 1 : 0;
|
||||
detail.SelectedIndex = options.DetailCount == null ? 2 : options.DetailCount == 0 ? 0 : 1;
|
||||
mainCount.Value = Math.Min(mainCount.Maximum, Math.Max(1, options.MainCount ?? 1));
|
||||
detailCount.Value = Math.Min(detailCount.Maximum, Math.Max(1, options.DetailCount ?? 1));
|
||||
sku.Checked = options.IncludeSku;
|
||||
keywords.Text = options.Keywords;
|
||||
}
|
||||
|
||||
private void ImageRangeChanged(object sender, EventArgs e)
|
||||
{
|
||||
mainCount.Enabled = main.SelectedIndex == 1;
|
||||
detailCount.Enabled = detail.SelectedIndex == 1;
|
||||
}
|
||||
|
||||
private void SaveDetectionClick(object sender, EventArgs e)
|
||||
{
|
||||
if (GoodsComplianceService.Keywords(keywords.Text).Length == 0)
|
||||
{
|
||||
MessageBox.Show(this, "请输入检测关键词。");
|
||||
keywords.Focus();
|
||||
return;
|
||||
}
|
||||
var settings = GlobalConfig.GlobalSettings;
|
||||
var previous = settings.GoodsCompliance;
|
||||
settings.GoodsCompliance = new ComplianceOptions
|
||||
{
|
||||
MainCount = main.SelectedIndex == 0 ? (int?)null : (int)mainCount.Value,
|
||||
DetailCount = detail.SelectedIndex == 2 ? (int?)null : detail.SelectedIndex == 0 ? 0 : (int)detailCount.Value,
|
||||
IncludeSku = sku.Checked,
|
||||
Keywords = keywords.Text.Trim()
|
||||
};
|
||||
try { StartUp.SaveGlobalSettings(); }
|
||||
catch (Exception ex)
|
||||
{
|
||||
settings.GoodsCompliance = previous;
|
||||
MessageBox.Show(this, "保存检测条件失败:" + ex.Message);
|
||||
return;
|
||||
}
|
||||
MessageBox.Show(this, "已保存 AI 检测条件。");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using TemuKJD.BaseForms;
|
||||
using TemuKJD.WXForms.ProductForms;
|
||||
using AllBase;
|
||||
using TemuKJD.PDDForms.ProductSelectForms;
|
||||
using TemuKJD.PDDForms.ProductForms.CouponForms;
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TemuKJD.UserComponent
|
||||
{
|
||||
[DefaultEvent(nameof(ValueChanged))]
|
||||
public class UcNumericRange : UserControl
|
||||
{
|
||||
private const decimal DefaultMaximum = 1000000m;
|
||||
private const int NormalWidth = 220;
|
||||
private const int CompactWidth = 112;
|
||||
private readonly Label separator = new Label { Text = "至", AutoSize = true, Anchor = AnchorStyles.None };
|
||||
private readonly NumericUpDown lower = CreateEditor("起始值");
|
||||
private readonly NumericUpDown upper = CreateEditor("结束值");
|
||||
private bool updating;
|
||||
|
||||
public UcNumericRange()
|
||||
{
|
||||
upper.Value = DefaultMaximum;
|
||||
var layout = new TableLayoutPanel { Dock = DockStyle.Fill, ColumnCount = 3, RowCount = 1 };
|
||||
layout.RowStyles.Add(new RowStyle(SizeType.Percent, 100));
|
||||
layout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50));
|
||||
layout.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize));
|
||||
layout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50));
|
||||
layout.Controls.Add(CreateCell(lower), 0, 0);
|
||||
layout.Controls.Add(separator, 1, 0);
|
||||
layout.Controls.Add(CreateCell(upper), 2, 0);
|
||||
Controls.Add(layout);
|
||||
Size = new Size(NormalWidth, lower.PreferredHeight + 2);
|
||||
lower.ValueChanged += (s, e) => UpdateRange(lower, upper);
|
||||
upper.ValueChanged += (s, e) => UpdateRange(upper, lower);
|
||||
}
|
||||
|
||||
[Description("两个数值之间显示的文字。"), DefaultValue("至")]
|
||||
public string SeparatorText
|
||||
{
|
||||
get => separator.Text;
|
||||
set => separator.Text = value;
|
||||
}
|
||||
|
||||
[Description("使用窄布局并隐藏微调按钮,仍可用方向键调整数值。"), DefaultValue(false)]
|
||||
public bool Compact
|
||||
{
|
||||
get => separator.Margin == Padding.Empty;
|
||||
set
|
||||
{
|
||||
if (value == Compact) return;
|
||||
separator.Margin = value ? Padding.Empty : new Padding(3, 0, 3, 0);
|
||||
SetCompactBorder(lower, value);
|
||||
SetCompactBorder(upper, value);
|
||||
if (Dock == DockStyle.None && Width == (value ? NormalWidth : CompactWidth))
|
||||
Width = value ? CompactWidth : NormalWidth;
|
||||
}
|
||||
}
|
||||
|
||||
private static void SetCompactBorder(NumericUpDown editor, bool compact)
|
||||
{
|
||||
var cell = (Panel)editor.Parent;
|
||||
editor.BorderStyle = compact ? BorderStyle.None : BorderStyle.Fixed3D;
|
||||
cell.BorderStyle = compact ? BorderStyle.FixedSingle : BorderStyle.None;
|
||||
cell.BackColor = compact ? editor.BackColor : Color.Empty;
|
||||
cell.PerformLayout();
|
||||
}
|
||||
|
||||
private Panel CreateCell(NumericUpDown editor)
|
||||
{
|
||||
var cell = new Panel { Dock = DockStyle.Fill, Margin = Padding.Empty };
|
||||
cell.Controls.Add(editor);
|
||||
var buttons = editor.Controls[0] is TextBox ? editor.Controls[1] : editor.Controls[0];
|
||||
// 紧凑模式将右侧按钮移出可见区域,保留原生数字输入和键盘操作。
|
||||
cell.Layout += (s, e) =>
|
||||
{
|
||||
int clippedWidth = Compact ? editor.Width - buttons.Left : 0;
|
||||
editor.Width = cell.ClientSize.Width + clippedWidth;
|
||||
editor.Top = Compact ? Math.Max(0, (cell.ClientSize.Height - editor.Height) / 2) : 0;
|
||||
};
|
||||
return cell;
|
||||
}
|
||||
|
||||
private static NumericUpDown CreateEditor(string name)
|
||||
{
|
||||
return new NumericUpDown { AccessibleName = name, Margin = Padding.Empty, Maximum = DefaultMaximum };
|
||||
}
|
||||
|
||||
[Description("允许输入的最小值。"), DefaultValue(typeof(decimal), "0")]
|
||||
public decimal Minimum
|
||||
{
|
||||
get => lower.Minimum;
|
||||
set => SetLimits(value, Math.Max(value, Maximum));
|
||||
}
|
||||
|
||||
[Description("允许输入的最大值。"), DefaultValue(typeof(decimal), "1000000")]
|
||||
public decimal Maximum
|
||||
{
|
||||
get => lower.Maximum;
|
||||
set => SetLimits(Math.Min(value, Minimum), value);
|
||||
}
|
||||
|
||||
[Description("选中范围的起始值。"), DefaultValue(typeof(decimal), "0")]
|
||||
public decimal LowerValue
|
||||
{
|
||||
get => lower.Value;
|
||||
set => lower.Value = value;
|
||||
}
|
||||
|
||||
[Description("选中范围的结束值。"), DefaultValue(typeof(decimal), "1000000")]
|
||||
public decimal UpperValue
|
||||
{
|
||||
get => upper.Value;
|
||||
set => upper.Value = value;
|
||||
}
|
||||
|
||||
[Description("数字输入框显示的小数位数。"), DefaultValue(0)]
|
||||
public int DecimalPlaces
|
||||
{
|
||||
get => lower.DecimalPlaces;
|
||||
set
|
||||
{
|
||||
if (value < 0 || value > 28) throw new ArgumentOutOfRangeException(nameof(value));
|
||||
lower.DecimalPlaces = upper.DecimalPlaces = value;
|
||||
decimal increment = 1m;
|
||||
for (int i = 0; i < value; i++)
|
||||
increment /= 10m;
|
||||
lower.Increment = upper.Increment = increment;
|
||||
}
|
||||
}
|
||||
|
||||
public event EventHandler ValueChanged;
|
||||
|
||||
private void SetLimits(decimal minimum, decimal maximum)
|
||||
{
|
||||
decimal oldLower = LowerValue, oldUpper = UpperValue;
|
||||
updating = true;
|
||||
try
|
||||
{
|
||||
lower.Minimum = upper.Minimum = minimum;
|
||||
lower.Maximum = upper.Maximum = maximum;
|
||||
}
|
||||
finally { updating = false; }
|
||||
if (LowerValue != oldLower || UpperValue != oldUpper)
|
||||
ValueChanged?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void UpdateRange(NumericUpDown edited, NumericUpDown other)
|
||||
{
|
||||
if (updating) return;
|
||||
updating = true;
|
||||
try
|
||||
{
|
||||
if (LowerValue > UpperValue)
|
||||
other.Value = edited.Value;
|
||||
}
|
||||
finally { updating = false; }
|
||||
ValueChanged?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -288,28 +288,28 @@ namespace TemuKJD.UserForm
|
||||
|
||||
|
||||
|
||||
_ = Task.Run(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
StoreApiClient.Instance.Auth.Login(new LoginRequest
|
||||
{
|
||||
UserName = BaseClass.UserName,
|
||||
Password = BaseClass.PassWord
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
try
|
||||
{
|
||||
LogSave.AddFile("Store API 登录失败:" + ex.Message);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// 日志失败也不能影响主程序。
|
||||
}
|
||||
}
|
||||
});
|
||||
//_ = Task.Run(() =>
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// StoreApiClient.Instance.Auth.Login(new LoginRequest
|
||||
// {
|
||||
// UserName = BaseClass.UserName,
|
||||
// Password = BaseClass.PassWord
|
||||
// });
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// LogSave.AddFile("Store API 登录失败:" + ex.Message);
|
||||
// }
|
||||
// catch
|
||||
// {
|
||||
// // 日志失败也不能影响主程序。
|
||||
// }
|
||||
// }
|
||||
//});
|
||||
|
||||
Hide();
|
||||
mf.Hide();
|
||||
|
||||
+220
-157
@@ -1,5 +1,5 @@
|
||||
|
||||
namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
namespace TemuKJD.WXForms.ProductForms
|
||||
{
|
||||
partial class CloudGoodsFavoriteForm
|
||||
{
|
||||
@@ -29,25 +29,25 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.cb_safe = new System.Windows.Forms.ComboBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.num_price = new TemuKJD.UserComponent.UcNumericRange();
|
||||
this.num_sold = new TemuKJD.UserComponent.UcNumericRange();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.btnSafeDetection = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btn_removefavorite = new DevComponents.DotNetBar.PanelEx();
|
||||
this.bt_importUploadList = new DevComponents.DotNetBar.PanelEx();
|
||||
this.label5r = new System.Windows.Forms.Label();
|
||||
this.cb_Platform = new System.Windows.Forms.ComboBox();
|
||||
this.cb_Platformr = new System.Windows.Forms.ComboBox();
|
||||
this.cmbCatSelect2 = new System.Windows.Forms.ComboBox();
|
||||
this.cmbCatSelect1 = new System.Windows.Forms.ComboBox();
|
||||
this.cmbCatSelect4 = new System.Windows.Forms.ComboBox();
|
||||
this.cmbCatSelect3 = new System.Windows.Forms.ComboBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.num_maxprice = new System.Windows.Forms.NumericUpDown();
|
||||
this.num_minprice = new System.Windows.Forms.NumericUpDown();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.num_maxsold = new System.Windows.Forms.NumericUpDown();
|
||||
this.num_minsold = new System.Windows.Forms.NumericUpDown();
|
||||
this.txt_title = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
@@ -57,6 +57,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.pbLoading = new System.Windows.Forms.PictureBox();
|
||||
this.dgvData = new TemuKJD.UserComponent.DataGridViewEx();
|
||||
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
|
||||
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
|
||||
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
|
||||
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.c_Platform = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Column1 = new System.Windows.Forms.DataGridViewImageColumn();
|
||||
@@ -64,23 +67,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
|
||||
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
|
||||
this.colDetectionResult = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.num_maxprice)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.num_minprice)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.num_maxsold)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.num_minsold)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
|
||||
this.splitContainer2.Panel1.SuspendLayout();
|
||||
this.splitContainer2.Panel2.SuspendLayout();
|
||||
this.splitContainer2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvData)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
@@ -94,20 +93,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.cb_safe);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.label4);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.num_price);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.num_sold);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.panel1);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.label5r);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.cb_Platform);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.cb_Platformr);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.cmbCatSelect2);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.cmbCatSelect1);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.cmbCatSelect4);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.cmbCatSelect3);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.label4);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.num_maxprice);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.num_minprice);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.label7);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.label3);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.num_maxsold);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.num_minsold);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.txt_title);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.label1);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.label6);
|
||||
@@ -119,26 +117,133 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
|
||||
this.splitContainer1.Panel2.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1643, 530);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1719, 530);
|
||||
this.splitContainer1.TabIndex = 35;
|
||||
//
|
||||
// cb_safe
|
||||
//
|
||||
this.cb_safe.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cb_safe.DropDownWidth = 150;
|
||||
this.cb_safe.FormattingEnabled = true;
|
||||
this.cb_safe.Items.AddRange(new object[] {
|
||||
"全部",
|
||||
"安全",
|
||||
"违规",
|
||||
"未检测"});
|
||||
this.cb_safe.Location = new System.Drawing.Point(1141, 13);
|
||||
this.cb_safe.Name = "cb_safe";
|
||||
this.cb_safe.Size = new System.Drawing.Size(97, 25);
|
||||
this.cb_safe.TabIndex = 930;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(1104, 17);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(44, 17);
|
||||
this.label4.TabIndex = 929;
|
||||
this.label4.Text = "检测:";
|
||||
//
|
||||
// num_price
|
||||
//
|
||||
this.num_price.Compact = true;
|
||||
this.num_price.Location = new System.Drawing.Point(391, 15);
|
||||
this.num_price.LowerValue = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.num_price.Maximum = new decimal(new int[] {
|
||||
9999999,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.num_price.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.num_price.Name = "num_price";
|
||||
this.num_price.SeparatorText = "";
|
||||
this.num_price.Size = new System.Drawing.Size(108, 23);
|
||||
this.num_price.TabIndex = 922;
|
||||
this.num_price.UpperValue = new decimal(new int[] {
|
||||
9999999,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
//
|
||||
// num_sold
|
||||
//
|
||||
this.num_sold.Compact = true;
|
||||
this.num_sold.Location = new System.Drawing.Point(218, 15);
|
||||
this.num_sold.LowerValue = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.num_sold.Maximum = new decimal(new int[] {
|
||||
9999999,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.num_sold.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.num_sold.Name = "num_sold";
|
||||
this.num_sold.SeparatorText = "";
|
||||
this.num_sold.Size = new System.Drawing.Size(108, 23);
|
||||
this.num_sold.TabIndex = 921;
|
||||
this.num_sold.UpperValue = new decimal(new int[] {
|
||||
9999999,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.btnSafeDetection);
|
||||
this.panel1.Controls.Add(this.btn_removefavorite);
|
||||
this.panel1.Controls.Add(this.bt_importUploadList);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.panel1.Location = new System.Drawing.Point(1507, 0);
|
||||
this.panel1.Location = new System.Drawing.Point(1509, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(136, 50);
|
||||
this.panel1.Size = new System.Drawing.Size(210, 50);
|
||||
this.panel1.TabIndex = 914;
|
||||
//
|
||||
// btnSafeDetection
|
||||
//
|
||||
this.btnSafeDetection.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnSafeDetection.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnSafeDetection.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnSafeDetection.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnSafeDetection.Location = new System.Drawing.Point(132, 14);
|
||||
this.btnSafeDetection.Name = "btnSafeDetection";
|
||||
this.btnSafeDetection.Size = new System.Drawing.Size(58, 23);
|
||||
this.btnSafeDetection.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnSafeDetection.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnSafeDetection.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnSafeDetection.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnSafeDetection.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnSafeDetection.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnSafeDetection.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnSafeDetection.Style.GradientAngle = 90;
|
||||
this.btnSafeDetection.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnSafeDetection.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnSafeDetection.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnSafeDetection.TabIndex = 451;
|
||||
this.btnSafeDetection.Text = "AI检测";
|
||||
this.btnSafeDetection.Click += new System.EventHandler(this.btnSafeDetection_Click);
|
||||
//
|
||||
// btn_removefavorite
|
||||
//
|
||||
this.btn_removefavorite.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btn_removefavorite.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btn_removefavorite.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btn_removefavorite.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btn_removefavorite.Location = new System.Drawing.Point(67, 14);
|
||||
this.btn_removefavorite.Location = new System.Drawing.Point(68, 14);
|
||||
this.btn_removefavorite.Name = "btn_removefavorite";
|
||||
this.btn_removefavorite.Size = new System.Drawing.Size(58, 23);
|
||||
this.btn_removefavorite.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
@@ -183,31 +288,31 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
// label5r
|
||||
//
|
||||
this.label5r.AutoSize = true;
|
||||
this.label5r.Location = new System.Drawing.Point(1048, 16);
|
||||
this.label5r.Location = new System.Drawing.Point(942, 16);
|
||||
this.label5r.Name = "label5r";
|
||||
this.label5r.Size = new System.Drawing.Size(44, 17);
|
||||
this.label5r.TabIndex = 907;
|
||||
this.label5r.Text = "来源:";
|
||||
//
|
||||
// cb_Platform
|
||||
// cb_Platformr
|
||||
//
|
||||
this.cb_Platform.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cb_Platform.DropDownWidth = 150;
|
||||
this.cb_Platform.FormattingEnabled = true;
|
||||
this.cb_Platform.Items.AddRange(new object[] {
|
||||
this.cb_Platformr.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cb_Platformr.DropDownWidth = 150;
|
||||
this.cb_Platformr.FormattingEnabled = true;
|
||||
this.cb_Platformr.Items.AddRange(new object[] {
|
||||
"全部",
|
||||
"多多",
|
||||
"微信"});
|
||||
this.cb_Platform.Location = new System.Drawing.Point(1098, 13);
|
||||
this.cb_Platform.Name = "cb_Platform";
|
||||
this.cb_Platform.Size = new System.Drawing.Size(97, 25);
|
||||
this.cb_Platform.TabIndex = 906;
|
||||
this.cb_Platformr.Location = new System.Drawing.Point(992, 13);
|
||||
this.cb_Platformr.Name = "cb_Platformr";
|
||||
this.cb_Platformr.Size = new System.Drawing.Size(97, 25);
|
||||
this.cb_Platformr.TabIndex = 906;
|
||||
//
|
||||
// cmbCatSelect2
|
||||
//
|
||||
this.cmbCatSelect2.DropDownWidth = 150;
|
||||
this.cmbCatSelect2.FormattingEnabled = true;
|
||||
this.cmbCatSelect2.Location = new System.Drawing.Point(745, 12);
|
||||
this.cmbCatSelect2.Location = new System.Drawing.Point(639, 12);
|
||||
this.cmbCatSelect2.Name = "cmbCatSelect2";
|
||||
this.cmbCatSelect2.Size = new System.Drawing.Size(97, 25);
|
||||
this.cmbCatSelect2.TabIndex = 897;
|
||||
@@ -216,7 +321,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
this.cmbCatSelect1.DropDownWidth = 150;
|
||||
this.cmbCatSelect1.FormattingEnabled = true;
|
||||
this.cmbCatSelect1.Location = new System.Drawing.Point(648, 12);
|
||||
this.cmbCatSelect1.Location = new System.Drawing.Point(542, 12);
|
||||
this.cmbCatSelect1.Name = "cmbCatSelect1";
|
||||
this.cmbCatSelect1.Size = new System.Drawing.Size(97, 25);
|
||||
this.cmbCatSelect1.TabIndex = 896;
|
||||
@@ -225,7 +330,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
this.cmbCatSelect4.DropDownWidth = 150;
|
||||
this.cmbCatSelect4.FormattingEnabled = true;
|
||||
this.cmbCatSelect4.Location = new System.Drawing.Point(939, 12);
|
||||
this.cmbCatSelect4.Location = new System.Drawing.Point(833, 12);
|
||||
this.cmbCatSelect4.Name = "cmbCatSelect4";
|
||||
this.cmbCatSelect4.Size = new System.Drawing.Size(97, 25);
|
||||
this.cmbCatSelect4.TabIndex = 899;
|
||||
@@ -234,50 +339,15 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
this.cmbCatSelect3.DropDownWidth = 150;
|
||||
this.cmbCatSelect3.FormattingEnabled = true;
|
||||
this.cmbCatSelect3.Location = new System.Drawing.Point(842, 12);
|
||||
this.cmbCatSelect3.Location = new System.Drawing.Point(736, 12);
|
||||
this.cmbCatSelect3.Name = "cmbCatSelect3";
|
||||
this.cmbCatSelect3.Size = new System.Drawing.Size(97, 25);
|
||||
this.cmbCatSelect3.TabIndex = 898;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.ForeColor = System.Drawing.Color.Gray;
|
||||
this.label4.Location = new System.Drawing.Point(518, 17);
|
||||
this.label4.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(13, 17);
|
||||
this.label4.TabIndex = 488;
|
||||
this.label4.Text = "-";
|
||||
//
|
||||
// num_maxprice
|
||||
//
|
||||
this.num_maxprice.Location = new System.Drawing.Point(534, 14);
|
||||
this.num_maxprice.Maximum = new decimal(new int[] {
|
||||
99999,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.num_maxprice.Name = "num_maxprice";
|
||||
this.num_maxprice.Size = new System.Drawing.Size(70, 23);
|
||||
this.num_maxprice.TabIndex = 487;
|
||||
//
|
||||
// num_minprice
|
||||
//
|
||||
this.num_minprice.Location = new System.Drawing.Point(447, 14);
|
||||
this.num_minprice.Maximum = new decimal(new int[] {
|
||||
99999,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.num_minprice.Name = "num_minprice";
|
||||
this.num_minprice.Size = new System.Drawing.Size(70, 23);
|
||||
this.num_minprice.TabIndex = 486;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(388, 17);
|
||||
this.label7.Location = new System.Drawing.Point(332, 17);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(64, 17);
|
||||
this.label7.TabIndex = 485;
|
||||
@@ -294,30 +364,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.label3.TabIndex = 484;
|
||||
this.label3.Text = "-";
|
||||
//
|
||||
// num_maxsold
|
||||
//
|
||||
this.num_maxsold.Location = new System.Drawing.Point(310, 14);
|
||||
this.num_maxsold.Maximum = new decimal(new int[] {
|
||||
9999999,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.num_maxsold.Name = "num_maxsold";
|
||||
this.num_maxsold.Size = new System.Drawing.Size(70, 23);
|
||||
this.num_maxsold.TabIndex = 483;
|
||||
//
|
||||
// num_minsold
|
||||
//
|
||||
this.num_minsold.Location = new System.Drawing.Point(223, 14);
|
||||
this.num_minsold.Maximum = new decimal(new int[] {
|
||||
9999999,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.num_minsold.Name = "num_minsold";
|
||||
this.num_minsold.Size = new System.Drawing.Size(70, 23);
|
||||
this.num_minsold.TabIndex = 482;
|
||||
//
|
||||
// txt_title
|
||||
//
|
||||
this.txt_title.Location = new System.Drawing.Point(60, 14);
|
||||
@@ -337,7 +383,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(610, 17);
|
||||
this.label6.Location = new System.Drawing.Point(504, 17);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(44, 17);
|
||||
this.label6.TabIndex = 440;
|
||||
@@ -349,7 +395,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
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(1208, 14);
|
||||
this.btnSearch.Location = new System.Drawing.Point(1257, 14);
|
||||
this.btnSearch.Name = "btnSearch";
|
||||
this.btnSearch.Size = new System.Drawing.Size(58, 23);
|
||||
this.btnSearch.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
@@ -372,7 +418,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
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(1272, 14);
|
||||
this.pnlEmpty.Location = new System.Drawing.Point(1321, 15);
|
||||
this.pnlEmpty.Name = "pnlEmpty";
|
||||
this.pnlEmpty.Size = new System.Drawing.Size(58, 23);
|
||||
this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
@@ -420,7 +466,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1);
|
||||
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(1643, 476);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(1719, 476);
|
||||
this.splitContainer2.SplitterDistance = 447;
|
||||
this.splitContainer2.TabIndex = 0;
|
||||
//
|
||||
@@ -428,7 +474,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
|
||||
this.pbLoading.Location = new System.Drawing.Point(796, 198);
|
||||
this.pbLoading.Location = new System.Drawing.Point(834, 198);
|
||||
this.pbLoading.Name = "pbLoading";
|
||||
this.pbLoading.Size = new System.Drawing.Size(50, 50);
|
||||
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
@@ -439,20 +485,20 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
this.dgvData.AllowUserToAddRows = false;
|
||||
this.dgvData.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle9.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvData.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvData.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.dgvData.AutoRowNumber = true;
|
||||
this.dgvData.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
|
||||
this.dgvData.BackgroundColor = System.Drawing.Color.White;
|
||||
this.dgvData.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvData.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10;
|
||||
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.dgvData.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.dgvData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.colSelect,
|
||||
@@ -461,7 +507,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.c_goodsid,
|
||||
this.Column2,
|
||||
this.Column3,
|
||||
this.Column4});
|
||||
this.Column4,
|
||||
this.colDetectionResult});
|
||||
this.dgvData.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.dgvData.Location = new System.Drawing.Point(4, 0);
|
||||
this.dgvData.MultiSelectCheckBox = true;
|
||||
@@ -469,9 +516,44 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.dgvData.ReadOnly = true;
|
||||
this.dgvData.RowTemplate.Height = 60;
|
||||
this.dgvData.ShowCellErrors = false;
|
||||
this.dgvData.Size = new System.Drawing.Size(1635, 447);
|
||||
this.dgvData.Size = new System.Drawing.Size(1711, 447);
|
||||
this.dgvData.TabIndex = 5;
|
||||
//
|
||||
// ucSplitPage1
|
||||
//
|
||||
this.ucSplitPage1.CurrentPage = 1;
|
||||
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.ucSplitPage1.IsShowPageSize = true;
|
||||
this.ucSplitPage1.IsShowTotalCount = true;
|
||||
this.ucSplitPage1.Location = new System.Drawing.Point(1257, 0);
|
||||
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.ucSplitPage1.MaxPageSizeValue = 2000;
|
||||
this.ucSplitPage1.Name = "ucSplitPage1";
|
||||
this.ucSplitPage1.PageSize = 50;
|
||||
this.ucSplitPage1.Size = new System.Drawing.Size(462, 25);
|
||||
this.ucSplitPage1.TabIndex = 4;
|
||||
this.ucSplitPage1.TotalCount = ((long)(0));
|
||||
this.ucSplitPage1.TotalPage = 1;
|
||||
//
|
||||
// statusBar
|
||||
//
|
||||
this.statusBar.BackColor = System.Drawing.Color.White;
|
||||
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.statusBar.Location = new System.Drawing.Point(0, 0);
|
||||
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.statusBar.Name = "statusBar";
|
||||
this.statusBar.Size = new System.Drawing.Size(1719, 25);
|
||||
this.statusBar.TabIndex = 1;
|
||||
this.statusBar.Visible = false;
|
||||
//
|
||||
// numericUpDown1
|
||||
//
|
||||
this.numericUpDown1.Location = new System.Drawing.Point(918, 274);
|
||||
this.numericUpDown1.Name = "numericUpDown1";
|
||||
this.numericUpDown1.Size = new System.Drawing.Size(120, 21);
|
||||
this.numericUpDown1.TabIndex = 7;
|
||||
//
|
||||
// colSelect
|
||||
//
|
||||
this.colSelect.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
|
||||
@@ -537,38 +619,20 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.Column4.ReadOnly = true;
|
||||
this.Column4.Width = 120;
|
||||
//
|
||||
// ucSplitPage1
|
||||
// colDetectionResult
|
||||
//
|
||||
this.ucSplitPage1.CurrentPage = 1;
|
||||
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.ucSplitPage1.IsShowPageSize = true;
|
||||
this.ucSplitPage1.IsShowTotalCount = true;
|
||||
this.ucSplitPage1.Location = new System.Drawing.Point(1181, 0);
|
||||
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.ucSplitPage1.MaxPageSizeValue = 2000;
|
||||
this.ucSplitPage1.Name = "ucSplitPage1";
|
||||
this.ucSplitPage1.PageSize = 50;
|
||||
this.ucSplitPage1.Size = new System.Drawing.Size(462, 25);
|
||||
this.ucSplitPage1.TabIndex = 4;
|
||||
this.ucSplitPage1.TotalCount = ((long)(0));
|
||||
this.ucSplitPage1.TotalPage = 1;
|
||||
//
|
||||
// statusBar
|
||||
//
|
||||
this.statusBar.BackColor = System.Drawing.Color.White;
|
||||
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.statusBar.Location = new System.Drawing.Point(0, 0);
|
||||
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.statusBar.Name = "statusBar";
|
||||
this.statusBar.Size = new System.Drawing.Size(1643, 25);
|
||||
this.statusBar.TabIndex = 1;
|
||||
this.statusBar.Visible = false;
|
||||
this.colDetectionResult.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
|
||||
this.colDetectionResult.HeaderText = "AI检测结果";
|
||||
this.colDetectionResult.MinimumWidth = 50;
|
||||
this.colDetectionResult.Name = "colDetectionResult";
|
||||
this.colDetectionResult.ReadOnly = true;
|
||||
this.colDetectionResult.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
this.colDetectionResult.Width = 160;
|
||||
//
|
||||
// CloudGoodsFavoriteForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.ClientSize = new System.Drawing.Size(1643, 530);
|
||||
this.ClientSize = new System.Drawing.Size(1719, 530);
|
||||
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;
|
||||
@@ -581,16 +645,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.panel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.num_maxprice)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.num_minprice)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.num_maxsold)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.num_minsold)).EndInit();
|
||||
this.splitContainer2.Panel1.ResumeLayout(false);
|
||||
this.splitContainer2.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
|
||||
this.splitContainer2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvData)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -609,11 +670,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.TextBox txt_title;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.NumericUpDown num_maxsold;
|
||||
private System.Windows.Forms.NumericUpDown num_minsold;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.NumericUpDown num_maxprice;
|
||||
private System.Windows.Forms.NumericUpDown num_minprice;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.ComboBox cmbCatSelect2;
|
||||
@@ -621,7 +677,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
private System.Windows.Forms.ComboBox cmbCatSelect4;
|
||||
private System.Windows.Forms.ComboBox cmbCatSelect3;
|
||||
private System.Windows.Forms.Label label5r;
|
||||
private System.Windows.Forms.ComboBox cb_Platform;
|
||||
private System.Windows.Forms.ComboBox cb_Platformr;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private DevComponents.DotNetBar.PanelEx btn_removefavorite;
|
||||
private DevComponents.DotNetBar.PanelEx bt_importUploadList;
|
||||
private DevComponents.DotNetBar.PanelEx btnSafeDetection;
|
||||
private System.Windows.Forms.NumericUpDown numericUpDown1;
|
||||
private UserComponent.UcNumericRange num_sold;
|
||||
private UserComponent.UcNumericRange num_price;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.ComboBox cb_safe;
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn c_Platform;
|
||||
private System.Windows.Forms.DataGridViewImageColumn Column1;
|
||||
@@ -629,8 +694,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private DevComponents.DotNetBar.PanelEx btn_removefavorite;
|
||||
private DevComponents.DotNetBar.PanelEx bt_importUploadList;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colDetectionResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
+105
-24
@@ -1,3 +1,4 @@
|
||||
using TemuKJD.BLL;
|
||||
using AllBase;
|
||||
using AllBase.Helper;
|
||||
using AllBase.Model.Result;
|
||||
@@ -19,28 +20,30 @@ using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Security.Policy;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using TemuKJD.BaseForms;
|
||||
using TemuKJD.Extension;
|
||||
using TemuKJD.ToolForms;
|
||||
using TemuKJD.UserControls;
|
||||
using TemuKJD.WXForms.ProductForms;
|
||||
using Work;
|
||||
using Work.GoodDetail;
|
||||
using Work.Services;
|
||||
|
||||
namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
namespace TemuKJD.WXForms.ProductForms
|
||||
{
|
||||
public partial class CloudGoodsFavoriteForm : BaseForm
|
||||
{
|
||||
private GoodsSearchRequest search = new GoodsSearchRequest();
|
||||
private List<ComboBox> catBoxList = new List<ComboBox>();
|
||||
private BindingList<CloudGoods> dataList = new BindingList<CloudGoods>();
|
||||
private CancellationTokenSource detection;
|
||||
CheckBox chkSelectAll = null;
|
||||
public CloudGoodsFavoriteForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
Disposed += (sender, e) => detection?.Cancel();
|
||||
}
|
||||
|
||||
private void AdminCardCodeForm_Load(object sender, EventArgs e)
|
||||
@@ -50,13 +53,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
InitCategory();
|
||||
InitBindingDataGridView();
|
||||
|
||||
|
||||
num_minsold.Value = 0;
|
||||
num_maxsold.Value = 9999999;
|
||||
num_minprice.Value = 0;
|
||||
num_maxprice.Value = 999;
|
||||
num_sold.LowerValue = 1;
|
||||
num_sold.UpperValue = 9999999;
|
||||
num_price.LowerValue = 1;
|
||||
num_price.UpperValue = 9999999;
|
||||
|
||||
cb_Platformr.SelectedIndex = 0;
|
||||
cb_safe.SelectedIndex = 0;
|
||||
|
||||
cb_Platform.SelectedIndex = 0;
|
||||
ucSplitPage1.TotalCount = 0;
|
||||
|
||||
|
||||
@@ -79,6 +83,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.Column3.DataPropertyName = nameof(CloudGoods.Price);
|
||||
this.Column4.DataPropertyName = nameof(CloudGoods.SoldQuantity);
|
||||
this.c_goodsid.DataPropertyName = nameof(CloudGoods.GoodsId);
|
||||
this.colDetectionResult.DataPropertyName = nameof(CloudGoods.DetectionResult);
|
||||
this.c_Platform.DataPropertyName = nameof(CloudGoods.Platform);
|
||||
// 2. 设置列样式
|
||||
// 时间列格式化
|
||||
@@ -311,6 +316,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
}
|
||||
private async void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (detection != null) return;
|
||||
activeSearches++;
|
||||
try
|
||||
{
|
||||
this.pbLoading.Visible = true;
|
||||
@@ -318,12 +325,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
|
||||
UserFavoritesGoodsSearchRequest search = new UserFavoritesGoodsSearchRequest();
|
||||
|
||||
search.Platform = cb_Platform.SelectedIndex == 1 ? PlatformType.PDD : cb_Platform.SelectedIndex == 2 ? PlatformType.WX : PlatformType.None;
|
||||
search.Platform = cb_Platformr.SelectedIndex == 1 ? PlatformType.PDD : cb_Platformr.SelectedIndex == 2 ? PlatformType.WX : PlatformType.None;
|
||||
search.SafeStatus = cb_safe.SelectedIndex;
|
||||
search.Title = txt_title.Text;
|
||||
search.MinSoldQuantity = (int)num_minsold.Value;
|
||||
search.MaxSoldQuantity = (int)num_maxsold.Value;
|
||||
search.MinPrice = (long)num_minprice.Value * 100;
|
||||
search.MaxPrice = (long)num_maxprice.Value * 100;
|
||||
search.MinSoldQuantity = (int)num_sold.LowerValue;
|
||||
search.MaxSoldQuantity = (int)num_sold.UpperValue;
|
||||
search.MinPrice = (long)(num_price.LowerValue * 100);
|
||||
search.MaxPrice = (long)(num_price.UpperValue * 100);
|
||||
if (cmbCatSelect1.SelectedItem is PddCatInfo cat1)
|
||||
{
|
||||
search.CatId1 = (int)(cat1.cat_id);
|
||||
@@ -349,7 +357,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
finally
|
||||
{
|
||||
this.pbLoading.Visible = false;
|
||||
btnSearch.Enabled = true;
|
||||
btnSearch.Enabled = --activeSearches == 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -357,26 +365,36 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
private void pnlEmpty_Click(object sender, EventArgs e)
|
||||
{
|
||||
txt_title.Text = "";
|
||||
num_minsold.Value = 0;
|
||||
num_maxsold.Value = 99999;
|
||||
num_minprice.Value = 0;
|
||||
num_maxprice.Value = 999;
|
||||
num_sold.LowerValue = 1;
|
||||
num_sold.UpperValue = 9999999;
|
||||
num_price.LowerValue = 1;
|
||||
num_price.UpperValue = 9999999;
|
||||
|
||||
cmbCatSelect1.SelectedIndex = 0;
|
||||
cb_Platform.SelectedIndex = 0;
|
||||
cb_Platformr.SelectedIndex = 0;
|
||||
cb_safe.SelectedIndex = 0;
|
||||
ucSplitPage1.PageChange -= UcSplitPage1_PageChange;
|
||||
ucSplitPage1.CurrentPage = 1;
|
||||
ucSplitPage1.PageChange += UcSplitPage1_PageChange;
|
||||
}
|
||||
|
||||
|
||||
private int latestGoodsQuery;
|
||||
private int activeSearches;
|
||||
|
||||
public async Task GetGoods(UserFavoritesGoodsSearchRequest request)
|
||||
{
|
||||
dataList.Clear();
|
||||
var query = ++latestGoodsQuery;
|
||||
|
||||
PageData<CloudGoods> ret = await CloudGoodsService.SearchFavorites(request);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
ret.List.ForEach(a => dataList.Add(a));
|
||||
if (query != latestGoodsQuery) return;
|
||||
dataList.Clear();
|
||||
foreach (var goods in ret.List)
|
||||
{
|
||||
dataList.Add(goods);
|
||||
}
|
||||
ucSplitPage1.TotalPage = Math.Max(1, ret.TotalPages);
|
||||
ucSplitPage1.TotalCount = ret.Total;
|
||||
this.pbLoading.Visible = false;
|
||||
@@ -424,7 +442,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
product_name = item.Title,
|
||||
cat_name = catName,
|
||||
product_get_type_text = item.Platform == 1 ? ("多多") : item.Platform == 2 ? ("微信") : ("未知"),
|
||||
db_type = "云端数据",
|
||||
db_type = "云端数据",
|
||||
});
|
||||
succ++;
|
||||
}
|
||||
@@ -444,13 +462,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
private async void btn_removefavorite_Click(object sender, EventArgs e)
|
||||
{
|
||||
int succ = 0;
|
||||
int err = 0;
|
||||
int err = 0;
|
||||
try
|
||||
{
|
||||
this.pbLoading.Visible = true;
|
||||
btn_removefavorite.Enabled = false;
|
||||
var goodsIds = dataList.Where(a => a.IsSelected).Select(a => a.GoodsId).ToList();
|
||||
if(goodsIds.Count==0)
|
||||
if (goodsIds.Count == 0)
|
||||
{
|
||||
BaseMsgForm.ShowInfo($"请勾选商品");
|
||||
return;
|
||||
@@ -473,6 +491,69 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
btn_removefavorite.Enabled = true;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 批量AI检测
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private async void btnSafeDetection_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (detection != null)
|
||||
{
|
||||
detection.Cancel();
|
||||
btnSafeDetection.Text = "正在停止";
|
||||
btnSafeDetection.Enabled = false;
|
||||
return;
|
||||
}
|
||||
if (!btnSearch.Enabled || !btn_removefavorite.Enabled)
|
||||
{
|
||||
BaseMsgForm.ShowInfo("请等待当前操作完成后再检测。");
|
||||
return;
|
||||
}
|
||||
var selected = dataList.Where(x => x.IsSelected)
|
||||
.Select(x => new ComplianceGoods
|
||||
{
|
||||
id = x.GoodsId.ToString(),
|
||||
name = x.Title,
|
||||
image = x.ThumbUrl,
|
||||
type = ComplianceGoods.Cloud,
|
||||
platform = x.Platform
|
||||
}).ToList();
|
||||
var locked = splitContainer1.Panel1.Controls.Cast<Control>().Where(c => c != panel1)
|
||||
.Concat(panel1.Controls.Cast<Control>().Where(c => c != btnSafeDetection))
|
||||
.Concat(new Control[] { splitContainer2 }).Where(c => c.Enabled).ToList();
|
||||
var originalText = btnSafeDetection.Text;
|
||||
detection = new CancellationTokenSource();
|
||||
try
|
||||
{
|
||||
foreach (var control in locked) control.Enabled = false;
|
||||
btnSafeDetection.Text = "停止检测";
|
||||
var result = await GoodsComplianceService.DetectSelectedAsync(selected, ComplianceProductReader.Read, (id, status) =>
|
||||
{
|
||||
if (IsDisposed) return;
|
||||
foreach (var goods in dataList.Where(x => x.GoodsId.ToString() == id))
|
||||
goods.DetectionResult = status;
|
||||
}, detection.Token);
|
||||
if (!IsDisposed)
|
||||
{
|
||||
var title = result.Unfinished > 0 ? "AI 检测已停止" : "AI 检测完成";
|
||||
BaseMsgForm.ShowInfo($"{title}:安全 {result.Safe},有风险 {result.Risk},失败 {result.Failed},未完成 {result.Unfinished}。");
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { if (!IsDisposed) MessageBox.Show(this, ex.Message); }
|
||||
finally
|
||||
{
|
||||
detection.Dispose();
|
||||
detection = null;
|
||||
if (!IsDisposed)
|
||||
{
|
||||
foreach (var control in locked) control.Enabled = true;
|
||||
btnSafeDetection.Text = originalText;
|
||||
btnSafeDetection.Enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
File renamed without changes.
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
namespace TemuKJD.WXForms.ProductForms
|
||||
{
|
||||
partial class CloudGoodsForm
|
||||
{
|
||||
+1
-2
@@ -25,12 +25,11 @@ using TemuKJD.BaseForms;
|
||||
using TemuKJD.Extension;
|
||||
using TemuKJD.ToolForms;
|
||||
using TemuKJD.UserControls;
|
||||
using TemuKJD.WXForms.ProductForms;
|
||||
using Work;
|
||||
using Work.GoodDetail;
|
||||
using Work.Services;
|
||||
|
||||
namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
namespace TemuKJD.WXForms.ProductForms
|
||||
{
|
||||
public partial class CloudGoodsForm : BaseForm
|
||||
{
|
||||
File renamed without changes.
@@ -1540,54 +1540,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
/// <param name="noBanWx">校验微信禁售商品</param>
|
||||
/// <returns></returns>
|
||||
public static KJDDBProduct GetProductDetail(string prodDbId, out string errMsg, bool noViolationProduct = false, bool noBanWx = false)
|
||||
{
|
||||
errMsg = "";
|
||||
|
||||
if (string.IsNullOrEmpty(prodDbId))
|
||||
{
|
||||
errMsg = "产品编号为空";
|
||||
return new KJDDBProduct();
|
||||
}
|
||||
|
||||
List<KJDDBProduct> list = new List<KJDDBProduct>();
|
||||
|
||||
var url = BaseClass.BuildObjString("product/get_pdd_product_detail_list");
|
||||
var data = UserLogin.GetSignaturex() + "&search_db_ids=" + prodDbId;
|
||||
if (noViolationProduct)
|
||||
data += "&wx_safe_status=安全商品,未校验";
|
||||
if (noBanWx)
|
||||
data += "&ban_wx=0";
|
||||
if (BaseClass.SaLevel > 0 || BaseClass.UserAuthority.Contains("爆款数据") || BaseClass.UserAuthority.Contains("学员数据") || BaseClass.ParentAuthority.Contains("学员数据"))
|
||||
data += "&special_prod_type=普通商品,爆款数据";
|
||||
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var jArr = JObject.Parse(html)["data"];
|
||||
if (jArr.Count() == 0)
|
||||
return null;
|
||||
var sProd = JsonHelper.SerializeObject(jArr);
|
||||
|
||||
try
|
||||
{
|
||||
list = JsonHelper.DeserializeJsonToList<KJDDBProduct>(sProd);
|
||||
var item = list.FirstOrDefault();
|
||||
if (item == null)
|
||||
item = new KJDDBProduct();
|
||||
return item;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
=> ComplianceProductReader.GetProductDetail(prodDbId, out errMsg, noViolationProduct, noBanWx);
|
||||
|
||||
public static KJDDBProduct GetCloudProductDetail(TemuDBProductSelect selectProd, out string errMsg, bool noViolationProduct = false, bool noBanWx = false)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user