From 4d38059e72cc2964685d1b2e90646217cb46142c Mon Sep 17 00:00:00 2001 From: wule Date: Wed, 12 Aug 2026 11:25:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E5=90=91=E5=93=81=E7=89=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AdminForms/WXAdminAccountForm.Designer.cs | 88 +++++---- .../WXForms/AdminForms/WXAdminAccountForm.cs | 4 + .../WXDBProdUploadForm.Designer.cs | 54 +++--- .../ProductForms/WXDBProdUploadForm.cs | 169 +++++++++--------- 4 files changed, 170 insertions(+), 145 deletions(-) diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.Designer.cs b/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.Designer.cs index 96c03ef..fa06030 100644 --- a/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.Designer.cs +++ b/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.Designer.cs @@ -30,9 +30,9 @@ namespace TemuKJD.WXForms.AdminForms private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer5 = new System.Windows.Forms.SplitContainer(); this.pnlSuperManage = new System.Windows.Forms.Panel(); this.label10 = new System.Windows.Forms.Label(); @@ -111,6 +111,8 @@ namespace TemuKJD.WXForms.AdminForms this.btnShopPointsPerMonthCancel = new DevComponents.DotNetBar.PanelEx(); this.btnShopPointsPerMonth = new DevComponents.DotNetBar.PanelEx(); this.pnlTopUp = new System.Windows.Forms.Panel(); + this.lblTopUpNickName = new System.Windows.Forms.Label(); + this.lblTopUpUserId = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label(); this.lblUserInfo = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); @@ -145,8 +147,7 @@ namespace TemuKJD.WXForms.AdminForms this.editColumn = new System.Windows.Forms.DataGridViewLinkColumn(); this.deleteColumn = new System.Windows.Forms.DataGridViewLinkColumn(); this.btnExportShopErp = new DevComponents.DotNetBar.PanelEx(); - this.lblTopUpNickName = new System.Windows.Forms.Label(); - this.lblTopUpUserId = new System.Windows.Forms.Label(); + this.chkSpBrand = new TemuKJD.UserComponent.UcCheckBox(this.components); ((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).BeginInit(); this.splitContainer5.Panel1.SuspendLayout(); this.splitContainer5.Panel2.SuspendLayout(); @@ -202,6 +203,7 @@ namespace TemuKJD.WXForms.AdminForms this.pnlSuperManage.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.pnlSuperManage.Controls.Add(this.chkSpBrand); this.pnlSuperManage.Controls.Add(this.label10); this.pnlSuperManage.Controls.Add(this.label5); this.pnlSuperManage.Controls.Add(this.txtOemId); @@ -552,7 +554,7 @@ namespace TemuKJD.WXForms.AdminForms this.btnOpUser.Cursor = System.Windows.Forms.Cursors.Hand; this.btnOpUser.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnOpUser.ForeColor = System.Drawing.Color.White; - this.btnOpUser.Location = new System.Drawing.Point(157, 571); + this.btnOpUser.Location = new System.Drawing.Point(157, 580); this.btnOpUser.Name = "btnOpUser"; this.btnOpUser.Size = new System.Drawing.Size(86, 25); this.btnOpUser.TabIndex = 34; @@ -577,7 +579,7 @@ namespace TemuKJD.WXForms.AdminForms this.btnCancel.Cursor = System.Windows.Forms.Cursors.Hand; this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnCancel.ForeColor = System.Drawing.Color.White; - this.btnCancel.Location = new System.Drawing.Point(42, 571); + this.btnCancel.Location = new System.Drawing.Point(42, 580); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(86, 25); this.btnCancel.TabIndex = 35; @@ -599,7 +601,7 @@ namespace TemuKJD.WXForms.AdminForms // this.label1.AutoSize = true; this.label1.ForeColor = System.Drawing.SystemColors.ButtonShadow; - this.label1.Location = new System.Drawing.Point(30, 490); + this.label1.Location = new System.Drawing.Point(30, 500); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(236, 68); this.label1.TabIndex = 37; @@ -1181,6 +1183,26 @@ namespace TemuKJD.WXForms.AdminForms this.pnlTopUp.TabIndex = 8; this.pnlTopUp.Visible = false; // + // lblTopUpNickName + // + this.lblTopUpNickName.AutoSize = true; + this.lblTopUpNickName.Location = new System.Drawing.Point(259, 19); + this.lblTopUpNickName.Name = "lblTopUpNickName"; + this.lblTopUpNickName.Size = new System.Drawing.Size(69, 17); + this.lblTopUpNickName.TabIndex = 461; + this.lblTopUpNickName.Text = "NickName"; + this.lblTopUpNickName.Visible = false; + // + // lblTopUpUserId + // + this.lblTopUpUserId.AutoSize = true; + this.lblTopUpUserId.Location = new System.Drawing.Point(212, 19); + this.lblTopUpUserId.Name = "lblTopUpUserId"; + this.lblTopUpUserId.Size = new System.Drawing.Size(47, 17); + this.lblTopUpUserId.TabIndex = 460; + this.lblTopUpUserId.Text = "UserId"; + this.lblTopUpUserId.Visible = false; + // // label14 // this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -1291,20 +1313,20 @@ namespace TemuKJD.WXForms.AdminForms // this.dgvUser.AllowUserToAddRows = false; this.dgvUser.AllowUserToDeleteRows = false; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); - this.dgvUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); + this.dgvUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4; this.dgvUser.AutoRowNumber = true; this.dgvUser.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dgvUser.BackgroundColor = System.Drawing.Color.White; this.dgvUser.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.dgvUser.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + 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.dgvUser.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5; this.dgvUser.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvUser.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colCheck, @@ -1449,8 +1471,8 @@ namespace TemuKJD.WXForms.AdminForms // // colPlus // - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.colPlus.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.colPlus.DefaultCellStyle = dataGridViewCellStyle6; this.colPlus.FillWeight = 22F; this.colPlus.HeaderText = "+"; this.colPlus.Name = "colPlus"; @@ -1548,25 +1570,14 @@ namespace TemuKJD.WXForms.AdminForms this.btnExportShopErp.Visible = false; this.btnExportShopErp.Click += new System.EventHandler(this.btnExportShopErp_Click); // - // lblTopUpNickName + // chkSpBrand // - this.lblTopUpNickName.AutoSize = true; - this.lblTopUpNickName.Location = new System.Drawing.Point(259, 19); - this.lblTopUpNickName.Name = "lblTopUpNickName"; - this.lblTopUpNickName.Size = new System.Drawing.Size(69, 17); - this.lblTopUpNickName.TabIndex = 461; - this.lblTopUpNickName.Text = "NickName"; - this.lblTopUpNickName.Visible = false; - // - // lblTopUpUserId - // - this.lblTopUpUserId.AutoSize = true; - this.lblTopUpUserId.Location = new System.Drawing.Point(212, 19); - this.lblTopUpUserId.Name = "lblTopUpUserId"; - this.lblTopUpUserId.Size = new System.Drawing.Size(47, 17); - this.lblTopUpUserId.TabIndex = 460; - this.lblTopUpUserId.Text = "UserId"; - this.lblTopUpUserId.Visible = false; + this.chkSpBrand.Location = new System.Drawing.Point(95, 478); + this.chkSpBrand.Name = "chkSpBrand"; + this.chkSpBrand.Size = new System.Drawing.Size(68, 21); + this.chkSpBrand.TabIndex = 848; + this.chkSpBrand.Text = "定向品牌"; + this.chkSpBrand.UseVisualStyleBackColor = true; // // WXAdminAccountForm // @@ -1731,5 +1742,6 @@ namespace TemuKJD.WXForms.AdminForms private System.Windows.Forms.Label lblBalanceNickName; private System.Windows.Forms.Label lblTopUpNickName; private System.Windows.Forms.Label lblTopUpUserId; + private UserComponent.UcCheckBox chkSpBrand; } } \ No newline at end of file diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.cs b/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.cs index 6349cba..f03fd45 100644 --- a/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.cs +++ b/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.cs @@ -99,6 +99,8 @@ namespace TemuKJD.WXForms.AdminForms authority += chkProdFission.Text + ","; // 裂变调试 if (chkTraineeData.Checked) authority += chkTraineeData.Text + ","; // 学员数据 + if (chkSpBrand.Checked) + authority += chkSpBrand.Text + ","; // 定向品牌 data.Append("&authority=" + authority.Trim(',')); string url = BaseClass.BuildObjString("user/add_user"); @@ -225,6 +227,7 @@ namespace TemuKJD.WXForms.AdminForms chkWXShowProdGetFromType.Checked = false; chkChanceProdCollect.Checked = false; chkTraineeData.Checked = false; + chkSpBrand.Checked = false; chkShopOptimize.Checked = false; chkEcWaybill.Checked = false; chkCommissionUpdate.Checked = false; @@ -274,6 +277,7 @@ namespace TemuKJD.WXForms.AdminForms chkProdFission.Checked = authority.Contains(chkProdFission.Text); chkChanceProdCollect.Checked = authority.Contains(chkChanceProdCollect.Text); chkTraineeData.Checked = authority.Contains(chkTraineeData.Text); + chkSpBrand.Checked = authority.Contains(chkSpBrand.Text); chkShopOptimize.Checked = authority.Contains(chkShopOptimize.Text); chkEcWaybill.Checked = authority.Contains(chkEcWaybill.Text); chkCommissionUpdate.Checked = authority.Contains(chkCommissionUpdate.Text); diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs index 9933a45..7775287 100644 --- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs @@ -103,8 +103,8 @@ namespace TemuKJD.WXForms.ProductForms this.label3 = new System.Windows.Forms.Label(); this.label39 = new System.Windows.Forms.Label(); this.chkSkipReplaceText = new TemuKJD.UserComponent.UcCheckBox(this.components); - this.上传参数2 = new System.Windows.Forms.TabPage(); - this.label40 = new System.Windows.Forms.Label(); + this.特殊参数 = new System.Windows.Forms.TabPage(); + this.lblSpBrand = new System.Windows.Forms.Label(); this.cmbSpBrandName = new System.Windows.Forms.ComboBox(); this.佣金上货 = new System.Windows.Forms.TabPage(); this.label31 = new System.Windows.Forms.Label(); @@ -261,7 +261,7 @@ namespace TemuKJD.WXForms.ProductForms this.fPnlPriceRule.SuspendLayout(); this.ucTabControlMetro1.SuspendLayout(); this.上传参数1.SuspendLayout(); - this.上传参数2.SuspendLayout(); + this.特殊参数.SuspendLayout(); this.佣金上货.SuspendLayout(); this.裂变调试.SuspendLayout(); this.ucGroupBoxEx4.SuspendLayout(); @@ -762,7 +762,7 @@ namespace TemuKJD.WXForms.ProductForms this.ucTabControlMetro1.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(251)))), ((int)(((byte)(251)))), ((int)(((byte)(251))))); this.ucTabControlMetro1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(157))))); this.ucTabControlMetro1.Controls.Add(this.上传参数1); - this.ucTabControlMetro1.Controls.Add(this.上传参数2); + this.ucTabControlMetro1.Controls.Add(this.特殊参数); this.ucTabControlMetro1.Controls.Add(this.佣金上货); this.ucTabControlMetro1.Controls.Add(this.裂变调试); this.ucTabControlMetro1.ItemSize = new System.Drawing.Size(72, 24); @@ -1182,28 +1182,28 @@ namespace TemuKJD.WXForms.ProductForms this.chkSkipReplaceText.UseVisualStyleBackColor = true; this.chkSkipReplaceText.CheckedChanged += new System.EventHandler(this.chkSkipReplaceText_CheckedChanged); // - // 上传参数2 + // 特殊参数 // - this.上传参数2.Controls.Add(this.label40); - this.上传参数2.Controls.Add(this.cmbSpBrandName); - this.上传参数2.Location = new System.Drawing.Point(4, 28); - this.上传参数2.Name = "上传参数2"; - this.上传参数2.Padding = new System.Windows.Forms.Padding(3); - this.上传参数2.Size = new System.Drawing.Size(611, 118); - this.上传参数2.TabIndex = 4; - this.上传参数2.Text = "特殊参数"; - this.上传参数2.UseVisualStyleBackColor = true; + this.特殊参数.Controls.Add(this.lblSpBrand); + this.特殊参数.Controls.Add(this.cmbSpBrandName); + this.特殊参数.Location = new System.Drawing.Point(4, 28); + this.特殊参数.Name = "特殊参数"; + this.特殊参数.Padding = new System.Windows.Forms.Padding(3); + this.特殊参数.Size = new System.Drawing.Size(611, 118); + this.特殊参数.TabIndex = 4; + this.特殊参数.Text = "特殊参数"; + this.特殊参数.UseVisualStyleBackColor = true; // - // label40 + // lblSpBrand // - this.label40.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.label40.AutoSize = true; - this.label40.Location = new System.Drawing.Point(7, 15); - this.label40.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label40.Name = "label40"; - this.label40.Size = new System.Drawing.Size(56, 17); - this.label40.TabIndex = 825; - this.label40.Text = "定向品牌"; + this.lblSpBrand.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.lblSpBrand.AutoSize = true; + this.lblSpBrand.Location = new System.Drawing.Point(7, 15); + this.lblSpBrand.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblSpBrand.Name = "lblSpBrand"; + this.lblSpBrand.Size = new System.Drawing.Size(56, 17); + this.lblSpBrand.TabIndex = 825; + this.lblSpBrand.Text = "定向品牌"; // // cmbSpBrandName // @@ -3229,8 +3229,8 @@ namespace TemuKJD.WXForms.ProductForms this.ucTabControlMetro1.ResumeLayout(false); this.上传参数1.ResumeLayout(false); this.上传参数1.PerformLayout(); - this.上传参数2.ResumeLayout(false); - this.上传参数2.PerformLayout(); + this.特殊参数.ResumeLayout(false); + this.特殊参数.PerformLayout(); this.佣金上货.ResumeLayout(false); this.佣金上货.PerformLayout(); this.裂变调试.ResumeLayout(false); @@ -3473,8 +3473,8 @@ namespace TemuKJD.WXForms.ProductForms private System.Windows.Forms.NumericUpDown numFilterViewUv; private UserComponent.UcCheckBox chkFilterViewUv; private UserComponent.UcCheckBox chkUseShanghaiReturnOrderAddress; - private System.Windows.Forms.TabPage 上传参数2; - private System.Windows.Forms.Label label40; + private System.Windows.Forms.TabPage 特殊参数; + private System.Windows.Forms.Label lblSpBrand; private System.Windows.Forms.ComboBox cmbSpBrandName; } } \ No newline at end of file diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs index dbf5678..864daea 100644 --- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs @@ -49,7 +49,7 @@ namespace TemuKJD.WXForms.ProductForms public ConcurrentList lstTemuDBProductSelect = new ConcurrentList(); ConcurrentList lstAddPriceRule = new ConcurrentList(); - bool isInit = false; + bool isInit = false; CheckBox chkSelectAll = null; AddPriceRule defaultAddPriceRule = null; @@ -59,7 +59,7 @@ namespace TemuKJD.WXForms.ProductForms public string pdd_product_cates = ""; - public List forceFilteKeyWords = new List() + public List forceFilteKeyWords = new List() { "顶级", "之王", "二手", "亏本", "冲量", "白菜价", "跳楼价", "xxx", "xx", "最大", "最小", "低价", "降价", "成本", "赔钱", "甩卖", "真丝", "蚕丝", "香云纱", "羊绒", "羊毛", "羊羔绒", "羊羔毛", "羽绒", "皮草" @@ -81,6 +81,14 @@ namespace TemuKJD.WXForms.ProductForms { Instance = this; + if (!BaseClass.UserAuthority.Contains("定向品牌")) + { + cmbSpBrandName.Visible = lblSpBrand.Visible = false; + this.ucTabControlMetro1.TabPages.Remove(特殊参数); + } + else + cmbSpBrandName.Visible = lblSpBrand.Visible = true; + if (!BaseClass.UserAuthority.Contains("佣金上货")) this.ucTabControlMetro1.TabPages.Remove(佣金上货); else @@ -104,7 +112,7 @@ namespace TemuKJD.WXForms.ProductForms lstAddPriceRule = NaiBa.Util.Helper.ConfigHelper.LoadConfig>("wx_add_price_rules"); if (lstAddPriceRule == null) - { + { lstAddPriceRule = new NaiBa.Util.ConcurrentList(); lstAddPriceRule.Add(new AddPriceRule() { MoreThanPrice = 0, LessThanPrice = 10, AddPriceTimes = 2, AddMorePrice = 10, SinglePriceAdd = 1 }); lstAddPriceRule.Add(new AddPriceRule() { MoreThanPrice = 10, LessThanPrice = 20, AddPriceTimes = 2, AddMorePrice = 10, SinglePriceAdd = 1 }); @@ -129,7 +137,7 @@ namespace TemuKJD.WXForms.ProductForms Font nf = new Font(of.FontFamily, (of.Size * 96.0 / FormDpi).ParseToFloat(), of.Style, of.Unit, of.GdiCharSet, of.Bold); ucPrice.Font = nf; } - + this.fPnlPriceRule.Controls.Add(ucPrice); ucPrice.PriceChange += ucAddPrice_PriceChange; } @@ -144,7 +152,7 @@ namespace TemuKJD.WXForms.ProductForms defaultAddPriceRule = NaiBa.Util.Helper.ConfigHelper.LoadConfig("wx_default_add_price_rule"); if (defaultAddPriceRule == null) - { + { defaultAddPriceRule = new AddPriceRule() { AddPriceTimes = 1.3m, AddMorePrice = 1, SinglePriceAdd = 1 }; } @@ -288,7 +296,7 @@ namespace TemuKJD.WXForms.ProductForms break; } if (dgvSelectProduct.Rows.Count % 100 == 0) - Thread.Sleep(1); + Thread.Sleep(1); Invoke(new Action(() => { int rowIndex = this.dgvSelectProduct.Rows.Add( @@ -383,7 +391,7 @@ namespace TemuKJD.WXForms.ProductForms this.lblSourceType.Visible = true; this.cmbSourceType.Visible = true; this.cmbSourceType.Items.Clear(); - cmbSourceType.Items.Add(""); + cmbSourceType.Items.Add(""); if (BaseClass.UserAuthority.Contains("学员数据") || BaseClass.ParentAuthority.Contains("学员数据")) { cmbSourceType.Items.Add("学员数据"); @@ -418,7 +426,7 @@ namespace TemuKJD.WXForms.ProductForms ucTabControlMetro1.TabPages.Remove(裂变调试); } - List ctrlLst = new List() + List ctrlLst = new List() { lblSourceType, cmbSourceType, lblGroupFilter, cmbGroupFilter, lblHot, cmbHot, lblIdFilter, txtIdFilter, chkFilterViewUv, numFilterViewUv /*chkRandomFissionProduct, txtRandomFissionProductCount, lblNotes, cmbNotes*//*, lblJstInitSet, cmbJstInitSet*/ @@ -427,7 +435,7 @@ namespace TemuKJD.WXForms.ProductForms { if (ctrlLst[i].Visible == false) { - for (int j= ctrlLst.Count - 2; j > i; j-=2) + for (int j = ctrlLst.Count - 2; j > i; j -= 2) { ctrlLst[j].Parent = ucGroupBoxEx4; ctrlLst[j].Location = new Point(ctrlLst[j - 2].Location.X + ctrlLst[j - 2].Width - ctrlLst[j].Width, ctrlLst[j - 2].Location.Y); @@ -567,7 +575,7 @@ namespace TemuKJD.WXForms.ProductForms foreach (DataGridViewRow row in dgvShop.Rows) { //if (list.Any(l => l == row.Cells["colShopId"]?.Value?.ToString())) - if(row.Visible == true) + if (row.Visible == true) row.Cells["colSelect"].Value = true; } } @@ -647,7 +655,7 @@ namespace TemuKJD.WXForms.ProductForms })); }); } - + /// /// 获取商品所有类目 /// @@ -684,7 +692,7 @@ namespace TemuKJD.WXForms.ProductForms // } //})); } - + void fillPddCate() { cmbCateFilter1.Items.Clear(); @@ -986,7 +994,7 @@ namespace TemuKJD.WXForms.ProductForms cancellationTokenSource = new CancellationTokenSource(); Task.Run(() => { - if (GlobalConfig.GlobalSettings.IsWxUseSoftwareDefaultAddress == true && !IsWxNotUseSoftwareDefaultAddressOnce && + if (GlobalConfig.GlobalSettings.IsWxUseSoftwareDefaultAddress == true && !IsWxNotUseSoftwareDefaultAddressOnce && lstTemuDBProductSelect.Any(p => p.product_get_type_text != "厂商直采" && p.product_get_type_text != "1688厂家")) { if (shopIdLst.Any(a => !GlobalConfig.WXShopDefaultAddressList.Any(aa => aa.shop_id == a))) @@ -1098,7 +1106,7 @@ namespace TemuKJD.WXForms.ProductForms { Thread.Sleep(500); continue; - } + } currentShopList.Add(randomShop); if (cancellationTokenSource.IsCancellationRequested) @@ -1174,29 +1182,29 @@ namespace TemuKJD.WXForms.ProductForms Invoke(new Action(() => { int rowIndex = 0; - this.dgvSelectProduct.Rows.Insert(rowIndex, - true, - selectProd.id, - selectProd.shop_id, - selectProd.shop_account, - "登录", - "进店", - BaseClass.SaLevel > 0 ? selectProd.spu_id : selectProd.spu_id.ParseToString().GetHashCode().ParseToString().Trim('-'), - selectProd.skc_id, - selectProd.main_img, - DataGridViewExtension.defaultBitmap, - "", - null, - selectProd.product_name, // 用户端显示商品原名 - selectProd.cat_name, - BaseClass.SaLevel > 0 ? selectProd.ext_code : selectProd.ext_code.ParseToString().GetHashCode().ParseToString().Trim('-'), - selectProd.status, - selectProd.draft_id, - selectProd.notes, - (selectProd.user_notes + " 编辑").Trim(), - "删除", - "", - ""); + this.dgvSelectProduct.Rows.Insert(rowIndex, + true, + selectProd.id, + selectProd.shop_id, + selectProd.shop_account, + "登录", + "进店", + BaseClass.SaLevel > 0 ? selectProd.spu_id : selectProd.spu_id.ParseToString().GetHashCode().ParseToString().Trim('-'), + selectProd.skc_id, + selectProd.main_img, + DataGridViewExtension.defaultBitmap, + "", + null, + selectProd.product_name, // 用户端显示商品原名 + selectProd.cat_name, + BaseClass.SaLevel > 0 ? selectProd.ext_code : selectProd.ext_code.ParseToString().GetHashCode().ParseToString().Trim('-'), + selectProd.status, + selectProd.draft_id, + selectProd.notes, + (selectProd.user_notes + " 编辑").Trim(), + "删除", + "", + ""); dgvSelectProduct.Rows[rowIndex].Height = 60; @@ -1548,7 +1556,8 @@ namespace TemuKJD.WXForms.ProductForms if (BaseClass.UserAuthority.Contains("裂变调试") && chkFissionGoodsName.Checked) { bool isFinish = false; - Invoke(new Action(() => { + Invoke(new Action(() => + { var titles = txtFissionTitle.Text.Split(new string[] { "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries).ToList(); if (titles.Count == 0) { @@ -1677,7 +1686,7 @@ namespace TemuKJD.WXForms.ProductForms btnLoginAssistant_Click(null, null); })); assistantShop.Cookies = JsonHelper.SerializeObject(lstWxSaleAssistantCookie); - result = WxGetAssistant.wxGetAssistant(assistantShop, dbProd.spu_id); + result = WxGetAssistant.wxGetAssistant(assistantShop, dbProd.spu_id); if (result.Contains("mcn magic invalid")) return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"拥金上货失败:请先登录上货助手\"}"; } @@ -1697,7 +1706,7 @@ namespace TemuKJD.WXForms.ProductForms var addCommissionRateRst = GetHtml.PostUtf8(url, date); } } - Invoke(new Action(() => + Invoke(new Action(() => { minCommissionRate = this.txtMinUpCommission.Text.Trim().ParseToInt() * 10000; maxCommissionRate = this.txtMaxUpCommission.Text.Trim().ParseToInt() * 10000; @@ -1895,7 +1904,7 @@ namespace TemuKJD.WXForms.ProductForms if (!string.IsNullOrEmpty(dbProd.sku_edit_json)) prodJObj["detail"]["sku"] = JArray.Parse(JsonHelper.SerializeObject(JsonHelper.DeserializeJsonToList(dbProd.sku_edit_json))); // 过滤sku敏感词 - if (lstTitleReplaceText.Count> 0) + if (lstTitleReplaceText.Count > 0) { var skuJArr = prodJObj["detail"]["sku"] as JArray; try @@ -2211,7 +2220,7 @@ namespace TemuKJD.WXForms.ProductForms #region 过滤重复图片 无论是否打码 bool needAddRandomBlock = false; - bool wantAddRandomBlock = chkImgRandomBlock.Checked && (/*upProdParam.product.info.category.FirstOrDefault()?.name == "图书" ||*/ + bool wantAddRandomBlock = chkImgRandomBlock.Checked && (/*upProdParam.product.info.category.FirstOrDefault()?.name == "图书" ||*/ prodInfo.detail.cats.FirstOrDefault() == "书籍/杂志/报纸" || dbProd.main_cat_name == "图书" || dbProd.main_cat_name == "书籍/杂志/报纸"); { List galls = new List(); @@ -2448,7 +2457,7 @@ namespace TemuKJD.WXForms.ProductForms } // 模拟上传图片 - if (1 == 1) + if (1 == 1) { var upImgAuthRst = WXUpload.getUploadTempImgAuth(shop); for (int i = 0; i < 10 && upImgAuthRst.Contains("LogicError"); i++) @@ -2690,7 +2699,7 @@ namespace TemuKJD.WXForms.ProductForms { upProdParam.product.info.recommendCategory.categoryNames.Add(cateParam.name); } - + // 获取叶子类目id long leafCatId = (upProdParam.product.info.category.LastOrDefault()?.catId).ParseToLong(); //哲学经典著作 @@ -2701,7 +2710,7 @@ namespace TemuKJD.WXForms.ProductForms return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"获取类目保证金失败\"}"; var maxBount = txtFilterBoundMax.Text.Trim().ParseToInt(); var minBount = txtFilterBoundMin.Text.Trim().ParseToInt(); - if (bound.cat_bound < minBount || bound.cat_bound > maxBount ) + if (bound.cat_bound < minBount || bound.cat_bound > maxBount) return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目保证金(" + bound.cat_bound + ")超过过滤限制(" + minBount + "-" + maxBount + ")\"}"; // 定向类目需指定品牌Id @@ -2714,7 +2723,7 @@ namespace TemuKJD.WXForms.ProductForms var rst = WXUpload.getMixBrand(shop, leafCatId.ToString()); Invoke(new Action(() => { spBrandName = cmbSpBrandName.Text.Trim(); })); - + if (!string.IsNullOrEmpty(spBrandName) && rst.Contains("\"code\":0")) { var jObj = JsonHelper.JObjectParse(rst); @@ -3179,7 +3188,7 @@ namespace TemuKJD.WXForms.ProductForms return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"运费模板获取失败 " + ex.Message + "\"}"; } } - if (shipPrice <=0) + if (shipPrice <= 0) { return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"运费模板获取失败 未获取到\"}"; } @@ -3293,8 +3302,8 @@ namespace TemuKJD.WXForms.ProductForms } } } - catch (Exception ex) - { + catch (Exception ex) + { } // api上传图片文件 详情图 @@ -3419,7 +3428,7 @@ namespace TemuKJD.WXForms.ProductForms // 直接转换微信回采 if (BaseClass.UserAuthority.ParseToString().Contains("微信回采") && chkUseWXComplateProd.Checked && dbProd.has_wx_format == "1" && wxEditProdInfo != null) { - foreach(var wxEditPropParam in wxEditProdInfo.product.info.param) + foreach (var wxEditPropParam in wxEditProdInfo.product.info.param) { var wxPropParam = new wxPropParam(); upProdParam.product.info.param.Add(wxPropParam); @@ -3483,7 +3492,7 @@ namespace TemuKJD.WXForms.ProductForms } if (propInfo.values.Count == 0) continue; - + var attr = productAttr.attr.FirstOrDefault(r => r.name == propInfo.name); if (attr == null) @@ -3644,7 +3653,7 @@ namespace TemuKJD.WXForms.ProductForms } else if (attr.name == "产地") { - if(attr.type == "select_one") + if (attr.type == "select_one") { //北京;天津;上海;重庆;河北石家庄;河北唐山;河北秦皇岛;河北邯郸;河北邢台;河北保定;河北张家口;河北承德;河北沧州;河北廊坊;河北衡水;山西太原;山西大同;山西阳泉;山西长治;山西晋城;山西朔州;山西晋中;山西运城;山西忻州;山西临汾;山西吕梁;内蒙古呼和浩特;内蒙古包头;内蒙古乌海;内蒙古赤峰;内蒙古通辽;内蒙古鄂尔多斯;内蒙古呼伦贝尔;内蒙古巴彦淖尔;内蒙古乌兰察布;内蒙古兴安;内蒙古锡林郭勒;内蒙古阿拉善;辽宁沈阳;辽宁大连;辽宁鞍山;辽宁抚顺;辽宁本溪;辽宁丹东;辽宁锦州;辽宁营口;辽宁阜新;辽宁辽阳;辽宁盘锦;辽宁铁岭;辽宁朝阳;辽宁葫芦岛;吉林长春;吉林吉林;吉林四平;吉林辽源;吉林通化;吉林白山;吉林松原;吉林白城;吉林延边;黑龙江哈尔滨;黑龙江齐齐哈尔;黑龙江鸡西;黑龙江鹤岗;黑龙江双鸭山;黑龙江大庆;黑龙江伊春;黑龙江佳木斯;黑龙江七台河;黑龙江牡丹江;黑龙江黑河;黑龙江绥化;黑龙江大兴安岭;江苏南京;江苏无锡;江苏徐州;江苏常州;江苏苏州;江苏南通;江苏连云港;江苏淮安;江苏盐城;江苏扬州;江苏镇江;江苏泰州;江苏宿迁;浙江杭州;浙江宁波;浙江温州;浙江嘉兴;浙江湖州;浙江绍兴;浙江金华;浙江衢州;浙江舟山;浙江台州;浙江丽水;安徽合肥;安徽芜湖;安徽蚌埠;安徽淮南;安徽马鞍山;安徽淮北;安徽铜陵;安徽安庆;安徽黄山;安徽滁州;安徽阜阳;安徽宿州;安徽六安;安徽亳州;安徽池州;安徽宣城;福建福州;福建厦门;福建莆田;福建三明;福建泉州;福建漳州;福建南平;福建龙岩;福建宁德;江西南昌;江西景德镇;江西萍乡;江西九江;江西新余;江西鹰潭;江西赣州;江西吉安;江西宜春;江西抚州;江西上饶;山东济南;山东青岛;山东淄博;山东枣庄;山东东营;山东烟台;山东潍坊;山东济宁;山东泰安;山东威海;山东日照;山东临沂;山东德州;山东聊城;山东滨州;山东菏泽;河南郑州;河南开封;河南洛阳;河南平顶山;河南安阳;河南鹤壁;河南新乡;河南焦作;河南濮阳;河南许昌;河南漯河;河南三门峡;河南南阳;河南商丘;河南信阳;河南周口;河南驻马店;河南济源;湖北武汉;湖北黄石;湖北十堰;湖北宜昌;湖北襄阳;湖北鄂州;湖北荆门;湖北孝感;湖北荆州;湖北黄冈;湖北咸宁;湖北随州;湖北恩施;湖北仙桃;湖北潜江;湖北天门;湖北神农架;湖南长沙;湖南株洲;湖南湘潭;湖南衡阳;湖南邵阳;湖南岳阳;湖南常德;湖南张家界;湖南益阳;湖南郴州;湖南永州;湖南怀化;湖南娄底;湖南湘西;广东广州;广东韶关;广东深圳;广东珠海;广东汕头;广东佛山;广东江门;广东湛江;广东茂名;广东肇庆;广东惠州;广东梅州;广东汕尾;广东河源;广东阳江;广东清远;广东东莞;广东中山;广东潮州;广东揭阳;广东云浮;广西南宁;广西柳州;广西桂林;广西梧州;广西北海;广西防城港;广西钦州;广西贵港;广西玉林;广西百色;广西贺州;广西河池;广西来宾;广西崇左;海南海口;海南三亚;海南三沙;海南儋州;海南五指山;海南琼海;海南文昌;海南万宁;海南东方;海南定安;海南屯昌;海南澄迈;海南临高;海南白沙;海南昌江;海南乐东;海南陵水;海南保亭;海南琼中;四川成都;四川自贡;四川攀枝花;四川泸州;四川德阳;四川绵阳;四川广元;四川遂宁;四川内江;四川乐山;四川南充;四川眉山;四川宜宾;四川广安;四川达州;四川雅安;四川巴中;四川资阳;四川阿坝;四川甘孜;四川凉山;贵州贵阳;贵州六盘水;贵州遵义;贵州安顺;贵州毕节;贵州铜仁;贵州黔西南;贵州黔东南;贵州黔南;云南昆明;云南曲靖;云南玉溪;云南保山;云南昭通;云南丽江;云南普洱;云南临沧;云南楚雄;云南红河;云南文山;云南西双版纳;云南大理;云南德宏;云南怒江;云南迪庆;西藏拉萨;西藏日喀则;西藏昌都;西藏林芝;西藏山南;西藏那曲;西藏阿里;陕西西安;陕西铜川;陕西宝鸡;陕西咸阳;陕西渭南;陕西延安;陕西汉中;陕西榆林;陕西安康;陕西商洛;甘肃兰州;甘肃嘉峪关;甘肃金昌;甘肃白银;甘肃天水;甘肃武威;甘肃张掖;甘肃平凉;甘肃酒泉;甘肃庆阳;甘肃定西;甘肃陇南;甘肃临夏;甘肃甘南;青海西宁;青海海东;青海海北;青海黄南;青海海南;青海果洛;青海玉树;青海海西;宁夏银川;宁夏石嘴山;宁夏吴忠;宁夏固原;宁夏中卫;新疆乌鲁木齐;新疆克拉玛依;新疆吐鲁番;新疆哈密;新疆昌吉;新疆博尔塔拉;新疆巴音郭楞;新疆阿克苏;新疆克孜勒苏;新疆喀什;新疆和田;新疆伊犁;新疆塔城;新疆阿勒泰;新疆石河子;新疆阿拉尔;新疆图木舒克;新疆五家渠;新疆北屯;新疆铁门关;新疆双河;新疆可克达拉;新疆昆玉;新疆胡杨河;新疆新星;新疆白杨 //北京;天津;上海;重庆;河北;山西;内蒙古;辽宁;吉林;黑龙江;江苏;浙江;安徽;福建;江西;山东;河南;湖北;湖南;广东;广西;海南;四川;贵州;云南;西藏;陕西;甘肃;青海;宁夏;新疆 @@ -3897,8 +3906,8 @@ namespace TemuKJD.WXForms.ProductForms foreach (var wxPropParam in upProdParam.product.info.param) { if (wxPropParam.categorys.Count > 0 && - wxPropParam.categorys.FirstOrDefault().name == "作者" && (wxPropParam.categorys.LastOrDefault().name == "无" || - wxPropParam.categorys.LastOrDefault().name == "-" || wxPropParam.categorys.LastOrDefault().name == "/") ) + wxPropParam.categorys.FirstOrDefault().name == "作者" && (wxPropParam.categorys.LastOrDefault().name == "无" || + wxPropParam.categorys.LastOrDefault().name == "-" || wxPropParam.categorys.LastOrDefault().name == "/")) { wxPropParam.categorys.LastOrDefault().name = upProdParam.product.info.param.FirstOrDefault(p => p.categorys.FirstOrDefault()?.name == "出版社名称").categorys.LastOrDefault()?.name; } @@ -4150,11 +4159,11 @@ namespace TemuKJD.WXForms.ProductForms if (prodInfo.detail.sku == null) prodInfo.detail.sku = new List(); if (prodInfo.detail.sku.Count == 0) - prodInfo.detail.sku.Add(new sku_item() { spec = new List() }); + prodInfo.detail.sku.Add(new sku_item() { spec = new List() }); if (prodInfo.detail.sku.FirstOrDefault().spec == null) prodInfo.detail.sku.FirstOrDefault().spec = new List(); if (prodInfo.detail.sku.FirstOrDefault().spec.Count == 0) - prodInfo.detail.sku.FirstOrDefault().spec.Add(new spec_item() { parent_name = "规格", spec_name = "默认" }); + prodInfo.detail.sku.FirstOrDefault().spec.Add(new spec_item() { parent_name = "规格", spec_name = "默认" }); if (prodInfo.detail.sku.FirstOrDefault().thumb_url.IsNullOrEmpty()) prodInfo.detail.sku.FirstOrDefault().thumb_url = prodInfo.detail.galleries.FirstOrDefault(g => g.type == 1)?.url; @@ -4643,7 +4652,7 @@ namespace TemuKJD.WXForms.ProductForms // 微信店采直接复制 //else if (dbProd.product_get_type_text == "微信店采" && upProdParam.product.info.category.FirstOrDefault()?.name != "图书" && // upProdParam.product.info.category.FirstOrDefault()?.name != "食品饮料") - else if (dbProd.product_get_type_text == "微信店采" && + else if (dbProd.product_get_type_text == "微信店采" && upProdParam.product.info.category.FirstOrDefault()?.name == "成人用品" && upProdParam.product.info.category[1].name != "情趣内衣") { upProdParam.product.info.qualificationList.Clear(); @@ -4949,7 +4958,7 @@ namespace TemuKJD.WXForms.ProductForms // 测量文本的高度 textSize = g.MeasureString(isbn.Replace("ISBN/CN刊号:", "ISBN "), font, txtWidth); txtTop += 20 + textSize.Height; - + // 以下从下往上写 txtTop = imgH - txtBottom; // 测量文本的高度 @@ -5550,7 +5559,7 @@ namespace TemuKJD.WXForms.ProductForms var error = BaseRegex.GetStringJson(ref uploadDraftRst, "msg"); if (string.IsNullOrEmpty(error)) { - if(uploadDraftRst.Contains("\"errcode\":9401043")) + if (uploadDraftRst.Contains("\"errcode\":9401043")) error = "sku价格异常,请检查加价比例"; else error = uploadDraftRst; @@ -5660,19 +5669,19 @@ namespace TemuKJD.WXForms.ProductForms //getEditProd = getEditProd.Replace("33333333", "8387633147"); string productJson = ""; - try + try { // 获取免审编辑回传数据 JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }; var prodStr = JsonConvert.SerializeObject(upProdParam, jsonSetting); - JObject jObj = JsonHelper.JObjectParse(prodStr); + JObject jObj = JsonHelper.JObjectParse(prodStr); JObject jObjTmp = JsonHelper.JObjectParse(getEditProd); jObj["product"] = jObjTmp["product"]; //productJson = productJson.Replace("999", "1005"); jObj["product"]["status"] = 1; //默认为5 - foreach(var sku in jObj["product"]["productSkus"]) + foreach (var sku in jObj["product"]["productSkus"]) { sku["productSkuInfo"]["stockInfo"]["stockNum"] = "1000"; sku["productSkuInfo"]["stockInfo"]["totalNum"] = "1000"; @@ -5687,7 +5696,7 @@ namespace TemuKJD.WXForms.ProductForms // 提交上架 //var uploadProdRst = WXUpload.upProductJObjectV2(shop, productJson); } - catch (Exception ex) + catch (Exception ex) { } @@ -5721,7 +5730,7 @@ namespace TemuKJD.WXForms.ProductForms var jObj = JsonHelper.JObjectParse(productJson); - foreach(JObject skuObj in jObj["product"]["productSkus"]) + foreach (JObject skuObj in jObj["product"]["productSkus"]) { skuObj["productSkuInfo"]["stockInfo"]["stockNum"] = 1005; @@ -5968,7 +5977,7 @@ namespace TemuKJD.WXForms.ProductForms } return "{\"success\":true,\"location\":\"" + location + "\"}"; } - + private void btnStop_Click(object sender, EventArgs e) { if (this.cancellationTokenSource != null) @@ -5984,7 +5993,7 @@ namespace TemuKJD.WXForms.ProductForms private void btnRandomAdd_Click(object sender, EventArgs e) { btnRandomAdd.Enabled = false; - Task.Run(() => + Task.Run(() => { Thread.Sleep(5000); Invoke(new Action(() => @@ -6059,7 +6068,7 @@ namespace TemuKJD.WXForms.ProductForms var productNameLst = new List() { prod.product_name }; if (chkRandomFissionProduct.Checked) { - Invoke(new Action(() => + Invoke(new Action(() => { var titleCount = txtRandomFissionProductCount.Text.Trim().ParseToInt(); if (prod.fission_words.ParseToString().Length > 20 && titleCount > 0) @@ -6524,7 +6533,7 @@ namespace TemuKJD.WXForms.ProductForms var shop = GlobalConfig.ValidShopLoginList.FirstOrDefault(s => s.ShopId == row.Cells["colSupplierId"].Value.ParseToString()); if (shop == null) continue; - var t =Task.Run(() => + var t = Task.Run(() => { UploadSameTime(shop, prodParam, row.Cells["colOpResult"]); }); @@ -6863,7 +6872,7 @@ namespace TemuKJD.WXForms.ProductForms private void btnReverse_Click(object sender, EventArgs e) { - foreach(DataGridViewRow row in dgvShop.Rows) + foreach (DataGridViewRow row in dgvShop.Rows) { if (row.Visible == true) row.Cells["colSelect"].Value = !row.Cells["colSelect"].Value.ParseToBool(); @@ -7040,7 +7049,7 @@ namespace TemuKJD.WXForms.ProductForms cmbSourceType.Text = "厂商直采"; cmbJstInitSet.Text = "是"; // 商品采集用户无货源选择权限只能随机自己的商品 - if ((BaseClass.UserAuthority.Contains("商品采集") || BaseClass.ParentAuthority.Contains("商品采集")) && + if ((BaseClass.UserAuthority.Contains("商品采集") || BaseClass.ParentAuthority.Contains("商品采集")) && !BaseClass.UserAuthority.Contains("货源选择") && BaseClass.SaLevel == 0) { cmbSourceType.Text = "多多商品,1688商品,微信商品"; @@ -7241,7 +7250,7 @@ Content-Type: image/jpeg string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradecategory/cgi/getSingleCategoryData?token=&lang=zh_CN&categoryId=" + catId; string referer = "https://store.weixin.qq.com/shop/brandAndCat/category/apply?defaultCategoryIds=" + GetHtml.UrlEncodeUtf8(catIds) + "&source=goods&type=apply"; var result = WXHttpResponseBLL.WeiXinGetResponse(shop, url, referer); - + return result; } @@ -7280,7 +7289,7 @@ Content-Type: image/jpeg /// /// /// - public static string getAddress(ShopLoginInfo shop, string searchText="") + public static string getAddress(ShopLoginInfo shop, string searchText = "") { string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeexpress/cgi/getAddress?token=&lang=zh_CN"; if (!string.IsNullOrEmpty(searchText)) @@ -7367,7 +7376,7 @@ Content-Type: image/jpeg /// public static string getEditProductV2(ShopLoginInfo shop, string productId) { - string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeproductcore/cgi/goods/getEditProductV2?token=&lang=zh_CN&productKey=%7B%22productId%22:" + + string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeproductcore/cgi/goods/getEditProductV2?token=&lang=zh_CN&productKey=%7B%22productId%22:" + productId + "%7D&needRealStock=true&preview=false&release=false"; //url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeproductcore/cgi/goods/getEditProductV2?token=&lang=zh_CN&productKey=%7B%22productId%22:" + // productId + "%7D&needRealStock=true&preview=false&release=true"; @@ -7474,14 +7483,14 @@ Content-Type: application/octet-stream /// /// 添加售后地址 /// - public static string addAddress(ShopLoginInfo shop, string provinceName, string cityName, string countyName, + public static string addAddress(ShopLoginInfo shop, string provinceName, string cityName, string countyName, string detailInfo, string userName, string telNumber) { string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeexpress/address/addAddress?token=&lang=zh_CN"; string referer = "https://store.weixin.qq.com/shop/address/expressAddressMgmt"; - string address = "{\"addressInfo\":{\"provinceName\":\"" + provinceName + - "\",\"cityName\":\"" + cityName + "\",\"countyName\":\"" + countyName + - "\",\"detailInfo\":\"" + detailInfo + "\",\"userName\":\"" + userName + + string address = "{\"addressInfo\":{\"provinceName\":\"" + provinceName + + "\",\"cityName\":\"" + cityName + "\",\"countyName\":\"" + countyName + + "\",\"detailInfo\":\"" + detailInfo + "\",\"userName\":\"" + userName + "\",\"telNumber\":\"" + telNumber + "\",\"location\":{}},\"defaultSend\":0,\"defaultRecv\":0}"; JObject obj = new JObject(); @@ -7490,7 +7499,7 @@ Content-Type: application/octet-stream var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer); return result; } - + /// /// 获取服务接口到期时间 /// @@ -7514,7 +7523,7 @@ Content-Type: application/octet-stream { string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradehome/home/getAndUpdateWebStatus?token=&lang=zh_CN"; string referer = "https://store.weixin.qq.com/shop/home"; - string body = @"{""timeQuery"":{""startMs"":" + BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now.Date.AddDays(-1)) + + string body = @"{""timeQuery"":{""startMs"":" + BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now.Date.AddDays(-1)) + @",""endMs"":" + BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now.Date.AddSeconds(-1)) + @"}}"; var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer); return result; @@ -7524,7 +7533,7 @@ Content-Type: application/octet-stream { string url = "https://store.weixin.qq.com/shop-faas/mmecnodeproductupload/common/cgi/goods/addLeagueItemForUpdatingProduct?token=&lang=zh_CN"; string referer = "https://store.weixin.qq.com/shop/home"; - string body = @"{""itemSwitch"":" + itemSwitch + @",""itemRatio"":" + itemRatio + @",""headSupplierPublicItemSwitch"":" + headSupplierItemSwitch + + string body = @"{""itemSwitch"":" + itemSwitch + @",""itemRatio"":" + itemRatio + @",""headSupplierPublicItemSwitch"":" + headSupplierItemSwitch + @",""headSupplierPublicItemServiceRatio"":" + HeadSupplierItemRatio + @",""productId"":" + prodId + @",""scene"":2,""updType"":" + updType + @"}"; var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer); return result;