我的商品库增加AI识图

This commit is contained in:
chfei committed 2026-11-06 19:23:00 +08:00
1 parent ff94184a0c
commit 013d343fe9
12 files changed
+880 -377

No files matched your search

+8 -4
View File
@@ -117,10 +117,14 @@ namespace AllBase
public static decimal PostagePerOrder { get; set; } = 2.2m;
public static decimal RefundPostagePerOrder { get; set; } = 2.5m;
public static decimal GiftOemAmountPerOrder { get; set; } = 0m;
/// <summary>
/// 采集最低销量
/// </summary>
public static int MinSales = 0;
/// <summary>
/// 图片检测配额
/// </summary>
public static int ImageAnalysisQuota { get; set; }
/// <summary>
/// 采集最低销量
/// </summary>
public static int MinSales = 0;
public static int MinPercent = 0;
public static int MinLevel = 0;
public static int AlimamaPageCount = 0;
+1 -1
View File
@@ -10,7 +10,7 @@
<ErrorReportUrlHistory />
<FallbackCulture>zh-CN</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
<ActiveDebugProfile>Production</ActiveDebugProfile>
<ActiveDebugProfile>Development</ActiveDebugProfile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
@@ -22,165 +22,346 @@ namespace TemuKJD.KJDForms.SystemForms
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 = new System.Windows.Forms.GroupBox();
this.mainLabel = new System.Windows.Forms.Label();
this.main = new System.Windows.Forms.ComboBox();
this.mainCount = new System.Windows.Forms.NumericUpDown();
this.mainUnit = new System.Windows.Forms.Label();
this.detailLabel = new System.Windows.Forms.Label();
this.detail = new System.Windows.Forms.ComboBox();
this.detailCount = new System.Windows.Forms.NumericUpDown();
this.detailUnit = new System.Windows.Forms.Label();
this.sku = new System.Windows.Forms.CheckBox();
this.keywordsGroup = new System.Windows.Forms.GroupBox();
this.keywords = new System.Windows.Forms.TextBox();
this.keywordsHint = new System.Windows.Forms.Label();
this.btnSaveDetection = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.num_points = new System.Windows.Forms.NumericUpDown();
this.lb_imagequtoa = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.btn_Exchange = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.imagesGroup.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.mainCount)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.detailCount)).BeginInit();
this.keywordsGroup.SuspendLayout();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.num_points)).BeginInit();
this.SuspendLayout();
//
// imagesGroup
//
this.imagesGroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
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.imagesGroup.Location = new System.Drawing.Point(20, 71);
this.imagesGroup.Name = "imagesGroup";
this.imagesGroup.Size = new System.Drawing.Size(760, 153);
this.imagesGroup.TabIndex = 0;
this.imagesGroup.TabStop = false;
this.imagesGroup.Text = "检测图片";
//
// mainLabel
//
this.mainLabel.AutoSize = true;
this.mainLabel.Location = new System.Drawing.Point(16, 34);
this.mainLabel.Name = "mainLabel";
this.mainLabel.Size = new System.Drawing.Size(56, 17);
this.mainLabel.TabIndex = 0;
this.mainLabel.Text = "商品主图";
//
// main
//
this.main.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.main.Items.AddRange(new object[] {
"全部",
"前几张"});
this.main.Location = new System.Drawing.Point(106, 30);
this.main.Name = "main";
this.main.Size = new System.Drawing.Size(110, 25);
this.main.TabIndex = 1;
this.main.SelectedIndexChanged += new System.EventHandler(this.ImageRangeChanged);
//
// mainCount
//
this.mainCount.AccessibleName = "商品主图检测张数";
this.mainCount.Enabled = false;
this.mainCount.Location = new System.Drawing.Point(228, 30);
this.mainCount.Maximum = new decimal(new int[] {
999,
0,
0,
0});
this.mainCount.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.mainCount.Name = "mainCount";
this.mainCount.Size = new System.Drawing.Size(60, 23);
this.mainCount.TabIndex = 2;
this.mainCount.Value = new decimal(new int[] {
1,
0,
0,
0});
//
// mainUnit
//
this.mainUnit.AutoSize = true;
this.mainUnit.Location = new System.Drawing.Point(294, 34);
this.mainUnit.Name = "mainUnit";
this.mainUnit.Size = new System.Drawing.Size(20, 17);
this.mainUnit.TabIndex = 3;
this.mainUnit.Text = "张";
//
// detailLabel
//
this.detailLabel.AutoSize = true;
this.detailLabel.Location = new System.Drawing.Point(16, 72);
this.detailLabel.Name = "detailLabel";
this.detailLabel.Size = new System.Drawing.Size(44, 17);
this.detailLabel.TabIndex = 4;
this.detailLabel.Text = "详情图";
//
// detail
//
this.detail.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.detail.Items.AddRange(new object[] {
"不检测",
"前几张",
"全部"});
this.detail.Location = new System.Drawing.Point(106, 68);
this.detail.Name = "detail";
this.detail.Size = new System.Drawing.Size(110, 25);
this.detail.TabIndex = 5;
this.detail.SelectedIndexChanged += new System.EventHandler(this.ImageRangeChanged);
//
// detailCount
//
this.detailCount.AccessibleName = "详情图检测张数";
this.detailCount.Enabled = false;
this.detailCount.Location = new System.Drawing.Point(228, 68);
this.detailCount.Maximum = new decimal(new int[] {
999,
0,
0,
0});
this.detailCount.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.detailCount.Name = "detailCount";
this.detailCount.Size = new System.Drawing.Size(60, 23);
this.detailCount.TabIndex = 6;
this.detailCount.Value = new decimal(new int[] {
1,
0,
0,
0});
//
// detailUnit
//
this.detailUnit.AutoSize = true;
this.detailUnit.Location = new System.Drawing.Point(294, 72);
this.detailUnit.Name = "detailUnit";
this.detailUnit.Size = new System.Drawing.Size(20, 17);
this.detailUnit.TabIndex = 7;
this.detailUnit.Text = "张";
//
// sku
//
this.sku.AutoSize = true;
this.sku.Location = new System.Drawing.Point(106, 112);
this.sku.Name = "sku";
this.sku.Size = new System.Drawing.Size(107, 21);
this.sku.TabIndex = 8;
this.sku.Text = "检测 SKU 图片";
//
// keywordsGroup
//
this.keywordsGroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.keywordsGroup.Controls.Add(this.keywords);
this.keywordsGroup.Controls.Add(this.keywordsHint);
this.keywordsGroup.Location = new System.Drawing.Point(20, 238);
this.keywordsGroup.Name = "keywordsGroup";
this.keywordsGroup.Size = new System.Drawing.Size(760, 143);
this.keywordsGroup.TabIndex = 1;
this.keywordsGroup.TabStop = false;
this.keywordsGroup.Text = "检测关键词";
//
// keywords
//
this.keywords.AcceptsReturn = true;
this.keywords.AccessibleName = "检测关键词";
this.keywords.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.keywords.Location = new System.Drawing.Point(16, 27);
this.keywords.Multiline = true;
this.keywords.Name = "keywords";
this.keywords.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.keywords.Size = new System.Drawing.Size(728, 68);
this.keywords.TabIndex = 0;
//
// keywordsHint
//
this.keywordsHint.AutoSize = true;
this.keywordsHint.ForeColor = System.Drawing.SystemColors.GrayText;
this.keywordsHint.Location = new System.Drawing.Point(16, 105);
this.keywordsHint.Name = "keywordsHint";
this.keywordsHint.Size = new System.Drawing.Size(260, 17);
this.keywordsHint.TabIndex = 1;
this.keywordsHint.Text = "多个关键词可用逗号、分号、空格或换行分隔。";
//
// btnSaveDetection
//
this.btnSaveDetection.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSaveDetection.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSaveDetection.FlatAppearance.BorderSize = 0;
this.btnSaveDetection.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSaveDetection.ForeColor = System.Drawing.Color.White;
this.btnSaveDetection.Location = new System.Drawing.Point(20, 396);
this.btnSaveDetection.Name = "btnSaveDetection";
this.btnSaveDetection.Size = new System.Drawing.Size(96, 32);
this.btnSaveDetection.TabIndex = 2;
this.btnSaveDetection.Text = "保存条件";
this.btnSaveDetection.UseVisualStyleBackColor = false;
this.btnSaveDetection.Click += new System.EventHandler(this.SaveDetectionClick);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.btn_Exchange);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.num_points);
this.groupBox1.Controls.Add(this.lb_imagequtoa);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Location = new System.Drawing.Point(20, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(760, 53);
this.groupBox1.TabIndex = 3;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "积分兑换";
//
// num_points
//
this.num_points.Location = new System.Drawing.Point(269, 20);
this.num_points.Maximum = new decimal(new int[] {
1000,
0,
0,
0});
this.num_points.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.num_points.Name = "num_points";
this.num_points.Size = new System.Drawing.Size(120, 23);
this.num_points.TabIndex = 2;
this.num_points.Value = new decimal(new int[] {
1,
0,
0,
0});
//
// lb_imagequtoa
//
this.lb_imagequtoa.AutoSize = true;
this.lb_imagequtoa.Location = new System.Drawing.Point(130, 23);
this.lb_imagequtoa.Name = "lb_imagequtoa";
this.lb_imagequtoa.Size = new System.Drawing.Size(50, 17);
this.lb_imagequtoa.TabIndex = 1;
this.lb_imagequtoa.Text = "999999";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(65, 23);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(68, 17);
this.label1.TabIndex = 0;
this.label1.Text = "检测图片:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(195, 23);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(56, 17);
this.label3.TabIndex = 3;
this.label3.Text = "积分兑换";
//
// btn_Exchange
//
this.btn_Exchange.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btn_Exchange.Cursor = System.Windows.Forms.Cursors.Hand;
this.btn_Exchange.FlatAppearance.BorderSize = 0;
this.btn_Exchange.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_Exchange.ForeColor = System.Drawing.Color.White;
this.btn_Exchange.Location = new System.Drawing.Point(395, 19);
this.btn_Exchange.Name = "btn_Exchange";
this.btn_Exchange.Size = new System.Drawing.Size(68, 24);
this.btn_Exchange.TabIndex = 4;
this.btn_Exchange.Text = "兑换";
this.btn_Exchange.UseVisualStyleBackColor = false;
this.btn_Exchange.Click += new System.EventHandler(this.btn_Exchange_Click);
//
// label4
//
this.label4.AutoSize = true;
this.label4.ForeColor = System.Drawing.SystemColors.ControlDark;
this.label4.Location = new System.Drawing.Point(478, 23);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(165, 17);
this.label4.TabIndex = 5;
this.label4.Text = "兑换比例:1积分=100张图片";
//
// SystemGoodsComplianceForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.AutoScroll = true;
this.AutoScrollMinSize = new System.Drawing.Size(365, 390);
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.imagesGroup);
this.Controls.Add(this.keywordsGroup);
this.Controls.Add(this.btnSaveDetection);
this.Font = new System.Drawing.Font("微软雅黑", 9F);
this.Name = "SystemGoodsComplianceForm";
this.Text = "商品 AI 检测";
this.imagesGroup.ResumeLayout(false);
this.imagesGroup.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.mainCount)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.detailCount)).EndInit();
this.keywordsGroup.ResumeLayout(false);
this.keywordsGroup.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.num_points)).EndInit();
this.ResumeLayout(false);
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);
}
}
private GroupBox groupBox1;
private NumericUpDown num_points;
private Label lb_imagequtoa;
private Label label1;
private Label label4;
private Button btn_Exchange;
private Label label3;
}
}
@@ -1,64 +1,109 @@
using System;
using System.Windows.Forms;
using Work.Services;
using AllBase;
using AllBase.Helper;
using AllBase.Model.Result;
using Newtonsoft.Json;
using System;
using System.Runtime.Remoting.Metadata.W3cXsd2001;
using System.Threading.Tasks;
using System.Windows.Forms;
using TemuKJD.BaseForms;
using Work;
using Work.Services;
namespace TemuKJD.KJDForms.SystemForms
{
public partial class SystemGoodsComplianceForm : BaseForm
{
public SystemGoodsComplianceForm()
{
InitializeComponent();
public partial class SystemGoodsComplianceForm : BaseForm
{
public SystemGoodsComplianceForm()
{
InitializeComponent();
VisibleChanged += (sender, e) => { if (Visible) LoadSettings(); };
LoadSettings();
}
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 LoadSettings()
{
lb_imagequtoa.Text = BaseClass.ImageAnalysisQuota.ToString();
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 检测条件。");
}
}
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 检测条件。");
}
private async void btn_Exchange_Click(object sender, EventArgs e)
{
try
{
btn_Exchange.Enabled = false;
int points = (int)num_points.Value;
if (BaseMsgForm.ShowConfirm($"是否要兑换 {points} 积分,共:{points * 100}张图片检测?", "提示").DialogResult != DialogResult.OK)
{
return;
}
var url = BaseClass.BuildObjString("user/BuyImageAnalysisQuota");
var data = UserLogin.GetSignPostData(new
{
Amount = points,
});
string html = await GetHtml.PostJsonAsync(url, data);
var ret = JsonConvert.DeserializeObject<Result<int>>(html);
if (ret.Code == 200)
{
BaseClass.ImageAnalysisQuota += ret.Data;
lb_imagequtoa.Text = BaseClass.ImageAnalysisQuota.ToString();
BaseMsgForm.ShowInfo("兑换成功");
}
}
catch (Exception ex)
{
BaseMsgForm.ShowInfo("兑换失败:" + ex.Message);
}
finally
{
btn_Exchange.Enabled = true;
}
}
}
}
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -57,9 +57,6 @@ namespace TemuKJD.WXForms.ProductForms
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();
@@ -68,6 +65,9 @@ namespace TemuKJD.WXForms.ProductForms
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colDetectionResult = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -223,8 +223,8 @@ namespace TemuKJD.WXForms.ProductForms
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.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
this.btnSafeDetection.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
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;
@@ -519,41 +519,6 @@ namespace TemuKJD.WXForms.ProductForms
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;
@@ -629,6 +594,41 @@ namespace TemuKJD.WXForms.ProductForms
this.colDetectionResult.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.colDetectionResult.Width = 160;
//
// 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;
//
// CloudGoodsFavoriteForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -498,6 +498,8 @@ namespace TemuKJD.WXForms.ProductForms
/// <param name="e"></param>
private async void btnSafeDetection_Click(object sender, EventArgs e)
{
BaseMsgForm.ShowInfo($"当前AI检测剩余:{BaseClass.ImageAnalysisQuota}张");
if (detection != null)
{
detection.Cancel();
@@ -30,23 +30,23 @@ namespace TemuKJD.WXForms.ProductForms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle 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();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle31 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle32 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle33 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WXUserCollectAuthProdListForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.btn_import_wx = new DevComponents.DotNetBar.PanelEx();
@@ -95,6 +95,8 @@ namespace TemuKJD.WXForms.ProductForms
this.dtpStart = new System.Windows.Forms.DateTimePicker();
this.dtpEnd = new System.Windows.Forms.DateTimePicker();
this.label10 = new System.Windows.Forms.Label();
this.txt_listing_time = new System.Windows.Forms.TextBox();
this.btnSafeDetection = new DevComponents.DotNetBar.PanelEx();
this.label7 = new System.Windows.Forms.Label();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.lblRelation = new System.Windows.Forms.Label();
@@ -152,10 +154,10 @@ namespace TemuKJD.WXForms.ProductForms
this.col_edit = new System.Windows.Forms.DataGridViewLinkColumn();
this.col_delete = new System.Windows.Forms.DataGridViewLinkColumn();
this.col_select_product = new System.Windows.Forms.DataGridViewLinkColumn();
this.colDetectionResult = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.txt_listing_time = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -611,6 +613,7 @@ namespace TemuKJD.WXForms.ProductForms
this.tableLayoutPanel1.Controls.Add(this.dtpEnd, 3, 2);
this.tableLayoutPanel1.Controls.Add(this.label10, 10, 2);
this.tableLayoutPanel1.Controls.Add(this.txt_listing_time, 11, 2);
this.tableLayoutPanel1.Controls.Add(this.btnSafeDetection, 5, 2);
this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 6);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 3;
@@ -987,7 +990,44 @@ namespace TemuKJD.WXForms.ProductForms
this.label10.Size = new System.Drawing.Size(56, 17);
this.label10.TabIndex = 983;
this.label10.Text = "上架日期";
this.toolTip1.SetToolTip(this.label10, "导入数据时超出时间(天)范围的不导入");
//
// txt_listing_time
//
this.txt_listing_time.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txt_listing_time.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txt_listing_time.Font = new System.Drawing.Font("微软雅黑", 10F);
this.txt_listing_time.Location = new System.Drawing.Point(888, 73);
this.txt_listing_time.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.txt_listing_time.Name = "txt_listing_time";
this.txt_listing_time.Size = new System.Drawing.Size(101, 25);
this.txt_listing_time.TabIndex = 984;
this.txt_listing_time.Text = "365";
//
// btnSafeDetection
//
this.btnSafeDetection.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
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(388, 73);
this.btnSafeDetection.Name = "btnSafeDetection";
this.btnSafeDetection.Size = new System.Drawing.Size(96, 25);
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 = 1198;
this.btnSafeDetection.Text = "AI检测";
this.btnSafeDetection.Click += new System.EventHandler(this.btnSafeDetection_Click);
//
// label7
//
@@ -1036,14 +1076,14 @@ namespace TemuKJD.WXForms.ProductForms
this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1);
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(1438, 567);
this.splitContainer2.SplitterDistance = 538;
this.splitContainer2.SplitterDistance = 537;
this.splitContainer2.TabIndex = 0;
//
// lblRelation
//
this.lblRelation.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.lblRelation.AutoSize = true;
this.lblRelation.Location = new System.Drawing.Point(246, 69);
this.lblRelation.Location = new System.Drawing.Point(246, 68);
this.lblRelation.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.lblRelation.Name = "lblRelation";
this.lblRelation.Size = new System.Drawing.Size(68, 17);
@@ -1055,7 +1095,7 @@ namespace TemuKJD.WXForms.ProductForms
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(694, 244);
this.pbLoading.Location = new System.Drawing.Point(694, 243);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -1066,7 +1106,7 @@ namespace TemuKJD.WXForms.ProductForms
//
this.label16.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(22, 197);
this.label16.Location = new System.Drawing.Point(22, 196);
this.label16.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(69, 17);
@@ -1077,7 +1117,7 @@ namespace TemuKJD.WXForms.ProductForms
// txtRealCoid
//
this.txtRealCoid.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.txtRealCoid.Location = new System.Drawing.Point(91, 129);
this.txtRealCoid.Location = new System.Drawing.Point(91, 128);
this.txtRealCoid.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.txtRealCoid.Name = "txtRealCoid";
this.txtRealCoid.Size = new System.Drawing.Size(133, 23);
@@ -1087,7 +1127,7 @@ namespace TemuKJD.WXForms.ProductForms
// txtSKC
//
this.txtSKC.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.txtSKC.Location = new System.Drawing.Point(91, 194);
this.txtSKC.Location = new System.Drawing.Point(91, 193);
this.txtSKC.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.txtSKC.Name = "txtSKC";
this.txtSKC.Size = new System.Drawing.Size(133, 23);
@@ -1098,7 +1138,7 @@ namespace TemuKJD.WXForms.ProductForms
//
this.label13.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(23, 163);
this.label13.Location = new System.Drawing.Point(23, 162);
this.label13.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(68, 17);
@@ -1109,7 +1149,7 @@ namespace TemuKJD.WXForms.ProductForms
// txtSecretStyleCode
//
this.txtSecretStyleCode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.txtSecretStyleCode.Location = new System.Drawing.Point(91, 37);
this.txtSecretStyleCode.Location = new System.Drawing.Point(91, 36);
this.txtSecretStyleCode.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.txtSecretStyleCode.Name = "txtSecretStyleCode";
this.txtSecretStyleCode.Size = new System.Drawing.Size(133, 23);
@@ -1120,7 +1160,7 @@ namespace TemuKJD.WXForms.ProductForms
//
this.label1.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(22, 133);
this.label1.Location = new System.Drawing.Point(22, 132);
this.label1.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(69, 17);
@@ -1131,7 +1171,7 @@ namespace TemuKJD.WXForms.ProductForms
// chkWXComplateProd
//
this.chkWXComplateProd.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.chkWXComplateProd.Location = new System.Drawing.Point(25, 233);
this.chkWXComplateProd.Location = new System.Drawing.Point(25, 232);
this.chkWXComplateProd.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
this.chkWXComplateProd.Name = "chkWXComplateProd";
this.chkWXComplateProd.Size = new System.Drawing.Size(87, 21);
@@ -1144,7 +1184,7 @@ namespace TemuKJD.WXForms.ProductForms
//
this.lblGroup.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.lblGroup.AutoSize = true;
this.lblGroup.Location = new System.Drawing.Point(270, 37);
this.lblGroup.Location = new System.Drawing.Point(270, 36);
this.lblGroup.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.lblGroup.Name = "lblGroup";
this.lblGroup.Size = new System.Drawing.Size(44, 17);
@@ -1156,7 +1196,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(314, 34);
this.cmbGroupFilter.Location = new System.Drawing.Point(314, 33);
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);
@@ -1167,7 +1207,7 @@ namespace TemuKJD.WXForms.ProductForms
//
this.label15.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(47, 40);
this.label15.Location = new System.Drawing.Point(47, 39);
this.label15.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(44, 17);
@@ -1178,7 +1218,7 @@ namespace TemuKJD.WXForms.ProductForms
// txtExtCode
//
this.txtExtCode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.txtExtCode.Location = new System.Drawing.Point(91, 67);
this.txtExtCode.Location = new System.Drawing.Point(91, 66);
this.txtExtCode.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.txtExtCode.Name = "txtExtCode";
this.txtExtCode.Size = new System.Drawing.Size(133, 23);
@@ -1189,7 +1229,7 @@ namespace TemuKJD.WXForms.ProductForms
//
this.label4.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(47, 70);
this.label4.Location = new System.Drawing.Point(47, 69);
this.label4.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(44, 17);
@@ -1206,7 +1246,7 @@ namespace TemuKJD.WXForms.ProductForms
"是",
"否",
"导出未拉回"});
this.cmbExportToOutServer.Location = new System.Drawing.Point(91, 159);
this.cmbExportToOutServer.Location = new System.Drawing.Point(91, 158);
this.cmbExportToOutServer.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbExportToOutServer.Name = "cmbExportToOutServer";
this.cmbExportToOutServer.Size = new System.Drawing.Size(133, 25);
@@ -1221,7 +1261,7 @@ namespace TemuKJD.WXForms.ProductForms
"",
"是",
"否"});
this.cmbRelation.Location = new System.Drawing.Point(314, 69);
this.cmbRelation.Location = new System.Drawing.Point(314, 68);
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);
@@ -1235,7 +1275,7 @@ namespace TemuKJD.WXForms.ProductForms
this.cmbSort.Items.AddRange(new object[] {
"入库时间",
"认领总数"});
this.cmbSort.Location = new System.Drawing.Point(91, 96);
this.cmbSort.Location = new System.Drawing.Point(91, 95);
this.cmbSort.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbSort.Name = "cmbSort";
this.cmbSort.Size = new System.Drawing.Size(133, 25);
@@ -1247,7 +1287,7 @@ namespace TemuKJD.WXForms.ProductForms
//
this.label6.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(47, 100);
this.label6.Location = new System.Drawing.Point(47, 99);
this.label6.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(44, 17);
@@ -1259,20 +1299,20 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvDbProduct.AllowUserToAddRows = false;
this.dgvDbProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvDbProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
dataGridViewCellStyle18.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvDbProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle18;
this.dgvDbProduct.AutoRowNumber = true;
this.dgvDbProduct.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgvDbProduct.BackgroundColor = System.Drawing.Color.White;
this.dgvDbProduct.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.dgvDbProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle19.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvDbProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle19;
this.dgvDbProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvDbProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
@@ -1310,14 +1350,15 @@ namespace TemuKJD.WXForms.ProductForms
this.colMdyTime,
this.col_edit,
this.col_delete,
this.col_select_product});
this.col_select_product,
this.colDetectionResult});
this.dgvDbProduct.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvDbProduct.Location = new System.Drawing.Point(4, 0);
this.dgvDbProduct.MultiSelectCheckBox = true;
this.dgvDbProduct.Name = "dgvDbProduct";
this.dgvDbProduct.ReadOnly = true;
this.dgvDbProduct.RowTemplate.Height = 23;
this.dgvDbProduct.Size = new System.Drawing.Size(1430, 538);
this.dgvDbProduct.Size = new System.Drawing.Size(1430, 537);
this.dgvDbProduct.TabIndex = 6;
this.dgvDbProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvDbProduct_CellContentClick);
this.dgvDbProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvDbProduct_Scroll);
@@ -1355,8 +1396,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// col_product_name
//
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.col_product_name.DefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.col_product_name.DefaultCellStyle = dataGridViewCellStyle20;
this.col_product_name.FillWeight = 140F;
this.col_product_name.HeaderText = "标题";
this.col_product_name.Name = "col_product_name";
@@ -1399,8 +1440,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// col_spu_id
//
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.col_spu_id.DefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.col_spu_id.DefaultCellStyle = dataGridViewCellStyle21;
this.col_spu_id.HeaderText = "真实商品Id";
this.col_spu_id.Name = "col_spu_id";
this.col_spu_id.ReadOnly = true;
@@ -1422,8 +1463,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colMainCate
//
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colMainCate.DefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colMainCate.DefaultCellStyle = dataGridViewCellStyle22;
this.colMainCate.FillWeight = 50F;
this.colMainCate.HeaderText = "主类目";
this.colMainCate.Name = "colMainCate";
@@ -1431,8 +1472,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// col_cat_name
//
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.col_cat_name.DefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.col_cat_name.DefaultCellStyle = dataGridViewCellStyle23;
this.col_cat_name.FillWeight = 60F;
this.col_cat_name.HeaderText = "类目";
this.col_cat_name.Name = "col_cat_name";
@@ -1447,8 +1488,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// col_ext_code
//
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.col_ext_code.DefaultCellStyle = dataGridViewCellStyle7;
dataGridViewCellStyle24.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.col_ext_code.DefaultCellStyle = dataGridViewCellStyle24;
this.col_ext_code.HeaderText = "货号";
this.col_ext_code.Name = "col_ext_code";
this.col_ext_code.ReadOnly = true;
@@ -1456,8 +1497,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colStyleCode
//
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colStyleCode.DefaultCellStyle = dataGridViewCellStyle8;
dataGridViewCellStyle25.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colStyleCode.DefaultCellStyle = dataGridViewCellStyle25;
this.colStyleCode.HeaderText = "资料编码/真实上家";
this.colStyleCode.Name = "colStyleCode";
this.colStyleCode.ReadOnly = true;
@@ -1465,8 +1506,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colGroup
//
dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colGroup.DefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle26.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colGroup.DefaultCellStyle = dataGridViewCellStyle26;
this.colGroup.HeaderText = "分组";
this.colGroup.Name = "colGroup";
this.colGroup.ReadOnly = true;
@@ -1474,8 +1515,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colPriceText
//
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colPriceText.DefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle27.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colPriceText.DefaultCellStyle = dataGridViewCellStyle27;
this.colPriceText.FillWeight = 60F;
this.colPriceText.HeaderText = "母店价格";
this.colPriceText.Name = "colPriceText";
@@ -1525,8 +1566,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// col_notes
//
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.col_notes.DefaultCellStyle = dataGridViewCellStyle11;
dataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.col_notes.DefaultCellStyle = dataGridViewCellStyle28;
this.col_notes.FillWeight = 70F;
this.col_notes.HeaderText = "备注";
this.col_notes.Name = "col_notes";
@@ -1534,8 +1575,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colHeadWords
//
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colHeadWords.DefaultCellStyle = dataGridViewCellStyle12;
dataGridViewCellStyle29.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colHeadWords.DefaultCellStyle = dataGridViewCellStyle29;
this.colHeadWords.HeaderText = "标题前缀";
this.colHeadWords.Name = "colHeadWords";
this.colHeadWords.ReadOnly = true;
@@ -1543,8 +1584,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colEndWords
//
dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colEndWords.DefaultCellStyle = dataGridViewCellStyle13;
dataGridViewCellStyle30.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colEndWords.DefaultCellStyle = dataGridViewCellStyle30;
this.colEndWords.HeaderText = "标题后缀";
this.colEndWords.Name = "colEndWords";
this.colEndWords.ReadOnly = true;
@@ -1552,16 +1593,16 @@ namespace TemuKJD.WXForms.ProductForms
//
// colFissionWords
//
dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colFissionWords.DefaultCellStyle = dataGridViewCellStyle14;
dataGridViewCellStyle31.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colFissionWords.DefaultCellStyle = dataGridViewCellStyle31;
this.colFissionWords.HeaderText = "裂变标题";
this.colFissionWords.Name = "colFissionWords";
this.colFissionWords.ReadOnly = true;
//
// colGetType
//
dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colGetType.DefaultCellStyle = dataGridViewCellStyle15;
dataGridViewCellStyle32.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colGetType.DefaultCellStyle = dataGridViewCellStyle32;
this.colGetType.FillWeight = 70F;
this.colGetType.HeaderText = "采集来源";
this.colGetType.Name = "colGetType";
@@ -1584,8 +1625,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colAddTime
//
dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colAddTime.DefaultCellStyle = dataGridViewCellStyle16;
dataGridViewCellStyle33.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colAddTime.DefaultCellStyle = dataGridViewCellStyle33;
this.colAddTime.FillWeight = 70F;
this.colAddTime.HeaderText = "入库时间";
this.colAddTime.Name = "colAddTime";
@@ -1593,8 +1634,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colMdyTime
//
dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colMdyTime.DefaultCellStyle = dataGridViewCellStyle17;
dataGridViewCellStyle34.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colMdyTime.DefaultCellStyle = dataGridViewCellStyle34;
this.colMdyTime.FillWeight = 70F;
this.colMdyTime.HeaderText = "更新时间";
this.colMdyTime.Name = "colMdyTime";
@@ -1627,6 +1668,16 @@ namespace TemuKJD.WXForms.ProductForms
this.col_select_product.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.col_select_product.Visible = false;
//
// colDetectionResult
//
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;
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
@@ -1639,7 +1690,7 @@ namespace TemuKJD.WXForms.ProductForms
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0);
this.ucSplitPage1.PageSize = 100;
this.ucSplitPage1.Size = new System.Drawing.Size(453, 25);
this.ucSplitPage1.Size = new System.Drawing.Size(453, 26);
this.ucSplitPage1.TabIndex = 6;
this.ucSplitPage1.TotalCount = ((long)(0));
this.ucSplitPage1.TotalPage = 1;
@@ -1652,22 +1703,9 @@ namespace TemuKJD.WXForms.ProductForms
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(1438, 25);
this.statusBar.Size = new System.Drawing.Size(1438, 26);
this.statusBar.TabIndex = 5;
//
// txt_listing_time
//
this.txt_listing_time.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txt_listing_time.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txt_listing_time.Font = new System.Drawing.Font("微软雅黑", 10F);
this.txt_listing_time.Location = new System.Drawing.Point(888, 73);
this.txt_listing_time.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.txt_listing_time.Name = "txt_listing_time";
this.txt_listing_time.Size = new System.Drawing.Size(101, 25);
this.txt_listing_time.TabIndex = 984;
this.txt_listing_time.Text = "365";
//
// WXUserCollectAuthProdListForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -1764,6 +1802,7 @@ namespace TemuKJD.WXForms.ProductForms
private System.Windows.Forms.Label label8;
private System.Windows.Forms.ComboBox cmbHasFission;
private DevComponents.DotNetBar.PanelEx btnAITitleFission;
private System.Windows.Forms.DataGridViewTextBoxColumn colDetectionResult;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn col_db_id;
private System.Windows.Forms.DataGridViewTextBoxColumn colFromShopId;
@@ -1801,17 +1840,18 @@ namespace TemuKJD.WXForms.ProductForms
private System.Windows.Forms.DataGridViewLinkColumn col_delete;
private System.Windows.Forms.DataGridViewLinkColumn col_select_product;
private DevComponents.DotNetBar.PanelEx btnBatchEditNotes;
private System.Windows.Forms.DateTimePicker dtpStart;
private System.Windows.Forms.DateTimePicker dtpEnd;
private UserComponent.UcCheckBox chkTime;
private System.Windows.Forms.Label label9;
private DevComponents.DotNetBar.PanelEx btnEditNotes;
public System.Windows.Forms.ComboBox cmbNotes;
public System.Windows.Forms.ComboBox cmbBatchEditNotes;
private DevComponents.DotNetBar.PanelEx btnBatchEditCate;
private DevComponents.DotNetBar.PanelEx btn_import_wx;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.Label label9;
private UserComponent.UcCheckBox chkTime;
private System.Windows.Forms.DateTimePicker dtpStart;
private System.Windows.Forms.DateTimePicker dtpEnd;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txt_listing_time;
private DevComponents.DotNetBar.PanelEx btnSafeDetection;
}
}
@@ -28,12 +28,14 @@ using TemuKJD.Extension;
using TemuKJD.PDDForms.ProductSelectForms;
using TemuKJD.ToolForms;
using Work;
using Work.Services;
namespace TemuKJD.WXForms.ProductForms
{
public partial class WXUserCollectAuthProdListForm : BaseGeneralForm
{
ShopLoginInfo shop = null;
private CancellationTokenSource detection;
public CancellationTokenSource cancellationTokenSource { get; set; } = new CancellationTokenSource();
ConcurrentList<KJDDBProduct> lstTemuDbProduct = new ConcurrentList<KJDDBProduct>();
@@ -42,11 +44,13 @@ namespace TemuKJD.WXForms.ProductForms
public WXUserCollectAuthProdListForm()
{
InitializeComponent();
Disposed += (sender, e) => detection?.Cancel();
}
public WXUserCollectAuthProdListForm(ShopLoginInfo _shop)
{
InitializeComponent();
Disposed += (sender, e) => detection?.Cancel();
shop = _shop;
}
@@ -275,7 +279,8 @@ namespace TemuKJD.WXForms.ProductForms
prod.mdy_time.ToString("yy-MM-dd HH:mm"),
"编辑",
"删除",
"认领"
"认领",
"未检测"
);
dgvDbProduct.Rows[rowIndex].Height = dgvDbProduct.Columns["colMainImg"].Width;
@@ -981,6 +986,7 @@ namespace TemuKJD.WXForms.ProductForms
private void WXUserProdListForm_FormClosing(object sender, FormClosingEventArgs e)
{
detection?.Cancel();
this.Hide();
e.Cancel = true;
}
@@ -1275,6 +1281,72 @@ namespace TemuKJD.WXForms.ProductForms
SearchDbProd(1);
}
private async void btnSafeDetection_Click(object sender, EventArgs e)
{
if (detection != null)
{
detection.Cancel();
btnSafeDetection.Text = "正在停止";
btnSafeDetection.Enabled = false;
return;
}
if (pbLoading.Visible || !btnSelect.Enabled || !btn_import_wx.Enabled)
{
BaseMsgForm.ShowInfo("请等待当前操作完成后再检测。");
return;
}
var rows = dgvDbProduct.Rows.Cast<DataGridViewRow>()
.Where(row => row.Cells["colSelect"].Value.ParseToBool()).ToList();
var ids = rows.Select(row => row.Cells["col_db_id"].Value.ParseToInt()).ToList();
var selected = lstTemuDbProduct.Where(prod => ids.Contains(prod.id))
.Select(prod => new ComplianceGoods
{
id = prod.id.ToString(),
name = prod.product_name,
image = prod.main_img,
type = ComplianceGoods.Library
}).ToList();
if (selected.Count == 0)
{
BaseMsgForm.ShowInfo("请选择商品");
return;
}
BaseMsgForm.ShowInfo($"当前AI检测剩余:{BaseClass.ImageAnalysisQuota}张");
var locked = splitContainer1.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 row in rows.Where(r => r.Cells["col_db_id"].Value.ParseToString() == id))
row.Cells["colDetectionResult"].Value = 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;
}
}
}
private void btnAITitleFission_Click(object sender, EventArgs e)
{
var lstProdId = dgvDbProduct.Rows.Cast<DataGridViewRow>().Where(row
@@ -1375,6 +1447,5 @@ namespace TemuKJD.WXForms.ProductForms
SearchDbProd(this.ucSplitPage1.CurrentPage);
}
}
}
@@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@@ -228,6 +225,9 @@
<metadata name="col_select_product.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
+53 -15
View File
@@ -77,16 +77,46 @@ public static class GoodsComplianceService
SavePending(path, pending);
var batch = new ComplianceBatchResult { Unfinished = selected.Count };
foreach (var item in selected)
foreach (ComplianceGoods item in selected)
{
if (cancellationToken.IsCancellationRequested) break;
update(item.id, "读取详情中");
ComplianceResult result;
try
{
//item.type
var product = await Task.Run(() => readProduct(item), cancellationToken);
result = await DetectProductAsync(product, options, words,
number => update(item.id, $"正在检测第 {number} 张图片"), cancellationToken);
if (result.Error == null)
{
try
{
if (item.type == ComplianceGoods.Library)
{
var url = BaseClass.BuildPDDObjString("product/SaveProductSafety");
var data = UserLogin.GetSignature();
data += "&user_name=" + BaseClass.UserName;
data += "&id=" + item.id;
string html = await GetHtml.PostJsonAsync(url, data);
}
else
{
await StoreApiClient.Instance.CloudGoods.SaveProductSafety(new SaveProductSafetyRequest
{
UserName = GetUserName(),
ProductId = product.ProductId,
IsSafe = result.Hits.Length == 0
});
}
}
catch (Exception ex)
{
result.Error = $"检测结果为{result.Status},上报失败:{ex.Message}";
}
}
}
catch (OperationCanceledException) when (cancellationToken.IsCancellationRequested)
{
@@ -149,7 +179,24 @@ public static class GoodsComplianceService
foreach (var product in products)
{
started?.Invoke(product);
completed(product, await DetectProductAsync(product, options, words));
var result = await DetectProductAsync(product, options, words);
if (result.Error == null)
{
try
{
await StoreApiClient.Instance.CloudGoods.SaveProductSafety(new SaveProductSafetyRequest
{
UserName = GetUserName(),
ProductId = product.ProductId,
IsSafe = result.Hits.Length == 0
});
}
catch (Exception ex)
{
result.Error = $"检测结果为{result.Status},上报失败:{ex.Message}";
}
}
completed(product, result);
}
}
@@ -185,6 +232,9 @@ public static class GoodsComplianceService
var jpeg = await DownloadInspectionImageAsync(url);
cancellationToken.ThrowIfCancellationRequested();
var lines = await StoreApiClient.Instance.CloudGoods.RecognizeAsync(BaseClass.GetMd5(url), jpeg);
BaseClass.ImageAnalysisQuota -= 1;
var imageText = string.Join(Environment.NewLine, lines);
texts.AddRange(lines);
result.Hits = Matches(imageText, words);
@@ -202,19 +252,7 @@ public static class GoodsComplianceService
cancellationToken.ThrowIfCancellationRequested();
if (imageNumber == 0) throw new InvalidDataException("所选检测范围内没有图片。");
result.Text = string.Join(Environment.NewLine, texts);
try
{
await StoreApiClient.Instance.CloudGoods.SaveProductSafety(new SaveProductSafetyRequest
{
UserName = GetUserName(),
ProductId = product.ProductId,
IsSafe = result.Hits.Length == 0
});
}
catch (Exception ex)
{
result.Error = $"检测结果为{result.Status},上报失败:{ex.Message}";
}
}
catch (OperationCanceledException) when (cancellationToken.IsCancellationRequested) { throw; }
catch (Exception ex) { result.Error = ex.Message; }
+2
View File
@@ -101,6 +101,8 @@ namespace Work
BaseClass.OemId = BaseRegex.GetStringJson(ref html, "oem_id");
BaseClass.OemName = BaseRegex.GetStringJson(ref html, "oem_name");
BaseClass.IsOemOwner = BaseRegex.GetBoolJson(ref html, "is_oem_owner");
BaseClass.ImageAnalysisQuota = Math.Max(0, BaseRegex.GetIntJson(ref html, "image_analysis_quota"));
#if DEBUG
if (!string.IsNullOrEmpty(BaseRegex.GetStringJson(ref html, "prod_api_url")) && !BaseClass.LoginApiUrl.Contains("localhost") && !BaseClass.LoginApiUrl.Contains("127.0.0.1"))
{