待上传列表查询 批量上传到草稿箱功能
This commit is contained in:
1 parent
f2135af339
commit
13f536e840
31 files changed
+3881
-635
No files matched your search
+5
-5
@@ -301,11 +301,11 @@
|
||||
<Compile Include="KJDForms\ProductSelectForms\DbProductEditNotesForm.Designer.cs">
|
||||
<DependentUpon>DbProductEditNotesForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="KJDForms\ProductSelectForms\ProductSelectListForm.cs">
|
||||
<Compile Include="KJDForms\ProductSelectForms\DbProductSelectListManageForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="KJDForms\ProductSelectForms\ProductSelectListForm.Designer.cs">
|
||||
<DependentUpon>ProductSelectListForm.cs</DependentUpon>
|
||||
<Compile Include="KJDForms\ProductSelectForms\DbProductSelectListManageForm.Designer.cs">
|
||||
<DependentUpon>DbProductSelectListManageForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="KJDForms\ProductSelectForms\UserSelectDbProductForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
@@ -899,8 +899,8 @@
|
||||
<EmbeddedResource Include="KJDForms\ProductSelectForms\DbProductEditNotesForm.resx">
|
||||
<DependentUpon>DbProductEditNotesForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="KJDForms\ProductSelectForms\ProductSelectListForm.resx">
|
||||
<DependentUpon>ProductSelectListForm.cs</DependentUpon>
|
||||
<EmbeddedResource Include="KJDForms\ProductSelectForms\DbProductSelectListManageForm.resx">
|
||||
<DependentUpon>DbProductSelectListManageForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="KJDForms\ProductSelectForms\UserSelectDbProductForm.resx">
|
||||
<DependentUpon>UserSelectDbProductForm.cs</DependentUpon>
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
private string SizeSpecQuery(ShopLoginInfo shop, string prodId, string sizeSpecId)
|
||||
{
|
||||
string url = "https://seller.kuajingmaihuo.com/bg-anniston-mms/sizespec/query";
|
||||
string body = @"{""businessId"":17593513382470,""reusable"":false}";
|
||||
string body = @"{""businessId"":" + sizeSpecId + @",""reusable"":false}";
|
||||
string refere = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?from=productList&productId=" + prodId;
|
||||
return KJDHttpResponse.PostResponse(shop, url, body, refere);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,12 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
|
||||
List<TemuDBProduct> lstTemuDbProduct = new List<TemuDBProduct>();
|
||||
|
||||
public DbProductListForm(ShopLoginInfo _shop = null)
|
||||
public DbProductListForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public DbProductListForm(ShopLoginInfo _shop)
|
||||
{
|
||||
InitializeComponent();
|
||||
shop = _shop;
|
||||
@@ -230,7 +235,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
dgvDbProduct.Rows[e.RowIndex].Cells["col_notes"].Value = dbProduct.notes;
|
||||
break;
|
||||
case "认领":
|
||||
SelectProduct(dbId);
|
||||
Task.Run(() => { SelectProduct(new TemuDBProduct[] { dbProduct }); });
|
||||
break;
|
||||
case "":
|
||||
dgvDbProduct.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)dgvDbProduct.Rows[e.RowIndex].Cells["colSelect"].Value;
|
||||
@@ -240,35 +245,87 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
}
|
||||
}
|
||||
|
||||
private void SelectProduct(string dbId)
|
||||
private void SelectProduct(TemuDBProduct[] prods)
|
||||
{
|
||||
if (shop == null)
|
||||
{
|
||||
BaseMsgForm.ShowError("店铺不能为空!");
|
||||
return;
|
||||
}
|
||||
|
||||
var url = BaseClass.BuildObjString("product/add_user_select_product");
|
||||
var data = UserLogin.GetSignaturex() +
|
||||
"&out_product_id=" + dbId +
|
||||
"&shop_id=" + shop.ShopId +
|
||||
"&shop_account=" + shop.ShopAccount +
|
||||
"&main_user_name=" + shop.UserName +
|
||||
"&sub_user_name=" + shop.SubUserName +
|
||||
"&status=待审核";
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
if (prods == null || prods.Count() == 0)
|
||||
{
|
||||
BaseMsgForm.ShowError("认领商品失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg"));
|
||||
BaseMsgForm.ShowError("认领商品不能为空!");
|
||||
return;
|
||||
}
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.pbLoading.Visible = true;
|
||||
this.statusBar.lblTaskStatus.Text = "正在认领...";
|
||||
this.statusBar.pgbTaskProgress.Value = 0;
|
||||
this.statusBar.pgbTaskProgress.Maximum = prods.Length;
|
||||
this.statusBar.pgbTaskProgress.Text = "0" + "/" + prods.Length;
|
||||
}));
|
||||
|
||||
string errorMsg = "";
|
||||
|
||||
foreach (var prod in prods)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.statusBar.pgbTaskProgress.Value++;
|
||||
}));
|
||||
|
||||
if (prod == null)
|
||||
{
|
||||
errorMsg += "prod null; ";
|
||||
continue;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var url = BaseClass.BuildObjString("product/add_user_select_product");
|
||||
var data = UserLogin.GetSignaturex() +
|
||||
"&out_product_id=" + prod.id +
|
||||
"&shop_id=" + shop.ShopId +
|
||||
"&shop_account=" + shop.ShopAccount +
|
||||
"&main_user_name=" + shop.UserName +
|
||||
"&sub_user_name=" + shop.SubUserName +
|
||||
"&status=待审核";
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
{
|
||||
errorMsg += prod.spu_id + " " + BaseRegex.GetStringJson(ref html, "msg") + "; ";
|
||||
}
|
||||
}
|
||||
catch (Exception ex) {
|
||||
errorMsg += ex.Message + "; ";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(errorMsg))
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgForm.ShowError("认领商品失败,请重试!\r\n" + errorMsg);
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
BaseMsgForm.ShowInfo("认领商品成功!");
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgForm.ShowInfo("认领商品成功!");
|
||||
}));
|
||||
}
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.pbLoading.Visible = false;
|
||||
this.statusBar.lblTaskStatus.Text = "认领完成";
|
||||
this.statusBar.pgbTaskProgress.Value = prods.Length;
|
||||
}));
|
||||
}
|
||||
|
||||
private void DeleteProduct(string dbId)
|
||||
@@ -294,7 +351,25 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
|
||||
private void btnSelect_Click(object sender, EventArgs e)
|
||||
{
|
||||
var lstProdId = dgvDbProduct.Rows.Cast<DataGridViewRow>().Where(row
|
||||
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["col_spu_id"]?.Value.ToString()).ToList();
|
||||
var prodList = this.lstTemuDbProduct.Where(p => lstProdId.Contains(p.spu_id)).ToArray();
|
||||
|
||||
if (prodList.Count() > 0)
|
||||
{
|
||||
this.btnSelect.Enabled = false;
|
||||
Task.Run(() => {
|
||||
SelectProduct(prodList);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.btnSelect.Enabled = true;
|
||||
}));
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
BaseMsgForm.ShowError("请选择商品!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+557
@@ -0,0 +1,557 @@
|
||||
namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
{
|
||||
partial class DbProductSelectListManageForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductSelectListManageForm));
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.txtShopName = new System.Windows.Forms.TextBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.txtShopId = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.btnAdd = new TemuKJD.UserControls.ButtonEx();
|
||||
this.txtSPU = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.txtSKC = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.pnlEmpty = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnSearch = new TemuKJD.UserControls.ButtonEx();
|
||||
this.txtExtCode = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.txtProdName = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.txtCat = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.pbLoading = new System.Windows.Forms.PictureBox();
|
||||
this.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx();
|
||||
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
|
||||
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
|
||||
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.colSelectId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colSupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colSupplierName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colSpuId = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colSkcId = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colProductSkcPic = new System.Windows.Forms.DataGridViewImageColumn();
|
||||
this.colProductName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colProductCat = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colExtCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colDraftId = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.ColDelete = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colOpResult = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
((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.dgvSelectProduct)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.BackColor = System.Drawing.Color.White;
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(1, 33);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.txtShopName);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.label7);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.txtShopId);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.label6);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.btnAdd);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.txtSPU);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.label5);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.txtSKC);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.label1);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.pnlEmpty);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.btnSearch);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.txtExtCode);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.label4);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.txtProdName);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.label3);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.txtCat);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.label2);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1278, 686);
|
||||
this.splitContainer1.SplitterDistance = 53;
|
||||
this.splitContainer1.TabIndex = 2;
|
||||
//
|
||||
// txtShopName
|
||||
//
|
||||
this.txtShopName.Location = new System.Drawing.Point(197, 16);
|
||||
this.txtShopName.Name = "txtShopName";
|
||||
this.txtShopName.Size = new System.Drawing.Size(90, 23);
|
||||
this.txtShopName.TabIndex = 451;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(140, 19);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(68, 17);
|
||||
this.label7.TabIndex = 452;
|
||||
this.label7.Text = "店铺名称:";
|
||||
//
|
||||
// txtShopId
|
||||
//
|
||||
this.txtShopId.Location = new System.Drawing.Point(46, 16);
|
||||
this.txtShopId.Name = "txtShopId";
|
||||
this.txtShopId.Size = new System.Drawing.Size(90, 23);
|
||||
this.txtShopId.TabIndex = 448;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(1, 19);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(56, 17);
|
||||
this.label6.TabIndex = 449;
|
||||
this.label6.Text = "店铺Id:";
|
||||
//
|
||||
// btnSelect
|
||||
//
|
||||
this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnAdd.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnAdd.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnAdd.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnAdd.ForeColor = System.Drawing.Color.White;
|
||||
this.btnAdd.Location = new System.Drawing.Point(1181, 14);
|
||||
this.btnAdd.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnAdd.Name = "btnSelect";
|
||||
this.btnAdd.Size = new System.Drawing.Size(91, 26);
|
||||
this.btnAdd.TabIndex = 444;
|
||||
this.btnAdd.Text = "一键上传草稿";
|
||||
this.btnAdd.UseVisualStyleBackColor = false;
|
||||
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
|
||||
//
|
||||
// txtSPU
|
||||
//
|
||||
this.txtSPU.Location = new System.Drawing.Point(324, 16);
|
||||
this.txtSPU.Name = "txtSPU";
|
||||
this.txtSPU.Size = new System.Drawing.Size(90, 23);
|
||||
this.txtSPU.TabIndex = 434;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(291, 19);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(43, 17);
|
||||
this.label5.TabIndex = 435;
|
||||
this.label5.Text = "SPU:";
|
||||
//
|
||||
// txtSKC
|
||||
//
|
||||
this.txtSKC.Location = new System.Drawing.Point(451, 16);
|
||||
this.txtSKC.Name = "txtSKC";
|
||||
this.txtSKC.Size = new System.Drawing.Size(90, 23);
|
||||
this.txtSKC.TabIndex = 432;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(418, 19);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(43, 17);
|
||||
this.label1.TabIndex = 433;
|
||||
this.label1.Text = "SKC:";
|
||||
//
|
||||
// pnlEmpty
|
||||
//
|
||||
this.pnlEmpty.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.pnlEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.pnlEmpty.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.pnlEmpty.Location = new System.Drawing.Point(996, 14);
|
||||
this.pnlEmpty.Name = "pnlEmpty";
|
||||
this.pnlEmpty.Size = new System.Drawing.Size(56, 26);
|
||||
this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.pnlEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
|
||||
this.pnlEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
|
||||
this.pnlEmpty.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
this.pnlEmpty.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.pnlEmpty.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
|
||||
this.pnlEmpty.Style.GradientAngle = 90;
|
||||
this.pnlEmpty.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.pnlEmpty.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.pnlEmpty.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.pnlEmpty.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.pnlEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.pnlEmpty.TabIndex = 431;
|
||||
this.pnlEmpty.Text = "清空条件";
|
||||
this.pnlEmpty.Click += new System.EventHandler(this.pnlEmpty_Click);
|
||||
//
|
||||
// btnSearch
|
||||
//
|
||||
this.btnSearch.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnSearch.ForeColor = System.Drawing.Color.White;
|
||||
this.btnSearch.Location = new System.Drawing.Point(935, 14);
|
||||
this.btnSearch.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnSearch.Name = "btnSearch";
|
||||
this.btnSearch.Size = new System.Drawing.Size(56, 26);
|
||||
this.btnSearch.TabIndex = 424;
|
||||
this.btnSearch.Text = "搜索";
|
||||
this.btnSearch.UseVisualStyleBackColor = false;
|
||||
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
|
||||
//
|
||||
// txtExtCode
|
||||
//
|
||||
this.txtExtCode.Location = new System.Drawing.Point(835, 16);
|
||||
this.txtExtCode.Name = "txtExtCode";
|
||||
this.txtExtCode.Size = new System.Drawing.Size(90, 23);
|
||||
this.txtExtCode.TabIndex = 429;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(801, 19);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(44, 17);
|
||||
this.label4.TabIndex = 430;
|
||||
this.label4.Text = "货号:";
|
||||
//
|
||||
// txtProdName
|
||||
//
|
||||
this.txtProdName.Location = new System.Drawing.Point(707, 16);
|
||||
this.txtProdName.Name = "txtProdName";
|
||||
this.txtProdName.Size = new System.Drawing.Size(90, 23);
|
||||
this.txtProdName.TabIndex = 427;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(673, 19);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(44, 17);
|
||||
this.label3.TabIndex = 428;
|
||||
this.label3.Text = "标题:";
|
||||
//
|
||||
// txtCat
|
||||
//
|
||||
this.txtCat.Location = new System.Drawing.Point(579, 16);
|
||||
this.txtCat.Name = "txtCat";
|
||||
this.txtCat.Size = new System.Drawing.Size(90, 23);
|
||||
this.txtCat.TabIndex = 425;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(545, 19);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(44, 17);
|
||||
this.label2.TabIndex = 426;
|
||||
this.label2.Text = "类目:";
|
||||
//
|
||||
// splitContainer2
|
||||
//
|
||||
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer2.Name = "splitContainer2";
|
||||
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer2.Panel1
|
||||
//
|
||||
this.splitContainer2.Panel1.Controls.Add(this.pbLoading);
|
||||
this.splitContainer2.Panel1.Controls.Add(this.dgvSelectProduct);
|
||||
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
//
|
||||
// splitContainer2.Panel2
|
||||
//
|
||||
this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1);
|
||||
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(1278, 629);
|
||||
this.splitContainer2.SplitterDistance = 600;
|
||||
this.splitContainer2.TabIndex = 0;
|
||||
//
|
||||
// pbLoading
|
||||
//
|
||||
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
|
||||
this.pbLoading.Location = new System.Drawing.Point(614, 259);
|
||||
this.pbLoading.Name = "pbLoading";
|
||||
this.pbLoading.Size = new System.Drawing.Size(50, 50);
|
||||
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.pbLoading.TabIndex = 7;
|
||||
this.pbLoading.TabStop = false;
|
||||
//
|
||||
// dgvSelectProduct
|
||||
//
|
||||
this.dgvSelectProduct.AllowUserToAddRows = false;
|
||||
this.dgvSelectProduct.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.dgvSelectProduct.BackgroundColor = System.Drawing.Color.White;
|
||||
this.dgvSelectProduct.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.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.colSelect,
|
||||
this.colSelectId,
|
||||
this.colSupplierId,
|
||||
this.colSupplierName,
|
||||
this.colSpuId,
|
||||
this.colSkcId,
|
||||
this.colProductSkcPic,
|
||||
this.colProductName,
|
||||
this.colProductCat,
|
||||
this.colExtCode,
|
||||
this.colMsg,
|
||||
this.colDraftId,
|
||||
this.ColDelete,
|
||||
this.colOpResult});
|
||||
this.dgvSelectProduct.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.dgvSelectProduct.Location = new System.Drawing.Point(4, 0);
|
||||
this.dgvSelectProduct.Name = "dgvSelectProduct";
|
||||
this.dgvSelectProduct.ReadOnly = true;
|
||||
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.dgvSelectProduct.RowsDefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.dgvSelectProduct.RowTemplate.Height = 23;
|
||||
this.dgvSelectProduct.Size = new System.Drawing.Size(1270, 600);
|
||||
this.dgvSelectProduct.TabIndex = 188;
|
||||
this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick);
|
||||
//
|
||||
// ucSplitPage1
|
||||
//
|
||||
this.ucSplitPage1.CurrentPage = 1;
|
||||
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.ucSplitPage1.Location = new System.Drawing.Point(916, 0);
|
||||
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.ucSplitPage1.Name = "ucSplitPage1";
|
||||
this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0);
|
||||
this.ucSplitPage1.Size = new System.Drawing.Size(362, 25);
|
||||
this.ucSplitPage1.TabIndex = 6;
|
||||
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(1278, 25);
|
||||
this.statusBar.TabIndex = 5;
|
||||
//
|
||||
// colSelect
|
||||
//
|
||||
this.colSelect.HeaderText = "选择";
|
||||
this.colSelect.Name = "colSelect";
|
||||
this.colSelect.ReadOnly = true;
|
||||
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
this.colSelect.Width = 30;
|
||||
//
|
||||
// colSelectId
|
||||
//
|
||||
this.colSelectId.HeaderText = "认领Id";
|
||||
this.colSelectId.Name = "colSelectId";
|
||||
this.colSelectId.ReadOnly = true;
|
||||
this.colSelectId.Visible = false;
|
||||
//
|
||||
// colSupplierId
|
||||
//
|
||||
this.colSupplierId.HeaderText = "店铺Id";
|
||||
this.colSupplierId.Name = "colSupplierId";
|
||||
this.colSupplierId.ReadOnly = true;
|
||||
//
|
||||
// colSupplierName
|
||||
//
|
||||
this.colSupplierName.HeaderText = "店铺名称";
|
||||
this.colSupplierName.Name = "colSupplierName";
|
||||
this.colSupplierName.ReadOnly = true;
|
||||
this.colSupplierName.Width = 110;
|
||||
//
|
||||
// colSpuId
|
||||
//
|
||||
this.colSpuId.HeaderText = "商品SPU";
|
||||
this.colSpuId.Name = "colSpuId";
|
||||
this.colSpuId.ReadOnly = true;
|
||||
this.colSpuId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colSpuId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
//
|
||||
// colSkcId
|
||||
//
|
||||
this.colSkcId.FillWeight = 150F;
|
||||
this.colSkcId.HeaderText = "商品SKC";
|
||||
this.colSkcId.Name = "colSkcId";
|
||||
this.colSkcId.ReadOnly = true;
|
||||
this.colSkcId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colSkcId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
this.colSkcId.Width = 80;
|
||||
//
|
||||
// colProductSkcPic
|
||||
//
|
||||
this.colProductSkcPic.HeaderText = "Skc图片";
|
||||
this.colProductSkcPic.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
|
||||
this.colProductSkcPic.Name = "colProductSkcPic";
|
||||
this.colProductSkcPic.ReadOnly = true;
|
||||
this.colProductSkcPic.Width = 60;
|
||||
//
|
||||
// colProductName
|
||||
//
|
||||
this.colProductName.HeaderText = "商品标题";
|
||||
this.colProductName.Name = "colProductName";
|
||||
this.colProductName.ReadOnly = true;
|
||||
this.colProductName.Width = 260;
|
||||
//
|
||||
// colProductCat
|
||||
//
|
||||
this.colProductCat.HeaderText = "商品类目";
|
||||
this.colProductCat.Name = "colProductCat";
|
||||
this.colProductCat.ReadOnly = true;
|
||||
this.colProductCat.Width = 90;
|
||||
//
|
||||
// colExtCode
|
||||
//
|
||||
this.colExtCode.HeaderText = "商品货号";
|
||||
this.colExtCode.Name = "colExtCode";
|
||||
this.colExtCode.ReadOnly = true;
|
||||
//
|
||||
// colMsg
|
||||
//
|
||||
this.colMsg.HeaderText = "状态";
|
||||
this.colMsg.Name = "colMsg";
|
||||
this.colMsg.ReadOnly = true;
|
||||
//
|
||||
// colDraftId
|
||||
//
|
||||
this.colDraftId.HeaderText = "草稿箱Id";
|
||||
this.colDraftId.Name = "colDraftId";
|
||||
this.colDraftId.ReadOnly = true;
|
||||
//
|
||||
// ColDelete
|
||||
//
|
||||
this.ColDelete.HeaderText = "删除";
|
||||
this.ColDelete.Name = "ColDelete";
|
||||
this.ColDelete.ReadOnly = true;
|
||||
this.ColDelete.Visible = false;
|
||||
//
|
||||
// colOpResult
|
||||
//
|
||||
this.colOpResult.HeaderText = "操作结果";
|
||||
this.colOpResult.Name = "colOpResult";
|
||||
this.colOpResult.ReadOnly = true;
|
||||
this.colOpResult.Width = 150;
|
||||
//
|
||||
// DbProductSelectListManageForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.ClientSize = new System.Drawing.Size(1280, 720);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "DbProductSelectListManageForm";
|
||||
this.Text = "用户选品列表";
|
||||
this.TitleText = "用户选品列表";
|
||||
this.Load += new System.EventHandler(this.DbProductSelectListForm_Load);
|
||||
this.VisibleChanged += new System.EventHandler(this.DbProductSelectListManageForm_VisibleChanged);
|
||||
this.Controls.SetChildIndex(this.splitContainer1, 0);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
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.dgvSelectProduct)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private UserControls.ButtonEx btnAdd;
|
||||
private System.Windows.Forms.TextBox txtSPU;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox txtSKC;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private DevComponents.DotNetBar.PanelEx pnlEmpty;
|
||||
private UserControls.ButtonEx btnSearch;
|
||||
private System.Windows.Forms.TextBox txtExtCode;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox txtProdName;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox txtCat;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.SplitContainer splitContainer2;
|
||||
private System.Windows.Forms.PictureBox pbLoading;
|
||||
private UserControls.UcSplitPage ucSplitPage1;
|
||||
private UserControls.StatusBarUserControl statusBar;
|
||||
private System.Windows.Forms.TextBox txtShopName;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.TextBox txtShopId;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private UserComponent.DataGridViewEx dgvSelectProduct;
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierName;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colSpuId;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colSkcId;
|
||||
private System.Windows.Forms.DataGridViewImageColumn colProductSkcPic;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colProductName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colProductCat;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colExtCode;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colMsg;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colDraftId;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn ColDelete;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,818 @@
|
||||
using AllBase.Helper;
|
||||
using AllBase.Model.Result;
|
||||
using TemuKJD.KJDForms.BaseForms;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using AllBase;
|
||||
using Work;
|
||||
using NaiBa.Util.Extension;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using TemuKJD.Extension;
|
||||
using AllBase.Model.Param.TemuProductManage;
|
||||
using System.Threading;
|
||||
|
||||
namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
{
|
||||
public partial class DbProductSelectListManageForm : LRBaseForm
|
||||
{
|
||||
List<TemuDBProductSelect> lstAdminTemuDBProductSelect = new List<TemuDBProductSelect>();
|
||||
|
||||
public DbProductSelectListManageForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void DbProductSelectListForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.ucSplitPage1.PageChange += UcSplitPage1_PageChange;
|
||||
this.dgvSelectProduct.AddSelectorColumn("colSelect");
|
||||
}
|
||||
|
||||
private void DbProductSelectListManageForm_VisibleChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.Visible == true)
|
||||
{
|
||||
this.pbLoading.Visible = true;
|
||||
SearchDbProdSelect(this.ucSplitPage1.CurrentPage);
|
||||
}
|
||||
}
|
||||
|
||||
private void UcSplitPage1_PageChange(object obj)
|
||||
{
|
||||
SearchDbProdSelect(this.ucSplitPage1.CurrentPage);
|
||||
}
|
||||
|
||||
private void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.ucSplitPage1.CurrentPage != 1)
|
||||
this.ucSplitPage1.CurrentPage = 1;
|
||||
else
|
||||
SearchDbProdSelect(1);
|
||||
}
|
||||
|
||||
|
||||
public void SearchDbProdSelect(int page)
|
||||
{
|
||||
if (InvokeRequired)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.pbLoading.Visible = true;
|
||||
this.dgvSelectProduct.Rows.Clear();
|
||||
lstAdminTemuDBProductSelect.Clear();
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.pbLoading.Visible = true;
|
||||
this.dgvSelectProduct.Rows.Clear();
|
||||
lstAdminTemuDBProductSelect.Clear();
|
||||
}
|
||||
Task.Run(() =>
|
||||
{
|
||||
int pageCount;
|
||||
var list = GetSelectProductList(out pageCount, page, 200);
|
||||
lstAdminTemuDBProductSelect.AddRange(list);
|
||||
this.ucSplitPage1.TotalPage = pageCount;
|
||||
|
||||
foreach (var prodSelect in lstAdminTemuDBProductSelect)
|
||||
{
|
||||
Image image = null;
|
||||
try
|
||||
{
|
||||
using (Stream stream = WebRequest.Create(prodSelect.main_img.Replace("https", "http")).GetResponse().GetResponseStream())
|
||||
{
|
||||
image = Image.FromStream(stream);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
int rowIndex = this.dgvSelectProduct.Rows.Add(
|
||||
false,
|
||||
prodSelect.id,
|
||||
prodSelect.shop_id,
|
||||
prodSelect.shop_account,
|
||||
prodSelect.spu_id,
|
||||
prodSelect.skc_id,
|
||||
image,//prod.main_img,
|
||||
prodSelect.product_name,
|
||||
prodSelect.cat_name,
|
||||
prodSelect.ext_code,
|
||||
prodSelect.status,
|
||||
prodSelect.draft_id,
|
||||
"删除");
|
||||
|
||||
dgvSelectProduct.Rows[rowIndex].Height = 60;
|
||||
}));
|
||||
}
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.pbLoading.Visible = false;
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public List<TemuDBProductSelect> GetSelectProductList(out int pageCount, int page = 1, int pageSize = 50)
|
||||
{
|
||||
List<TemuDBProductSelect> list = new List<TemuDBProductSelect>();
|
||||
pageCount = 1;
|
||||
|
||||
var url = BaseClass.BuildObjString("product/admin_get_user_select_product_list");
|
||||
var data = UserLogin.GetSignaturex() +
|
||||
"&page=" + page +
|
||||
"&page_size=" + pageSize +
|
||||
"&search_spu=" + txtSPU.Text +
|
||||
"&search_skc=" + txtSKC.Text +
|
||||
"&search_cat=" + txtCat.Text +
|
||||
"&search_ext_code=" + txtExtCode.Text +
|
||||
"&search_prod_name=" + txtProdName.Text +
|
||||
"&search_shop_id=" + txtShopId.Text +
|
||||
"&search_shop_account=" + txtShopName.Text +
|
||||
//"&status=待审核";
|
||||
"&status=";
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgForm.ShowError("认领商品查询失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg"));
|
||||
}));
|
||||
return new List<TemuDBProductSelect>();
|
||||
}
|
||||
|
||||
int count = BaseRegex.GetIntJson(ref html, "count");
|
||||
pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt();
|
||||
pageCount = Math.Max(pageCount, 1);
|
||||
|
||||
var jArr = JObject.Parse(html)["data"];
|
||||
if (jArr.Count() == 0)
|
||||
return list;
|
||||
var sProd = JsonHelper.SerializeObject(jArr);
|
||||
|
||||
try
|
||||
{
|
||||
list = JsonHelper.DeserializeJsonToList<TemuDBProductSelect>(sProd);
|
||||
return list;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new List<TemuDBProductSelect>();
|
||||
}
|
||||
}
|
||||
|
||||
private void pnlEmpty_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.txtCat.Text = "";
|
||||
this.txtExtCode.Text = "";
|
||||
this.txtProdName.Text = "";
|
||||
this.txtShopId.Text = "";
|
||||
this.txtShopName.Text = "";
|
||||
this.txtSKC.Text = "";
|
||||
this.txtSPU.Text = "";
|
||||
}
|
||||
|
||||
private void dgvSelectProduct_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
if (e.ColumnIndex < 0 || e.RowIndex < 0)
|
||||
return;
|
||||
string headerText = dgvSelectProduct.Columns[e.ColumnIndex].HeaderText;
|
||||
var dbId = dgvSelectProduct.Rows[e.RowIndex].Cells["colSelectId"].Value.ParseToString();
|
||||
var dbProduct = lstAdminTemuDBProductSelect.FirstOrDefault(p => p.id.ToString() == dbId);
|
||||
|
||||
switch (headerText)
|
||||
{
|
||||
case "删除":
|
||||
//if (BaseMsgForm.ShowConfirm("确定删除商品吗?删除后不可恢复!").DialogResult == DialogResult.Cancel)
|
||||
// return;
|
||||
//DeleteProduct(dbId);
|
||||
break;
|
||||
case "编辑备注":
|
||||
//DbProductEditNotesForm editForm = new DbProductEditNotesForm(dbProduct);
|
||||
//editForm.ShowDialog();
|
||||
//dgvDbProduct.Rows[e.RowIndex].Cells["col_notes"].Value = dbProduct.notes;
|
||||
break;
|
||||
case "认领":
|
||||
//Task.Run(() => { SelectProduct(new TemuDBProduct[] { dbProduct }); });
|
||||
break;
|
||||
case "":
|
||||
dgvSelectProduct.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)dgvSelectProduct.Rows[e.RowIndex].Cells["colSelect"].Value;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
var lstProdId = dgvSelectProduct.Rows.Cast<DataGridViewRow>().Where(row
|
||||
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colSelectId"]?.Value.ToString()).ToList();
|
||||
var prodList = this.lstAdminTemuDBProductSelect.Where(p => lstProdId.Contains(p.id.ParseToString())).ToArray();
|
||||
|
||||
if (prodList.Count() > 0)
|
||||
{
|
||||
this.btnAdd.Enabled = false;
|
||||
Task.Run(() =>
|
||||
{
|
||||
AddProductDraft(prodList);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.btnAdd.Enabled = true;
|
||||
}));
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
BaseMsgForm.ShowError("请选择要上传的商品!");
|
||||
}
|
||||
}
|
||||
|
||||
void AddProductDraft(TemuDBProductSelect[] prodSelect)
|
||||
{
|
||||
List<ShopLoginInfo> shopLst = new List<ShopLoginInfo>();
|
||||
|
||||
if (prodSelect == null || prodSelect.Count() == 0)
|
||||
{
|
||||
BaseMsgForm.ShowError("上传内容不能为空!");
|
||||
return;
|
||||
}
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.pbLoading.Visible = true;
|
||||
this.statusBar.lblTaskStatus.Text = "正在上传...";
|
||||
this.statusBar.pgbTaskProgress.Value = 0;
|
||||
this.statusBar.pgbTaskProgress.Maximum = prodSelect.Length;
|
||||
this.statusBar.pgbTaskProgress.Text = "0" + "/" + prodSelect.Length;
|
||||
}));
|
||||
|
||||
string errorMsg = "";
|
||||
|
||||
foreach (var prod in prodSelect)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.statusBar.pgbTaskProgress.Value++;
|
||||
}));
|
||||
|
||||
if (prod == null)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgForm.ShowError("商品为空,将为您跳过该商品!");
|
||||
}));
|
||||
continue;
|
||||
}
|
||||
|
||||
var row = dgvSelectProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r =>
|
||||
r.Cells["colSelectId"]?.Value.ToString() == prod.id.ToString());
|
||||
if (row == null)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgForm.ShowError("商品已被清除,将为您跳过该商品!");
|
||||
}));
|
||||
continue;
|
||||
}
|
||||
|
||||
var shop = shopLst.FirstOrDefault(s=>s.ShopId == prod.shop_id);
|
||||
if (shop == null)
|
||||
{
|
||||
shop = AdminGetServerShop(prod.shop_id);
|
||||
if (shop == null)
|
||||
{
|
||||
shop = new ShopLoginInfo() { ShopId = prod.shop_id };
|
||||
shop.LoginStatus = "不存在";
|
||||
}
|
||||
shopLst.Add(shop);
|
||||
}
|
||||
|
||||
if(shop.LoginStatus != "登录成功")
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
row.Cells["colOpResult"].Value = "店铺" + shop.LoginStatus;
|
||||
}));
|
||||
continue;
|
||||
}
|
||||
|
||||
var temuDBProd = GetProductDetail(prod.out_product_Id.ToString());
|
||||
if (temuDBProd == null)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
row.Cells["colOpResult"].Value = "选品数据库商品已被清除";
|
||||
}));
|
||||
continue;
|
||||
}
|
||||
|
||||
var prodDetailStr = GetHtml.UrlDecode(temuDBProd.product_json);
|
||||
var productDetail = JsonHelper.DeserializeJsonToObject<TemuProductInfo>(prodDetailStr);
|
||||
var result = UploadProduct(shop, productDetail);
|
||||
Thread.Sleep(200);
|
||||
if (result.StartsWith("上传草稿箱成功"))
|
||||
{
|
||||
var url = BaseClass.BuildObjString("product/mdy_user_select_product_status");
|
||||
var data = UserLogin.GetSignaturex() +
|
||||
"&db_id=" + prod.id +
|
||||
"&draft_id=" + result.Replace("上传草稿箱成功", "") +
|
||||
"&status=已上传";
|
||||
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
row.Cells["colOpResult"].Value = "已成功上传草稿箱但保存到服务端失败:" + BaseRegex.GetStringJson(ref html, "msg") + "; ";
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
row.Cells["colDraftId"].Value = result.Replace("上传草稿箱成功", ""); // 草稿箱id
|
||||
row.Cells["colOpResult"].Value = "已成功上传草稿箱";
|
||||
}));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
row.Cells["colOpResult"].Value = result;
|
||||
}));
|
||||
}
|
||||
|
||||
//try
|
||||
//{
|
||||
// var url = BaseClass.BuildObjString("product/add_user_select_product");
|
||||
// var data = UserLogin.GetSignaturex() +
|
||||
// "&out_product_id=" + prod.id +
|
||||
// "&shop_id=" + shop.ShopId +
|
||||
// "&shop_account=" + shop.ShopAccount +
|
||||
// "&main_user_name=" + shop.UserName +
|
||||
// "&sub_user_name=" + shop.SubUserName +
|
||||
// "&status=待审核";
|
||||
// var html = GetHtml.PostUtf8(url, data);
|
||||
// if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
// html = GetHtml.PostUtf8(url, data);
|
||||
// if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
// html = GetHtml.PostUtf8(url, data);
|
||||
// if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
// {
|
||||
// errorMsg += prod.spu_id + " " + BaseRegex.GetStringJson(ref html, "msg") + "; ";
|
||||
// }
|
||||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
// errorMsg += ex.Message + "; ";
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(errorMsg))
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgForm.ShowError("认领商品失败,请重试!\r\n" + errorMsg);
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgForm.ShowInfo("认领商品成功!");
|
||||
}));
|
||||
}
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.pbLoading.Visible = false;
|
||||
this.statusBar.lblTaskStatus.Text = "上传草稿完成";
|
||||
this.statusBar.pgbTaskProgress.Value = prodSelect.Length;
|
||||
}));
|
||||
}
|
||||
|
||||
public ShopLoginInfo AdminGetServerShop(string shop_id)
|
||||
{
|
||||
List<ShopLoginInfo> list = new List<ShopLoginInfo>();
|
||||
|
||||
var url = BaseClass.BuildObjString("shop/admin_get_shop_list");
|
||||
var data = UserLogin.GetSignaturex() +
|
||||
"&search_id=" + shop_id;
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html)
|
||||
|| !html.Contains("shop_id") || !html.Contains("shop_account") || !html.Contains("login_pass"))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var jArr = JObject.Parse(html)["data"];
|
||||
if (jArr.Count() == 0)
|
||||
return null;
|
||||
|
||||
foreach (JObject jObj in jArr)
|
||||
{
|
||||
string shopStr = jObj.ToString();
|
||||
ShopLoginInfo shop = new ShopLoginInfo();
|
||||
shop.DbId = BaseRegex.GetStringJson(ref shopStr, "id");
|
||||
if (shop.DbId == null)
|
||||
continue;
|
||||
shop.LoginName = BaseRegex.GetStringJson(ref shopStr, "login_name");
|
||||
shop.Password = BaseRegex.GetStringJson(ref shopStr, "login_pass");
|
||||
shop.ShopId = BaseRegex.GetStringJson(ref shopStr, "shop_id");
|
||||
shop.ShopAccount = BaseRegex.GetStringJson(ref shopStr, "shop_account");
|
||||
shop.UserName = BaseRegex.GetStringJson(ref shopStr, "user_name");
|
||||
shop.SubUserName = BaseRegex.GetStringJson(ref shopStr, "sub_user_name");
|
||||
shop.GroupName = BaseRegex.GetStringJson(ref shopStr, "shop_group");
|
||||
shop.Cookies = BaseRegex.GetStringJson(ref shopStr, "cookie");
|
||||
shop.Cookies = shop.Cookies.Replace("&", "&").Replace("%", "%").Replace("+", "+");
|
||||
shop.CompanyName = BaseRegex.GetStringJson(ref shopStr, "company_name");
|
||||
shop.Notes = BaseRegex.GetStringJson(ref shopStr, "notes");
|
||||
shop.LoginStatus = BaseRegex.GetStringJson(ref shopStr, "login_status");
|
||||
|
||||
list.Add(shop);
|
||||
}
|
||||
return list.FirstOrDefault();
|
||||
}
|
||||
|
||||
public TemuDBProduct GetProductDetail(string prodDbId)
|
||||
{
|
||||
if (string.IsNullOrEmpty(prodDbId))
|
||||
return null;
|
||||
|
||||
List<TemuDBProduct> list = new List<TemuDBProduct>();
|
||||
|
||||
var url = BaseClass.BuildObjString("product/get_product_detail_list");
|
||||
var data = "";
|
||||
|
||||
data = UserLogin.GetSignaturex() + "&search_db_ids=" + prodDbId;
|
||||
|
||||
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<TemuDBProduct>(sProd);
|
||||
return list.FirstOrDefault();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
string UploadProduct(ShopLoginInfo shop, TemuProductInfo prodInfo)
|
||||
{
|
||||
if (shop == null || string.IsNullOrEmpty(shop.ShopId) || shop.LoginStatus != "登录成功")
|
||||
{
|
||||
return "店铺为空或未登录!";
|
||||
}
|
||||
|
||||
TemuProductParam prodParam = new TemuProductParam();
|
||||
prodParam.carouselImageI18nReqs = prodInfo.carouselImageI18nVOList;
|
||||
prodParam.carouselImageUrls = prodInfo.carouselImageUrls;
|
||||
prodParam.cat1Id = prodInfo.categories.cat1.catId;
|
||||
prodParam.cat2Id = prodInfo.categories.cat2.catId;
|
||||
prodParam.cat3Id = prodInfo.categories.cat3.catId;
|
||||
prodParam.cat4Id = prodInfo.categories.cat4.catId;
|
||||
prodParam.cat5Id = prodInfo.categories.cat5.catId;
|
||||
prodParam.cat6Id = prodInfo.categories.cat6.catId;
|
||||
prodParam.cat7Id = prodInfo.categories.cat7.catId;
|
||||
prodParam.cat8Id = prodInfo.categories.cat8.catId;
|
||||
prodParam.cat9Id = prodInfo.categories.cat9.catId;
|
||||
prodParam.cat10Id = prodInfo.categories.cat10.catId;
|
||||
prodParam.goodsAdvantageLabelTypes = prodInfo.goodsAdvantageLabelVOList != null ?
|
||||
prodInfo.goodsAdvantageLabelVOList : new List<object>();
|
||||
prodParam.goodsLayerDecorationCustomizeI18nReqs = prodInfo.goodsLayerDecorationCustomizeI18nVOList;
|
||||
prodParam.goodsLayerDecorationReqs = new List<GoodsLayerDecorationReqsItem>();
|
||||
foreach (var goodsLayerDecorationVOInfo in
|
||||
(prodInfo.goodsLayerDecorationVOList == null ? new List<TemuGoodsLayerDecorationVO>() : prodInfo.goodsLayerDecorationVOList))
|
||||
{
|
||||
var goodsLayerDecorationItem = new GoodsLayerDecorationReqsItem()
|
||||
{
|
||||
floorId = goodsLayerDecorationVOInfo.floorId,
|
||||
key = goodsLayerDecorationVOInfo.key,
|
||||
lang = goodsLayerDecorationVOInfo.lang,
|
||||
priority = goodsLayerDecorationVOInfo.priority,
|
||||
type = goodsLayerDecorationVOInfo.type,
|
||||
contentList = new List<ContentListItem>(),
|
||||
};
|
||||
foreach (var contentInfo in goodsLayerDecorationVOInfo.contentList)
|
||||
{
|
||||
var contentItem = new ContentListItem()
|
||||
{
|
||||
width = contentInfo.width,
|
||||
height = contentInfo.height,
|
||||
imgUrl = contentInfo.imgUrl,
|
||||
};
|
||||
goodsLayerDecorationItem.contentList.Add(contentItem);
|
||||
}
|
||||
prodParam.goodsLayerDecorationReqs.Add(goodsLayerDecorationItem);
|
||||
}
|
||||
prodParam.goodsModelReqs = prodInfo.goodsModelList != null ? prodInfo.goodsModelList : new List<object>();
|
||||
prodParam.materialImgUrl = prodInfo.materialImgUrl;
|
||||
prodParam.materialMultiLanguages = prodInfo.productLocalExtAttr.materialMultiLanguages != null ?
|
||||
prodInfo.productLocalExtAttr.materialMultiLanguages : new List<object>();
|
||||
prodParam.personalizationSwitch = prodInfo.productWhExtAttr.personalizationSwitch.ParseToInt();
|
||||
|
||||
var carouseVideoVOList = JsonHelper.SerializeObject(prodInfo.carouseVideoVOList);
|
||||
prodParam.productCarouseVideoReqList = JsonHelper.DeserializeJsonToList<productCarouseVideoReqItem>(carouseVideoVOList);
|
||||
if (prodParam.productCarouseVideoReqList == null)
|
||||
prodParam.productCarouseVideoReqList = new List<productCarouseVideoReqItem>();
|
||||
//此处打开商品编辑详情无法获取到,如何查询存疑
|
||||
prodParam.productComplianceStatementReq = new ProductComplianceStatementReq
|
||||
{
|
||||
protocolVersion = "V1.0",
|
||||
protocolUrl = "https://bdl.cdnfe.com/upload_bdl/seller-protocol/00f56a69-7bee-4768-8cef-e1682ffd58e3.html",
|
||||
};
|
||||
prodParam.productDetailVideoReqList = prodInfo.detailVideoVOList;
|
||||
//是否需要存疑
|
||||
prodParam.productDraftId = 0;
|
||||
prodParam.productGuideFileI18nReqs = prodInfo.productGuideFileI18nList;
|
||||
prodParam.productGuideFileNewReqList = prodInfo.productGuideFileNewVOList;
|
||||
prodParam.productName = prodInfo.productName;
|
||||
prodParam.productNonAuditExtAttrReq = new ProductNonAuditExtAttrReq()
|
||||
{
|
||||
california65WarningInfoReq = new California65WarningInfoReq()
|
||||
{
|
||||
california65ChemicalNames = prodInfo.productNonAuditExtAttr.california65WarningInfoVO.california65ChemicalNames,
|
||||
},
|
||||
cosmeticInfoReq = new CosmeticInfoReq()
|
||||
{
|
||||
},
|
||||
};
|
||||
//内容存疑
|
||||
prodParam.productOriginCertFileReqs = new List<object>();
|
||||
prodParam.productOuterPackageImageReqs = new List<ProductOuterPackageImageReqsItem>();
|
||||
foreach (var picInfo in prodInfo.outerPackageImages)
|
||||
{
|
||||
prodParam.productOuterPackageImageReqs.Add(new ProductOuterPackageImageReqsItem()
|
||||
{
|
||||
imageUrl = picInfo.imageUrl,
|
||||
});
|
||||
}
|
||||
prodParam.productOuterPackageReq = new ProductOuterPackageReq()
|
||||
{
|
||||
packageShape = prodInfo.productWhExtAttr.productOuterPackage.packageShape,
|
||||
packageType = prodInfo.productWhExtAttr.productOuterPackage.packageType,
|
||||
};
|
||||
prodParam.productPropertyReqs = new List<ProductPropertyReqsItem>();
|
||||
foreach (var propInfo in prodInfo.productPropertyList)
|
||||
{
|
||||
prodParam.productPropertyReqs.Add(new ProductPropertyReqsItem
|
||||
{
|
||||
numberInputValue = propInfo.numberInputValue,
|
||||
pid = propInfo.pid,
|
||||
propName = propInfo.propName,
|
||||
propValue = propInfo.propValue,
|
||||
refPid = propInfo.refPid,
|
||||
templatePid = propInfo.templatePid,
|
||||
valueExtendInfo = propInfo.valueExtendInfo,
|
||||
valueUnit = propInfo.valueUnit,
|
||||
vid = propInfo.vid,
|
||||
});
|
||||
}
|
||||
prodParam.productSaleExtAttrReq = new ProductSaleExtAttrReq
|
||||
{
|
||||
bodyShape = prodInfo.productSaleExtAttr.bodyShape,
|
||||
};
|
||||
prodParam.productSpecPropertyReqs = new List<ProductSpecPropertyReqsItem>();
|
||||
foreach (var specPropInfo in prodInfo.productSpecPropertyVOS)
|
||||
{
|
||||
try
|
||||
{
|
||||
var jStr = JsonHelper.SerializeObject(specPropInfo);
|
||||
ProductSpecPropertyReqsItem specItem = JsonHelper.DeserializeJsonToObject<ProductSpecPropertyReqsItem>(jStr);
|
||||
prodParam.productSpecPropertyReqs.Add(specItem);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BaseMsgForm.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
prodParam.productWhExtAttrReq = new ProductWhExtAttrReq()
|
||||
{
|
||||
outerGoodsUrl = prodInfo.productWhExtAttr.outerGoodsUrl,
|
||||
productOrigin = new ProductOrigin
|
||||
{
|
||||
countryShortName = prodInfo.productWhExtAttr.productOrigin.countryShortName,
|
||||
region2Id = prodInfo.productWhExtAttr.productOrigin.region2Id,
|
||||
},
|
||||
};
|
||||
prodParam.sensitiveTransNormalFileReqs = prodInfo.productWhExtAttr.sensitiveTransNormalFiles;
|
||||
prodParam.showSizeTemplateIds = prodInfo.showSizeTemplateIds != null ? prodInfo.showSizeTemplateIds : new List<long?>();
|
||||
prodParam.sizeTemplateIds = prodInfo.sizeTemplateIds != null ? prodInfo.sizeTemplateIds : new List<long?>();
|
||||
|
||||
prodParam.productSkcReqs = new List<ProductSkcReqsItem>();
|
||||
foreach (var skcInfo in prodInfo.productSkcList)
|
||||
{
|
||||
ProductSkcReqsItem skcItem = new ProductSkcReqsItem();
|
||||
skcItem.extCode = skcInfo.extCode;
|
||||
skcItem.isBasePlate = 0;
|
||||
skcItem.mainProductSkuSpecReqs = new List<MainProductSkuSpecReqsItem>();
|
||||
foreach (var skuSpecInfo in skcInfo.productSkcSpecList)
|
||||
{
|
||||
skcItem.mainProductSkuSpecReqs.Add(new MainProductSkuSpecReqsItem
|
||||
{
|
||||
parentSpecId = skuSpecInfo.parentSpecId,
|
||||
parentSpecName = skuSpecInfo.parentSpecName,
|
||||
specId = skuSpecInfo.specId,
|
||||
specName = skuSpecInfo.specName,
|
||||
});
|
||||
}
|
||||
skcItem.previewImgUrls = skcInfo.previewImgUrls;
|
||||
skcItem.productSkcCarouselImageI18nReqs = skcInfo.productSkcCarouselImageI18nVOList;
|
||||
skcItem.productSkcId = 0;
|
||||
skcItem.productSkuReqs = new List<ProductSkuReqsItem>();
|
||||
foreach (var skuInfo in skcInfo.productSkuList)
|
||||
{
|
||||
ProductSkuReqsItem skuItem = new ProductSkuReqsItem();
|
||||
skuItem.currencyType = skuInfo.currencyType;
|
||||
skuItem.extCode = skuInfo.extCode;
|
||||
skuItem.productSkuAccessoriesReq = new ProductSkuAccessoriesReq()
|
||||
{
|
||||
productSkuAccessories = skuInfo.productSkuSaleExtAttr.productSkuAccessories?.productSkuAccessories,
|
||||
};
|
||||
skuItem.productSkuId = 0;
|
||||
skuItem.productSkuMultiPackReq = new ProductSkuMultiPackReq()
|
||||
{
|
||||
numberOfPieces = skuInfo.productSkuMultiPack.numberOfPieces,
|
||||
pieceUnitCode = skuInfo.productSkuMultiPack.pieceUnitCode,
|
||||
productSkuNetContentReq = JsonHelper.DeserializeJsonToObject<ProductSkuNetContentReq>(
|
||||
JsonHelper.SerializeObject(skuInfo.productSkuMultiPack.productSkuNetContent)),
|
||||
skuClassification = skuInfo.productSkuMultiPack.skuClassification,
|
||||
};
|
||||
skuItem.productSkuNonAuditExtAttrReq = JsonHelper.DeserializeJsonToObject<ProductSkuNonAuditExtAttrReq>(
|
||||
JsonHelper.SerializeObject(skuInfo.productSkuNonAuditExtAttr));
|
||||
if (skuItem.productSkuNonAuditExtAttrReq == null)
|
||||
skuItem.productSkuNonAuditExtAttrReq = new ProductSkuNonAuditExtAttrReq();
|
||||
skuItem.productSkuSpecReqs = new List<ProductSkuSpecReqsItem>();
|
||||
int groupId = 0;
|
||||
foreach (var skuSpecInfo in skuInfo.productSkuSpecList)
|
||||
{
|
||||
groupId++;
|
||||
ProductSkuSpecReqsItem skuSpecItem = new ProductSkuSpecReqsItem()
|
||||
{
|
||||
groupId = groupId,
|
||||
parentSpecId = skuSpecInfo.parentSpecId,
|
||||
parentSpecName = skuSpecInfo.parentSpecName,
|
||||
specId = skuSpecInfo.specId,
|
||||
specName = skuSpecInfo.specName,
|
||||
vid = prodParam.productSpecPropertyReqs.FirstOrDefault(p => p.specId == skuSpecInfo.specId)?.vid,
|
||||
};
|
||||
skuItem.productSkuSpecReqs.Add(skuSpecItem);
|
||||
}
|
||||
skuItem.productSkuSuggestedPriceReq = JsonHelper.DeserializeJsonToObject<ProductSkuSuggestedPriceReq>(
|
||||
JsonHelper.SerializeObject(skuInfo.productSkuSuggestedPrice));
|
||||
// 建议售价不能为空
|
||||
if (skuItem.productSkuSuggestedPriceReq == null)
|
||||
{
|
||||
skuItem.productSkuSuggestedPriceReq = new ProductSkuSuggestedPriceReq();
|
||||
}
|
||||
if (skuItem.productSkuSuggestedPriceReq.suggestedPrice == null && skuItem.productSkuSuggestedPriceReq.specialSuggestedPrice == null)
|
||||
{
|
||||
skuItem.productSkuSuggestedPriceReq.specialSuggestedPrice = "NA";
|
||||
}
|
||||
skuItem.productSkuThumbUrlI18nReqs = skuInfo.productSkuThumbUrlI18nVOList;
|
||||
skuItem.productSkuUsSuggestedPriceReq = JsonHelper.DeserializeJsonToObject<ProductSkuUsSuggestedPriceReq>(
|
||||
JsonHelper.SerializeObject(skuInfo.productSkuUsSuggestedPrice));
|
||||
skuItem.productSkuWhExtAttrReq = new ProductSkuWhExtAttrReq()
|
||||
{
|
||||
productSkuBarCodeReqs = skuInfo.productSkuWhExtAttr.productSkuBarCodes,
|
||||
productSkuSensitiveAttrReq = new ProductSkuSensitiveAttrReq()
|
||||
{
|
||||
isSensitive = skuInfo.productSkuWhExtAttr.productSkuSensitiveAttr.isSensitive,
|
||||
sensitiveList = skuInfo.productSkuWhExtAttr.productSkuSensitiveAttr.sensitiveList,
|
||||
},
|
||||
productSkuSensitiveLimitReq = JsonHelper.DeserializeJsonToObject<ProductSkuSensitiveLimitReq>(
|
||||
JsonHelper.SerializeObject(skuInfo.productSkuWhExtAttr.productSkuSensitiveLimit)),
|
||||
productSkuVolumeReq = JsonHelper.DeserializeJsonToObject<ProductSkuVolumeReq>(
|
||||
JsonHelper.SerializeObject(skuInfo.productSkuWhExtAttr.productSkuVolume)),
|
||||
productSkuWeightReq = JsonHelper.DeserializeJsonToObject<ProductSkuWeightReq>(
|
||||
JsonHelper.SerializeObject(skuInfo.productSkuWhExtAttr.productSkuWeight)),
|
||||
};
|
||||
skuItem.supplierPrice = skuInfo.supplierPrice;
|
||||
skuItem.thumbUrl = skuInfo.thumbUrl;
|
||||
|
||||
skcItem.productSkuReqs.Add(skuItem);
|
||||
}
|
||||
prodParam.productSkcReqs.Add(skcItem);
|
||||
}
|
||||
|
||||
long catId = prodParam.cat10Id.ParseToLong();
|
||||
if (catId == 0) catId = prodParam.cat9Id.ParseToLong();
|
||||
if (catId == 0) catId = prodParam.cat8Id.ParseToLong();
|
||||
if (catId == 0) catId = prodParam.cat7Id.ParseToLong();
|
||||
if (catId == 0) catId = prodParam.cat6Id.ParseToLong();
|
||||
if (catId == 0) catId = prodParam.cat5Id.ParseToLong();
|
||||
if (catId == 0) catId = prodParam.cat4Id.ParseToLong();
|
||||
if (catId == 0) catId = prodParam.cat3Id.ParseToLong();
|
||||
if (catId == 0) catId = prodParam.cat2Id.ParseToLong();
|
||||
if (catId == 0) catId = prodParam.cat1Id.ParseToLong();
|
||||
|
||||
var html = AddDraft(shop, catId.ToString());
|
||||
if (html.Contains("{\"success\":true"))
|
||||
prodParam.productDraftId = BaseRegex.GetLongJson(ref html, "productDraftId");
|
||||
else
|
||||
{
|
||||
var error = BaseRegex.GetStringJson(ref html, "errorMsg");
|
||||
return "上传失败" + error;
|
||||
}
|
||||
|
||||
if (prodParam.productDraftId <= 0)
|
||||
{
|
||||
return "上传失败" + html;
|
||||
}
|
||||
|
||||
html = SaveDraft(shop, prodParam.productDraftId.ToString(), prodParam);
|
||||
if (html.Contains("{\"success\":true"))
|
||||
return "上传草稿箱成功" + prodParam.productDraftId.ToString();
|
||||
else
|
||||
{
|
||||
var error = BaseRegex.GetStringJson(ref html, "errorMsg");
|
||||
return "上传草稿箱失败" + error;
|
||||
}
|
||||
|
||||
#region 草稿箱后立即上传商品 暂时注释
|
||||
//Thread.Sleep(Randomx.GetId(2000, 3000));
|
||||
//html = AddProduct(shop, prodParam.productDraftId.ToString(), prodParam);
|
||||
//if (html.Contains("{\"success\":true"))
|
||||
// BaseMsgForm.ShowInfo("上传商品成功");
|
||||
//else
|
||||
//{
|
||||
// var error = BaseRegex.GetStringJson(ref html, "errorMsg");
|
||||
// if (string.IsNullOrWhiteSpace(error))
|
||||
// error = BaseRegex.GetStringJson(ref html, "error_msg");
|
||||
// BaseMsgForm.ShowError(("上传商品失败\r\n" + error + "\r\n请在草稿箱查找商品!").Replace("\r\n\r\n", "\r\n"));
|
||||
// return;
|
||||
//}
|
||||
#endregion
|
||||
}
|
||||
|
||||
private string AddDraft(ShopLoginInfo shop, string catId)
|
||||
{
|
||||
string url = "https://seller.kuajingmaihuo.com/bg-visage-mms/product/draft/add";
|
||||
string refere = "https://seller.kuajingmaihuo.com/goods/product-create/category?from=productList";
|
||||
string body = @"{""catId"":" + catId + "}";
|
||||
return KJDHttpResponse.PostResponse(shop, url, body, refere);
|
||||
}
|
||||
|
||||
private string SaveDraft(ShopLoginInfo shop, string draftId, TemuProductParam prodParam)
|
||||
{
|
||||
string url = "https://seller.kuajingmaihuo.com/bg-visage-mms/product/draft/save";
|
||||
string body = JsonHelper.SerializeObject(prodParam);
|
||||
string refere = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId=" +
|
||||
draftId + "&from=productDraftList";
|
||||
return KJDHttpResponse.PostResponse(shop, url, body, refere);
|
||||
}
|
||||
|
||||
|
||||
private string AddProduct(ShopLoginInfo shop, string draftId, TemuProductParam prodParam)
|
||||
{
|
||||
string url = "https://seller.kuajingmaihuo.com/bg-visage-mms/product/add";
|
||||
string body = JsonHelper.SerializeObject(prodParam);
|
||||
string refere = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId=" +
|
||||
draftId + "&from=productDraftList";
|
||||
return KJDHttpResponse.PostResponse(shop, url, body, refere);
|
||||
}
|
||||
}
|
||||
}
|
||||
+39
@@ -117,6 +117,45 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colSelectId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colSupplierId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colSupplierName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colSpuId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colProductSkcPic.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colProductName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colProductCat.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colExtCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colMsg.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colDraftId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColDelete.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colOpResult.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</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>
|
||||
@@ -1,322 +0,0 @@
|
||||
namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
{
|
||||
partial class ProductSelectListForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProductSelectListForm));
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.txtNotes = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.cmbGroup = new System.Windows.Forms.ComboBox();
|
||||
this.txtBuyAccount = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.txtChatAccount = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.txtUploadAccount = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.txtShopPassword = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.txtLoginName = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.btnOk = new TemuKJD.UserControls.ButtonEx();
|
||||
this.panel2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.BackColor = System.Drawing.Color.White;
|
||||
this.panel2.Controls.Add(this.label8);
|
||||
this.panel2.Controls.Add(this.txtNotes);
|
||||
this.panel2.Controls.Add(this.label7);
|
||||
this.panel2.Controls.Add(this.cmbGroup);
|
||||
this.panel2.Controls.Add(this.txtBuyAccount);
|
||||
this.panel2.Controls.Add(this.label6);
|
||||
this.panel2.Controls.Add(this.txtChatAccount);
|
||||
this.panel2.Controls.Add(this.label4);
|
||||
this.panel2.Controls.Add(this.txtUploadAccount);
|
||||
this.panel2.Controls.Add(this.label3);
|
||||
this.panel2.Controls.Add(this.txtShopPassword);
|
||||
this.panel2.Controls.Add(this.label2);
|
||||
this.panel2.Controls.Add(this.txtLoginName);
|
||||
this.panel2.Controls.Add(this.label1);
|
||||
this.panel2.Controls.Add(this.label5);
|
||||
this.panel2.Controls.Add(this.btnOk);
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel2.Location = new System.Drawing.Point(1, 33);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(1011, 648);
|
||||
this.panel2.TabIndex = 1;
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(29, 135);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(56, 17);
|
||||
this.label8.TabIndex = 386;
|
||||
this.label8.Text = " 备注";
|
||||
this.label8.Visible = false;
|
||||
//
|
||||
// txtNotes
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtNotes.Border.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
||||
this.txtNotes.Border.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
||||
this.txtNotes.Border.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
||||
this.txtNotes.Border.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
||||
this.txtNotes.Border.Class = "CrumbBarBackgroundKey";
|
||||
this.txtNotes.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.txtNotes.Border.PaddingBottom = 2;
|
||||
this.txtNotes.Border.PaddingLeft = 2;
|
||||
this.txtNotes.Border.PaddingRight = 2;
|
||||
this.txtNotes.Border.PaddingTop = 2;
|
||||
this.txtNotes.Location = new System.Drawing.Point(91, 133);
|
||||
this.txtNotes.Name = "txtNotes";
|
||||
this.txtNotes.Size = new System.Drawing.Size(172, 23);
|
||||
this.txtNotes.TabIndex = 385;
|
||||
this.txtNotes.Visible = false;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.ForeColor = System.Drawing.Color.DarkGray;
|
||||
this.label7.Location = new System.Drawing.Point(31, 214);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(164, 17);
|
||||
this.label7.TabIndex = 384;
|
||||
this.label7.Text = "登录密码为空表示不更新密码";
|
||||
this.label7.Visible = false;
|
||||
//
|
||||
// cmbGroup
|
||||
//
|
||||
this.cmbGroup.FormattingEnabled = true;
|
||||
this.cmbGroup.Items.AddRange(new object[] {
|
||||
"客服",
|
||||
"采购",
|
||||
"上货",
|
||||
"数据",
|
||||
"登录"});
|
||||
this.cmbGroup.Location = new System.Drawing.Point(91, 269);
|
||||
this.cmbGroup.Name = "cmbGroup";
|
||||
this.cmbGroup.Size = new System.Drawing.Size(172, 25);
|
||||
this.cmbGroup.TabIndex = 383;
|
||||
this.cmbGroup.Visible = false;
|
||||
//
|
||||
// txtBuyAccount
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtBuyAccount.Border.Class = "CrumbBarBackgroundKey";
|
||||
this.txtBuyAccount.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.txtBuyAccount.Border.PaddingBottom = 2;
|
||||
this.txtBuyAccount.Border.PaddingLeft = 2;
|
||||
this.txtBuyAccount.Border.PaddingRight = 2;
|
||||
this.txtBuyAccount.Border.PaddingTop = 2;
|
||||
this.txtBuyAccount.Location = new System.Drawing.Point(91, 240);
|
||||
this.txtBuyAccount.Name = "txtBuyAccount";
|
||||
this.txtBuyAccount.Size = new System.Drawing.Size(172, 23);
|
||||
this.txtBuyAccount.TabIndex = 382;
|
||||
this.txtBuyAccount.Visible = false;
|
||||
this.txtBuyAccount.WatermarkText = "点击添加店铺子账户";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(29, 243);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(56, 17);
|
||||
this.label6.TabIndex = 381;
|
||||
this.label6.Text = "采购账户";
|
||||
this.label6.Visible = false;
|
||||
//
|
||||
// txtChatAccount
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtChatAccount.Border.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
||||
this.txtChatAccount.Border.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
||||
this.txtChatAccount.Border.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
||||
this.txtChatAccount.Border.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
||||
this.txtChatAccount.Border.Class = "CrumbBarBackgroundKey";
|
||||
this.txtChatAccount.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.txtChatAccount.Border.PaddingBottom = 2;
|
||||
this.txtChatAccount.Border.PaddingLeft = 2;
|
||||
this.txtChatAccount.Border.PaddingRight = 2;
|
||||
this.txtChatAccount.Border.PaddingTop = 2;
|
||||
this.txtChatAccount.Location = new System.Drawing.Point(91, 99);
|
||||
this.txtChatAccount.Name = "txtChatAccount";
|
||||
this.txtChatAccount.Size = new System.Drawing.Size(172, 23);
|
||||
this.txtChatAccount.TabIndex = 380;
|
||||
this.txtChatAccount.Visible = false;
|
||||
this.txtChatAccount.WatermarkText = "点击添加店铺子账户";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(29, 102);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(56, 17);
|
||||
this.label4.TabIndex = 379;
|
||||
this.label4.Text = " 子账户";
|
||||
this.label4.Visible = false;
|
||||
//
|
||||
// txtUploadAccount
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtUploadAccount.Border.Class = "CrumbBarBackgroundKey";
|
||||
this.txtUploadAccount.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.txtUploadAccount.Border.PaddingBottom = 2;
|
||||
this.txtUploadAccount.Border.PaddingLeft = 2;
|
||||
this.txtUploadAccount.Border.PaddingRight = 2;
|
||||
this.txtUploadAccount.Border.PaddingTop = 2;
|
||||
this.txtUploadAccount.Location = new System.Drawing.Point(91, 99);
|
||||
this.txtUploadAccount.Name = "txtUploadAccount";
|
||||
this.txtUploadAccount.Size = new System.Drawing.Size(172, 23);
|
||||
this.txtUploadAccount.TabIndex = 374;
|
||||
this.txtUploadAccount.Visible = false;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(29, 102);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(56, 17);
|
||||
this.label3.TabIndex = 373;
|
||||
this.label3.Text = "上货账户";
|
||||
this.label3.Visible = false;
|
||||
//
|
||||
// txtShopPassword
|
||||
//
|
||||
this.txtShopPassword.Location = new System.Drawing.Point(91, 64);
|
||||
this.txtShopPassword.Name = "txtShopPassword";
|
||||
this.txtShopPassword.PasswordChar = '●';
|
||||
this.txtShopPassword.Size = new System.Drawing.Size(172, 23);
|
||||
this.txtShopPassword.TabIndex = 338;
|
||||
this.txtShopPassword.Visible = false;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(29, 67);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(56, 17);
|
||||
this.label2.TabIndex = 337;
|
||||
this.label2.Text = "登录密码";
|
||||
this.label2.Visible = false;
|
||||
//
|
||||
// txtLoginName
|
||||
//
|
||||
this.txtLoginName.Location = new System.Drawing.Point(91, 29);
|
||||
this.txtLoginName.Name = "txtLoginName";
|
||||
this.txtLoginName.Size = new System.Drawing.Size(172, 23);
|
||||
this.txtLoginName.TabIndex = 336;
|
||||
this.txtLoginName.Visible = false;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(29, 32);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(56, 17);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "登录账号";
|
||||
this.label1.Visible = false;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(29, 272);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(56, 17);
|
||||
this.label5.TabIndex = 377;
|
||||
this.label5.Text = "店铺分组";
|
||||
this.label5.Visible = false;
|
||||
//
|
||||
// btnOk
|
||||
//
|
||||
this.btnOk.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnOk.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnOk.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnOk.ForeColor = System.Drawing.Color.White;
|
||||
this.btnOk.Location = new System.Drawing.Point(208, 209);
|
||||
this.btnOk.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnOk.Name = "btnOk";
|
||||
this.btnOk.Size = new System.Drawing.Size(55, 26);
|
||||
this.btnOk.TabIndex = 372;
|
||||
this.btnOk.Text = "新增";
|
||||
this.btnOk.UseVisualStyleBackColor = false;
|
||||
this.btnOk.Visible = false;
|
||||
//
|
||||
// ProductSelectListForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.ClientSize = new System.Drawing.Size(1013, 682);
|
||||
this.Controls.Add(this.panel2);
|
||||
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "ProductSelectListForm";
|
||||
this.Text = "选品列表";
|
||||
this.TitleText = "选品列表";
|
||||
this.Load += new System.EventHandler(this.ProductSelectListForm_Load);
|
||||
this.Controls.SetChildIndex(this.panel2, 0);
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.panel2.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox txtShopPassword;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox txtLoginName;
|
||||
private UserControls.ButtonEx btnOk;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private DevComponents.DotNetBar.Controls.TextBoxX txtUploadAccount;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private DevComponents.DotNetBar.Controls.TextBoxX txtBuyAccount;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private DevComponents.DotNetBar.Controls.TextBoxX txtChatAccount;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.ComboBox cmbGroup;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private DevComponents.DotNetBar.Controls.TextBoxX txtNotes;
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
using AllBase.Helper;
|
||||
using AllBase.Model.Result;
|
||||
using TemuKJD.KJDForms.BaseForms;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
{
|
||||
public partial class ProductSelectListForm : LRBaseForm
|
||||
{
|
||||
|
||||
public ProductSelectListForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void ProductSelectListForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
+285
-221
@@ -44,6 +44,15 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
|
||||
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colLoginStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colSelectProduct = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.pbLoading = new System.Windows.Forms.PictureBox();
|
||||
this.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx();
|
||||
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.colSelectId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
@@ -54,19 +63,15 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
this.colProductSkcPic = new System.Windows.Forms.DataGridViewImageColumn();
|
||||
this.colProductName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colProductCat = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColDelete = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colExtCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colDraftId = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.ColDelete = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
|
||||
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
|
||||
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
|
||||
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnClear = new DevComponents.DotNetBar.PanelEx();
|
||||
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colSelectProduct = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@@ -82,6 +87,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
this.splitContainer2.Panel2.SuspendLayout();
|
||||
this.splitContainer2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit();
|
||||
this.splitContainer4.Panel1.SuspendLayout();
|
||||
@@ -146,6 +152,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
this.btnSearch.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnSearch.TabIndex = 427;
|
||||
this.btnSearch.Text = "认领商品查询";
|
||||
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
|
||||
//
|
||||
// ucGroupBoxEx1
|
||||
//
|
||||
@@ -219,6 +226,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
//
|
||||
// splitContainer2.Panel2
|
||||
//
|
||||
this.splitContainer2.Panel2.Controls.Add(this.pbLoading);
|
||||
this.splitContainer2.Panel2.Controls.Add(this.dgvSelectProduct);
|
||||
this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(1152, 392);
|
||||
@@ -247,6 +255,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
this.colShopLoginName,
|
||||
this.colShopId,
|
||||
this.colShopName,
|
||||
this.colLoginStatus,
|
||||
this.colSelectProduct,
|
||||
this.colCanUse,
|
||||
this.colMessage});
|
||||
@@ -262,207 +271,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
this.dgvShop.TabIndex = 6;
|
||||
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
|
||||
//
|
||||
// dgvSelectProduct
|
||||
//
|
||||
this.dgvSelectProduct.AllowUserToAddRows = false;
|
||||
this.dgvSelectProduct.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle4.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4;
|
||||
this.dgvSelectProduct.BackgroundColor = System.Drawing.Color.White;
|
||||
this.dgvSelectProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
|
||||
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.colCheck,
|
||||
this.colSelectId,
|
||||
this.colSupplierId,
|
||||
this.colSupplierName,
|
||||
this.colSpuId,
|
||||
this.colSkcId,
|
||||
this.colProductSkcPic,
|
||||
this.colProductName,
|
||||
this.colProductCat,
|
||||
this.ColDelete,
|
||||
this.colMsg});
|
||||
this.dgvSelectProduct.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.dgvSelectProduct.Location = new System.Drawing.Point(0, 0);
|
||||
this.dgvSelectProduct.Name = "dgvSelectProduct";
|
||||
this.dgvSelectProduct.ReadOnly = true;
|
||||
dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.dgvSelectProduct.RowsDefaultCellStyle = dataGridViewCellStyle6;
|
||||
this.dgvSelectProduct.RowTemplate.Height = 23;
|
||||
this.dgvSelectProduct.Size = new System.Drawing.Size(874, 392);
|
||||
this.dgvSelectProduct.TabIndex = 187;
|
||||
//
|
||||
// colCheck
|
||||
//
|
||||
this.colCheck.HeaderText = "选择";
|
||||
this.colCheck.Name = "colCheck";
|
||||
this.colCheck.ReadOnly = true;
|
||||
this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
this.colCheck.Width = 30;
|
||||
//
|
||||
// colSelectId
|
||||
//
|
||||
this.colSelectId.HeaderText = "认领Id";
|
||||
this.colSelectId.Name = "colSelectId";
|
||||
this.colSelectId.ReadOnly = true;
|
||||
this.colSelectId.Visible = false;
|
||||
//
|
||||
// colSupplierId
|
||||
//
|
||||
this.colSupplierId.HeaderText = "店铺Id";
|
||||
this.colSupplierId.Name = "colSupplierId";
|
||||
this.colSupplierId.ReadOnly = true;
|
||||
//
|
||||
// colSupplierName
|
||||
//
|
||||
this.colSupplierName.HeaderText = "店铺名称";
|
||||
this.colSupplierName.Name = "colSupplierName";
|
||||
this.colSupplierName.ReadOnly = true;
|
||||
this.colSupplierName.Width = 110;
|
||||
//
|
||||
// colSpuId
|
||||
//
|
||||
this.colSpuId.HeaderText = "商品SPU";
|
||||
this.colSpuId.Name = "colSpuId";
|
||||
this.colSpuId.ReadOnly = true;
|
||||
this.colSpuId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colSpuId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
//
|
||||
// colSkcId
|
||||
//
|
||||
this.colSkcId.FillWeight = 150F;
|
||||
this.colSkcId.HeaderText = "商品SKC";
|
||||
this.colSkcId.Name = "colSkcId";
|
||||
this.colSkcId.ReadOnly = true;
|
||||
this.colSkcId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colSkcId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
this.colSkcId.Width = 80;
|
||||
//
|
||||
// colProductSkcPic
|
||||
//
|
||||
this.colProductSkcPic.HeaderText = "Skc图片";
|
||||
this.colProductSkcPic.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
|
||||
this.colProductSkcPic.Name = "colProductSkcPic";
|
||||
this.colProductSkcPic.ReadOnly = true;
|
||||
this.colProductSkcPic.Width = 60;
|
||||
//
|
||||
// colProductName
|
||||
//
|
||||
this.colProductName.HeaderText = "商品标题";
|
||||
this.colProductName.Name = "colProductName";
|
||||
this.colProductName.ReadOnly = true;
|
||||
this.colProductName.Width = 220;
|
||||
//
|
||||
// colProductCat
|
||||
//
|
||||
this.colProductCat.HeaderText = "商品类目";
|
||||
this.colProductCat.Name = "colProductCat";
|
||||
this.colProductCat.ReadOnly = true;
|
||||
this.colProductCat.Width = 90;
|
||||
//
|
||||
// ColDelete
|
||||
//
|
||||
this.ColDelete.HeaderText = "删除";
|
||||
this.ColDelete.Name = "ColDelete";
|
||||
this.ColDelete.ReadOnly = true;
|
||||
//
|
||||
// colMsg
|
||||
//
|
||||
this.colMsg.HeaderText = "状态";
|
||||
this.colMsg.Name = "colMsg";
|
||||
this.colMsg.ReadOnly = true;
|
||||
this.colMsg.Visible = false;
|
||||
this.colMsg.Width = 400;
|
||||
//
|
||||
// splitContainer4
|
||||
//
|
||||
this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.splitContainer4.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer4.Name = "splitContainer4";
|
||||
//
|
||||
// splitContainer4.Panel1
|
||||
//
|
||||
this.splitContainer4.Panel1.Controls.Add(this.statusBar);
|
||||
//
|
||||
// splitContainer4.Panel2
|
||||
//
|
||||
this.splitContainer4.Panel2.Controls.Add(this.panelEx1);
|
||||
this.splitContainer4.Panel2.Controls.Add(this.btnClear);
|
||||
this.splitContainer4.Size = new System.Drawing.Size(1152, 26);
|
||||
this.splitContainer4.SplitterDistance = 874;
|
||||
this.splitContainer4.TabIndex = 3;
|
||||
//
|
||||
// statusBar
|
||||
//
|
||||
this.statusBar.BackColor = System.Drawing.Color.White;
|
||||
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.statusBar.Location = new System.Drawing.Point(0, 0);
|
||||
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.statusBar.Name = "statusBar";
|
||||
this.statusBar.Size = new System.Drawing.Size(874, 26);
|
||||
this.statusBar.TabIndex = 2;
|
||||
//
|
||||
// panelEx1
|
||||
//
|
||||
this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.panelEx1.Location = new System.Drawing.Point(155, 0);
|
||||
this.panelEx1.Name = "panelEx1";
|
||||
this.panelEx1.Size = new System.Drawing.Size(115, 21);
|
||||
this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
|
||||
this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
|
||||
this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
|
||||
this.panelEx1.Style.GradientAngle = 90;
|
||||
this.panelEx1.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.panelEx1.TabIndex = 668;
|
||||
this.panelEx1.Text = "停止当前操作";
|
||||
//
|
||||
// btnClear
|
||||
//
|
||||
this.btnClear.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnClear.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnClear.Location = new System.Drawing.Point(47, 0);
|
||||
this.btnClear.Name = "btnClear";
|
||||
this.btnClear.Size = new System.Drawing.Size(90, 21);
|
||||
this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnClear.Style.GradientAngle = 90;
|
||||
this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnClear.TabIndex = 440;
|
||||
this.btnClear.Text = "清空结果";
|
||||
this.btnClear.Visible = false;
|
||||
//
|
||||
// colSelect
|
||||
//
|
||||
this.colSelect.HeaderText = "全选";
|
||||
@@ -496,6 +304,13 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colShopName.Width = 75;
|
||||
//
|
||||
// colLoginStatus
|
||||
//
|
||||
this.colLoginStatus.HeaderText = "登录状态";
|
||||
this.colLoginStatus.Name = "colLoginStatus";
|
||||
this.colLoginStatus.ReadOnly = true;
|
||||
this.colLoginStatus.Visible = false;
|
||||
//
|
||||
// colSelectProduct
|
||||
//
|
||||
this.colSelectProduct.HeaderText = "认领商品";
|
||||
@@ -521,12 +336,255 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
this.colMessage.Name = "colMessage";
|
||||
this.colMessage.ReadOnly = true;
|
||||
//
|
||||
// pbLoading
|
||||
//
|
||||
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
|
||||
this.pbLoading.Location = new System.Drawing.Point(414, 171);
|
||||
this.pbLoading.Name = "pbLoading";
|
||||
this.pbLoading.Size = new System.Drawing.Size(50, 50);
|
||||
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.pbLoading.TabIndex = 188;
|
||||
this.pbLoading.TabStop = false;
|
||||
this.pbLoading.Visible = false;
|
||||
//
|
||||
// dgvSelectProduct
|
||||
//
|
||||
this.dgvSelectProduct.AllowUserToAddRows = false;
|
||||
this.dgvSelectProduct.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle4.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4;
|
||||
this.dgvSelectProduct.BackgroundColor = System.Drawing.Color.White;
|
||||
this.dgvSelectProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
|
||||
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.colCheck,
|
||||
this.colSelectId,
|
||||
this.colSupplierId,
|
||||
this.colSupplierName,
|
||||
this.colSpuId,
|
||||
this.colSkcId,
|
||||
this.colProductSkcPic,
|
||||
this.colProductName,
|
||||
this.colProductCat,
|
||||
this.colExtCode,
|
||||
this.colMsg,
|
||||
this.colDraftId,
|
||||
this.ColDelete});
|
||||
this.dgvSelectProduct.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.dgvSelectProduct.Location = new System.Drawing.Point(0, 0);
|
||||
this.dgvSelectProduct.Name = "dgvSelectProduct";
|
||||
this.dgvSelectProduct.ReadOnly = true;
|
||||
dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.dgvSelectProduct.RowsDefaultCellStyle = dataGridViewCellStyle6;
|
||||
this.dgvSelectProduct.RowTemplate.Height = 23;
|
||||
this.dgvSelectProduct.Size = new System.Drawing.Size(874, 392);
|
||||
this.dgvSelectProduct.TabIndex = 187;
|
||||
this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick);
|
||||
//
|
||||
// colCheck
|
||||
//
|
||||
this.colCheck.HeaderText = "选择";
|
||||
this.colCheck.Name = "colCheck";
|
||||
this.colCheck.ReadOnly = true;
|
||||
this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
this.colCheck.Width = 30;
|
||||
//
|
||||
// colSelectId
|
||||
//
|
||||
this.colSelectId.HeaderText = "认领Id";
|
||||
this.colSelectId.Name = "colSelectId";
|
||||
this.colSelectId.ReadOnly = true;
|
||||
//
|
||||
// colSupplierId
|
||||
//
|
||||
this.colSupplierId.HeaderText = "店铺Id";
|
||||
this.colSupplierId.Name = "colSupplierId";
|
||||
this.colSupplierId.ReadOnly = true;
|
||||
//
|
||||
// colSupplierName
|
||||
//
|
||||
this.colSupplierName.HeaderText = "店铺名称";
|
||||
this.colSupplierName.Name = "colSupplierName";
|
||||
this.colSupplierName.ReadOnly = true;
|
||||
this.colSupplierName.Width = 110;
|
||||
//
|
||||
// colSpuId
|
||||
//
|
||||
this.colSpuId.HeaderText = "商品SPU";
|
||||
this.colSpuId.Name = "colSpuId";
|
||||
this.colSpuId.ReadOnly = true;
|
||||
this.colSpuId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colSpuId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
this.colSpuId.Visible = false;
|
||||
//
|
||||
// colSkcId
|
||||
//
|
||||
this.colSkcId.FillWeight = 150F;
|
||||
this.colSkcId.HeaderText = "商品SKC";
|
||||
this.colSkcId.Name = "colSkcId";
|
||||
this.colSkcId.ReadOnly = true;
|
||||
this.colSkcId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colSkcId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
this.colSkcId.Visible = false;
|
||||
this.colSkcId.Width = 80;
|
||||
//
|
||||
// colProductSkcPic
|
||||
//
|
||||
this.colProductSkcPic.HeaderText = "Skc图片";
|
||||
this.colProductSkcPic.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
|
||||
this.colProductSkcPic.Name = "colProductSkcPic";
|
||||
this.colProductSkcPic.ReadOnly = true;
|
||||
this.colProductSkcPic.Width = 60;
|
||||
//
|
||||
// colProductName
|
||||
//
|
||||
this.colProductName.HeaderText = "商品标题";
|
||||
this.colProductName.Name = "colProductName";
|
||||
this.colProductName.ReadOnly = true;
|
||||
this.colProductName.Width = 260;
|
||||
//
|
||||
// colProductCat
|
||||
//
|
||||
this.colProductCat.HeaderText = "商品类目";
|
||||
this.colProductCat.Name = "colProductCat";
|
||||
this.colProductCat.ReadOnly = true;
|
||||
this.colProductCat.Width = 90;
|
||||
//
|
||||
// colExtCode
|
||||
//
|
||||
this.colExtCode.HeaderText = "商品货号";
|
||||
this.colExtCode.Name = "colExtCode";
|
||||
this.colExtCode.ReadOnly = true;
|
||||
//
|
||||
// colMsg
|
||||
//
|
||||
this.colMsg.HeaderText = "状态";
|
||||
this.colMsg.Name = "colMsg";
|
||||
this.colMsg.ReadOnly = true;
|
||||
//
|
||||
// colDraftId
|
||||
//
|
||||
this.colDraftId.HeaderText = "草稿箱Id";
|
||||
this.colDraftId.Name = "colDraftId";
|
||||
this.colDraftId.ReadOnly = true;
|
||||
this.colDraftId.Visible = false;
|
||||
//
|
||||
// ColDelete
|
||||
//
|
||||
this.ColDelete.HeaderText = "删除";
|
||||
this.ColDelete.Name = "ColDelete";
|
||||
this.ColDelete.ReadOnly = true;
|
||||
//
|
||||
// splitContainer4
|
||||
//
|
||||
this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.splitContainer4.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer4.Name = "splitContainer4";
|
||||
//
|
||||
// splitContainer4.Panel1
|
||||
//
|
||||
this.splitContainer4.Panel1.Controls.Add(this.statusBar);
|
||||
//
|
||||
// splitContainer4.Panel2
|
||||
//
|
||||
this.splitContainer4.Panel2.Controls.Add(this.ucSplitPage1);
|
||||
this.splitContainer4.Panel2.Controls.Add(this.panelEx1);
|
||||
this.splitContainer4.Panel2.Controls.Add(this.btnClear);
|
||||
this.splitContainer4.Size = new System.Drawing.Size(1152, 26);
|
||||
this.splitContainer4.SplitterDistance = 539;
|
||||
this.splitContainer4.TabIndex = 3;
|
||||
//
|
||||
// statusBar
|
||||
//
|
||||
this.statusBar.BackColor = System.Drawing.Color.White;
|
||||
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.statusBar.Location = new System.Drawing.Point(0, 0);
|
||||
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.statusBar.Name = "statusBar";
|
||||
this.statusBar.Size = new System.Drawing.Size(539, 26);
|
||||
this.statusBar.TabIndex = 2;
|
||||
//
|
||||
// ucSplitPage1
|
||||
//
|
||||
this.ucSplitPage1.CurrentPage = 1;
|
||||
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.ucSplitPage1.Location = new System.Drawing.Point(36, 0);
|
||||
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.ucSplitPage1.Name = "ucSplitPage1";
|
||||
this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0);
|
||||
this.ucSplitPage1.Size = new System.Drawing.Size(573, 26);
|
||||
this.ucSplitPage1.TabIndex = 675;
|
||||
this.ucSplitPage1.TotalPage = 1;
|
||||
//
|
||||
// panelEx1
|
||||
//
|
||||
this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.panelEx1.Location = new System.Drawing.Point(99, 2);
|
||||
this.panelEx1.Name = "panelEx1";
|
||||
this.panelEx1.Size = new System.Drawing.Size(115, 21);
|
||||
this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
|
||||
this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
|
||||
this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
|
||||
this.panelEx1.Style.GradientAngle = 90;
|
||||
this.panelEx1.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.panelEx1.TabIndex = 668;
|
||||
this.panelEx1.Text = "停止当前操作";
|
||||
this.panelEx1.Visible = false;
|
||||
//
|
||||
// btnClear
|
||||
//
|
||||
this.btnClear.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnClear.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnClear.Location = new System.Drawing.Point(3, 2);
|
||||
this.btnClear.Name = "btnClear";
|
||||
this.btnClear.Size = new System.Drawing.Size(90, 21);
|
||||
this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnClear.Style.GradientAngle = 90;
|
||||
this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnClear.TabIndex = 440;
|
||||
this.btnClear.Text = "清空结果";
|
||||
this.btnClear.Visible = false;
|
||||
//
|
||||
// UserSelectDbProductForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.ClientSize = new System.Drawing.Size(1152, 546);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.Name = "UserSelectDbProductForm";
|
||||
this.Text = "UserSelectDbProductForm";
|
||||
this.Load += new System.EventHandler(this.UserSelectDbProductForm_Load);
|
||||
@@ -546,6 +604,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
|
||||
this.splitContainer2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).EndInit();
|
||||
this.splitContainer4.Panel1.ResumeLayout(false);
|
||||
this.splitContainer4.Panel2.ResumeLayout(false);
|
||||
@@ -566,6 +625,20 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
private System.Windows.Forms.SplitContainer splitContainer2;
|
||||
private UserComponent.DataGridViewEx dgvShop;
|
||||
private UserComponent.DataGridViewEx dgvSelectProduct;
|
||||
private System.Windows.Forms.SplitContainer splitContainer4;
|
||||
private UserControls.StatusBarUserControl statusBar;
|
||||
private DevComponents.DotNetBar.PanelEx panelEx1;
|
||||
private DevComponents.DotNetBar.PanelEx btnClear;
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colShopName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginStatus;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colSelectProduct;
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
|
||||
private System.Windows.Forms.PictureBox pbLoading;
|
||||
private UserControls.UcSplitPage ucSplitPage1;
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId;
|
||||
@@ -575,18 +648,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
private System.Windows.Forms.DataGridViewImageColumn colProductSkcPic;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colProductName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colProductCat;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn ColDelete;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colExtCode;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colMsg;
|
||||
private System.Windows.Forms.SplitContainer splitContainer4;
|
||||
private UserControls.StatusBarUserControl statusBar;
|
||||
private DevComponents.DotNetBar.PanelEx panelEx1;
|
||||
private DevComponents.DotNetBar.PanelEx btnClear;
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colShopName;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colSelectProduct;
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colDraftId;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn ColDelete;
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,29 @@
|
||||
using AllBase.Helper;
|
||||
using AllBase;
|
||||
using AllBase.Helper;
|
||||
using AllBase.Model.Result;
|
||||
using NaiBa.Util.Extension;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using TemuKJD.Extension;
|
||||
using TemuKJD.KJDForms.BaseForms;
|
||||
using Work;
|
||||
|
||||
namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
{
|
||||
public partial class UserSelectDbProductForm : Form
|
||||
{
|
||||
CheckBox chkSelectAll = null;
|
||||
List<TemuDBProductSelect> lstTemuDBProductSelect = new List<TemuDBProductSelect>();
|
||||
public UserSelectDbProductForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -31,6 +37,12 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
|
||||
|
||||
this.dgvSelectProduct.AddSelectorColumn("colCheck");
|
||||
this.ucSplitPage1.PageChange += UcSplitPage1_PageChange;
|
||||
}
|
||||
|
||||
private void UcSplitPage1_PageChange(object obj)
|
||||
{
|
||||
SearchDbProdSelect(this.ucSplitPage1.CurrentPage);
|
||||
}
|
||||
|
||||
private void chkSelectAll_CheckedChanged(object sender, EventArgs e)
|
||||
@@ -101,6 +113,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
shopEntity.LoginName,
|
||||
shopEntity.ShopId,
|
||||
shopEntity.ShopAccount,
|
||||
shopEntity.LoginStatus,
|
||||
"选择商品",
|
||||
canUse,
|
||||
string.Empty
|
||||
@@ -152,5 +165,145 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
var lstShopId = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
|
||||
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
|
||||
if (lstShopId.Count == 0)
|
||||
{
|
||||
BaseMsgForm.ShowInfo("请选择店铺!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.ucSplitPage1.CurrentPage != 1)
|
||||
this.ucSplitPage1.CurrentPage = 1;
|
||||
else
|
||||
SearchDbProdSelect(1);
|
||||
}
|
||||
|
||||
public void SearchDbProdSelect(int page)
|
||||
{
|
||||
if (InvokeRequired)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.pbLoading.Visible = true;
|
||||
this.dgvSelectProduct.Rows.Clear();
|
||||
lstTemuDBProductSelect.Clear();
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.pbLoading.Visible = true;
|
||||
this.dgvSelectProduct.Rows.Clear();
|
||||
lstTemuDBProductSelect.Clear();
|
||||
}
|
||||
Task.Run(() =>
|
||||
{
|
||||
int pageCount;
|
||||
var list = GetSelectProductList(out pageCount, page);
|
||||
lstTemuDBProductSelect.AddRange(list);
|
||||
this.ucSplitPage1.TotalPage = pageCount;
|
||||
|
||||
foreach (var prodSelect in lstTemuDBProductSelect)
|
||||
{
|
||||
Image image = null;
|
||||
try
|
||||
{
|
||||
using (Stream stream = WebRequest.Create(prodSelect.main_img.Replace("https", "http")).GetResponse().GetResponseStream())
|
||||
{
|
||||
image = Image.FromStream(stream);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
int rowIndex = this.dgvSelectProduct.Rows.Add(
|
||||
false,
|
||||
prodSelect.id,
|
||||
prodSelect.shop_id,
|
||||
prodSelect.shop_account,
|
||||
"",//prodSelect.spu_id,
|
||||
"",//prodSelect.skc_id,
|
||||
image,//prod.main_img,
|
||||
prodSelect.product_name,
|
||||
prodSelect.cat_name,
|
||||
prodSelect.ext_code,
|
||||
prodSelect.status,
|
||||
prodSelect.draft_id,
|
||||
"删除");
|
||||
|
||||
dgvSelectProduct.Rows[rowIndex].Height = 80;
|
||||
}));
|
||||
}
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.pbLoading.Visible = false;
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public List<TemuDBProductSelect> GetSelectProductList(out int pageCount, int page = 1, int pageSize = 50)
|
||||
{
|
||||
var lstShopId = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
|
||||
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
|
||||
|
||||
List<TemuDBProductSelect> list = new List<TemuDBProductSelect>();
|
||||
pageCount = 1;
|
||||
|
||||
var url = BaseClass.BuildObjString("product/get_user_select_product_list");
|
||||
var data = UserLogin.GetSignaturex() +
|
||||
"&page=" + page +
|
||||
"&page_size=" + pageSize +
|
||||
//"&out_product_id=" + dbId +
|
||||
//"&shop_id=" + shop.ShopId +
|
||||
//"&shop_account=" + shop.ShopAccount +
|
||||
//"&main_user_name=" + shop.UserName +
|
||||
//"&sub_user_name=" + shop.SubUserName +
|
||||
//"&status=待审核" +
|
||||
"&shop_ids=\"" + string.Join("\",\"", lstShopId) + "\"";
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgForm.ShowError("认领商品查询失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg"));
|
||||
}));
|
||||
return new List<TemuDBProductSelect>();
|
||||
}
|
||||
|
||||
int count = BaseRegex.GetIntJson(ref html, "count");
|
||||
pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt();
|
||||
pageCount = Math.Max(pageCount, 1);
|
||||
|
||||
var jArr = JObject.Parse(html)["data"];
|
||||
if (jArr.Count() == 0)
|
||||
return list;
|
||||
var sProd = JsonHelper.SerializeObject(jArr);
|
||||
|
||||
try
|
||||
{
|
||||
list = JsonHelper.DeserializeJsonToList<TemuDBProductSelect>(sProd);
|
||||
return list;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new List<TemuDBProductSelect>();
|
||||
}
|
||||
}
|
||||
|
||||
private void dgvSelectProduct_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,6 +126,9 @@
|
||||
<metadata name="colShopId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colLoginStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colSelectProduct.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
@@ -159,10 +162,16 @@
|
||||
<metadata name="colProductCat.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColDelete.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="colExtCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colMsg.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colDraftId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColDelete.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+12
-8
@@ -35,8 +35,9 @@
|
||||
System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("素材库管理");
|
||||
System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("超级店铺管理");
|
||||
System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("超级用户管理");
|
||||
System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("选品数据管理");
|
||||
System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("店铺管理", new System.Windows.Forms.TreeNode[] {
|
||||
System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("选品数据库");
|
||||
System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("认领待上传");
|
||||
System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("店铺管理", new System.Windows.Forms.TreeNode[] {
|
||||
treeNode1,
|
||||
treeNode2,
|
||||
treeNode3,
|
||||
@@ -44,7 +45,8 @@
|
||||
treeNode5,
|
||||
treeNode6,
|
||||
treeNode7,
|
||||
treeNode8});
|
||||
treeNode8,
|
||||
treeNode9});
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
@@ -149,12 +151,14 @@
|
||||
treeNode6.Text = "超级店铺管理";
|
||||
treeNode7.Name = "超级用户管理";
|
||||
treeNode7.Text = "超级用户管理";
|
||||
treeNode8.Name = "选品数据管理";
|
||||
treeNode8.Text = "选品数据管理";
|
||||
treeNode9.Name = "店铺管理";
|
||||
treeNode9.Text = "店铺管理";
|
||||
treeNode8.Name = "选品数据库";
|
||||
treeNode8.Text = "选品数据库";
|
||||
treeNode9.Name = "认领待上传";
|
||||
treeNode9.Text = "认领待上传";
|
||||
treeNode10.Name = "店铺管理";
|
||||
treeNode10.Text = "店铺管理";
|
||||
this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
|
||||
treeNode9});
|
||||
treeNode10});
|
||||
this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
|
||||
this.tv.Size = new System.Drawing.Size(140, 461);
|
||||
this.tv.TabIndex = 1;
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
public Lazy<AdminAccountForm> adminAccountForm = new Lazy<AdminAccountForm>();
|
||||
public Lazy<AdminShopForm> adminShopForm = new Lazy<AdminShopForm>();
|
||||
public Lazy<DbProductListForm> dbProductListForm = new Lazy<DbProductListForm>();
|
||||
public Lazy<DbProductSelectListManageForm> dbProductSelectListManageForm = new Lazy<DbProductSelectListManageForm>();
|
||||
|
||||
public ShopForm()
|
||||
{
|
||||
@@ -34,7 +35,7 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
tv.SelectedNode = tv.Nodes[0].Nodes[0];
|
||||
tv.ExpandGroup(tv.Nodes[0].Name);
|
||||
|
||||
List<string> hideName = new List<string>() { "用户管理", "高级运费模板", "运费模板", "素材库管理", "超级用户管理", "超级店铺管理", "选品数据管理" };
|
||||
List<string> hideName = new List<string>() { "用户管理", "高级运费模板", "运费模板", "素材库管理", "超级用户管理", "超级店铺管理", "选品数据库", "认领待上传" };
|
||||
|
||||
if (BaseClass.GroupId == 3)
|
||||
{
|
||||
@@ -43,7 +44,8 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
{
|
||||
hideName.Remove("超级用户管理");
|
||||
hideName.Remove("超级店铺管理");
|
||||
hideName.Remove("选品数据管理");
|
||||
hideName.Remove("选品数据库");
|
||||
hideName.Remove("认领待上传");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,9 +93,12 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
case "超级店铺管理":
|
||||
SetForm(adminShopForm.Value);
|
||||
break;
|
||||
case "选品数据管理":
|
||||
case "选品数据库":
|
||||
SetForm(dbProductListForm.Value);
|
||||
break;
|
||||
case "认领待上传":
|
||||
SetForm(dbProductSelectListManageForm.Value);
|
||||
break;
|
||||
}
|
||||
}));
|
||||
}).Start();
|
||||
|
||||
@@ -26,11 +26,11 @@ namespace TemuKJD.UserControls
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.lblTotal.Text = "共" + totalPage + "页";
|
||||
this.lblTotal.Text = "共 " + totalPage + " 页";
|
||||
}));
|
||||
}
|
||||
else
|
||||
this.lblTotal.Text = "共" + totalPage + "页";
|
||||
this.lblTotal.Text = "共 " + totalPage + " 页";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user