diff --git a/AllBase/AllBase.csproj b/AllBase/AllBase.csproj
index 73cd94b..fb71675 100644
--- a/AllBase/AllBase.csproj
+++ b/AllBase/AllBase.csproj
@@ -201,6 +201,7 @@
+
diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs
index 616bc5f..6d43e70 100644
--- a/AllBase/BaseClass.cs
+++ b/AllBase/BaseClass.cs
@@ -27,7 +27,7 @@ namespace AllBase
///
/// 版本ID
///
- public static int VersionCount = 927;
+ public static int VersionCount = 929;
//public static int VersionCount = 613;
///
diff --git a/AllBase/Model/Result/WXResult/WXAddressInfo.cs b/AllBase/Model/Result/WXResult/WXAddressInfo.cs
new file mode 100644
index 0000000..e8f608a
--- /dev/null
+++ b/AllBase/Model/Result/WXResult/WXAddressInfo.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AllBase.Model.Result.WXResult
+{
+ public class WX1688AddressInfo
+ {
+ public int id { get; set; }
+ public string supplier_name { get; set; }
+ public string coid { get; set; }
+ public string after_sale_json { get; set; }
+ public DateTime add_time { get; set; }
+ public DateTime mdy_time { get; set; }
+ public string type { get; set; }
+ }
+}
diff --git a/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs b/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs
index 94d8bb4..159a1d0 100644
--- a/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs
+++ b/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs
@@ -4,6 +4,7 @@ using KJD_Web.Utils;
using MySql.Data.MySqlClient;
using Mysqlx.Crud;
using NaiBa.Util.Extension;
+using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
@@ -11,6 +12,7 @@ using System.Linq;
using System.Threading;
using System.Web;
using System.Web.Security;
+using System.Web.UI.HtmlControls;
namespace KJD_Web.BLL.WXXD
{
@@ -598,13 +600,13 @@ namespace KJD_Web.BLL.WXXD
//int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
//int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
string coid = RegexUtils.GetStringQuery(ref inputData, "coid")?.Replace("'", "\\'");
- string after_sale_json = RegexUtils.GetStringQuery(ref inputData, "after_sale_json")?.Replace("'", "\\'");
+ string after_sale_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "after_sale_json"))?.Replace("'", "\\'");
if (string.IsNullOrEmpty("coid"))
return "{\"code\":50001,\"msg\":\"没有售后编号\"}";
if (string.IsNullOrEmpty("after_sale_json"))
return "{\"code\":50001,\"msg\":\"没有售后信息\"}";
- string supplier_name = RegexUtils.GetStringQuery(ref inputData, "supplier_name")?.Replace("'", "\\'");
- string type = RegexUtils.GetStringQuery(ref inputData, "type")?.Replace("'", "\\'");
+ string supplier_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "supplier_name"))?.Replace("'", "\\'");
+ string type = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "type"))?.Replace("'", "\\'");
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
@@ -717,6 +719,136 @@ namespace KJD_Web.BLL.WXXD
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
+ public string WXGetAfterSaleList(string inputData)
+ {
+ if (!string.IsNullOrEmpty(inputData))
+ {
+ var timeCalc = DateTime.Now;
+ var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
+ string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
+ if (time1 != EncrypUtil.Encryption(time))
+ return "{\"code\":50000,\"msg\":\"校验失败\"}";
+
+ var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
+ if (string.IsNullOrEmpty(user_name))
+ {
+ return "{\"code\":50001,\"msg\":\"没有用户名\"}";
+ }
+
+ int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
+ int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
+ string coid = RegexUtils.GetStringQuery(ref inputData, "coid")?.Replace("'", "\\'");
+ string type = RegexUtils.GetStringQuery(ref inputData, "type")?.Replace("'", "\\'");
+ string supplier_name = RegexUtils.GetStringQuery(ref inputData, "supplier_name")?.Replace("'", "\\'");
+ string detail = RegexUtils.GetStringQuery(ref inputData, "detail")?.Replace("'", "\\'");
+
+ string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
+ MysqlUtils mySql = new MysqlUtils(conn);
+
+ string sql = "SELECT count(*) FROM `wxxd`.`after_sale` where 1=1";
+
+ string where = "";
+ if (coid != null)
+ where += " and coid='" + coid + "'";
+ if (type != null)
+ where += " and type='" + type + "'";
+ if (supplier_name != null)
+ where += " and supplier_name='" + supplier_name + "'";
+ if (detail != null)
+ where += " and after_sale_json like '%" + detail + "%'";
+ sql += where;
+ sql += ";";
+
+ var count = 0;
+ count = mySql.ExecuteRowCount(sql);
+
+ DataTable dt;
+ if (count == 0)
+ {
+ dt = new DataTable();
+ }
+ else
+ {
+ sql = "SELECT * FROM `wxxd`.`after_sale` where 1=1";
+ sql += where;
+ sql += " order by id desc limit " + Math.Max(0, page - 1) * page_size + "," + page_size + ";";
+ dt = mySql.ExecuteDataTable(sql);
+ mySql.Close();
+ }
+
+ if (dt != null)
+ {
+ try
+ {
+ List WXAddressInfoLst = new List();
+ foreach (DataRow row in dt.Rows)
+ {
+ WXAddressInfoLst.Add(new WXAddressInfo()
+ {
+ id = row["id"].ParseToInt(),
+ after_sale_json = row["after_sale_json"].ParseToString(),
+ coid = row["coid"].ParseToString(),
+ supplier_name = row["supplier_name"].ParseToString(),
+ type = row["type"].ParseToString(),
+ add_time = Convert.ToDateTime(row["add_time"]),
+ mdy_time = Convert.ToDateTime(row["mdy_time"]),
+ });
+ }
+ JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
+ var data = JsonUtils.SerializerObjectToString(WXAddressInfoLst, jsonSetting);
+ var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
+ return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
+ }
+ catch (Exception ex)
+ {
+ return "{\"code\":500,\"msg\":\"" + ex.Message + "\",\"data\":[],\"count\":" + 0 + "}";
+ }
+ }
+ else
+ {
+ return "{\"code\":500,\"msg\":\"" + mySql.Message + "\",\"data\":[],\"count\":" + 0 + "}";
+ }
+ }
+ return "{\"code\":19999,\"msg\":\"输入为空\"}";
+ }
+
+ public string WXDelAddress(string inputData)
+ {
+ if (!string.IsNullOrEmpty(inputData))
+ {
+ var timeCalc = DateTime.Now;
+ var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
+ string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
+ if (time1 != EncrypUtil.Encryption(time))
+ return "{\"code\":50000,\"msg\":\"校验失败\"}";
+
+ var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
+ if (string.IsNullOrEmpty(user_name))
+ {
+ return "{\"code\":50001,\"msg\":\"没有用户名\"}";
+ }
+ var coid = RegexUtils.GetStringQuery(ref inputData, "coid");
+ if (string.IsNullOrEmpty(coid))
+ {
+ return "{\"code\":50002,\"msg\":\"没有售后地址编号\"}";
+ }
+
+ string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
+ MysqlUtils mySql = new MysqlUtils(conn);
+ string sql = "delete from wxxd.after_sale where coid='" + coid + "'";
+
+ var rst = mySql.ExecuteNonQuery(sql);
+ mySql.Close();
+ if (rst)
+ {
+ return "{\"code\":200,\"msg\":\"success\"}";
+ }
+ else
+ return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
+ }
+ return "{\"code\":19999,\"msg\":\"未知错误\"}";
+ }
+
public string WXAddMdyShippingTemplate(string inputData)
{
if (!string.IsNullOrEmpty(inputData))
diff --git a/KJDService/KJD_WebService/KJD_WebService.csproj b/KJDService/KJD_WebService/KJD_WebService.csproj
index 3611451..10f429b 100644
--- a/KJDService/KJD_WebService/KJD_WebService.csproj
+++ b/KJDService/KJD_WebService/KJD_WebService.csproj
@@ -117,6 +117,7 @@
+
diff --git a/KJDService/KJD_WebService/KJD_WebService.csproj.user b/KJDService/KJD_WebService/KJD_WebService.csproj.user
index c789fae..4bcdc04 100644
--- a/KJDService/KJD_WebService/KJD_WebService.csproj.user
+++ b/KJDService/KJD_WebService/KJD_WebService.csproj.user
@@ -1,4 +1,4 @@
-
+
true
diff --git a/KJDService/KJD_WebService/Model/WXAddressInfo.cs b/KJDService/KJD_WebService/Model/WXAddressInfo.cs
new file mode 100644
index 0000000..ecdc51d
--- /dev/null
+++ b/KJDService/KJD_WebService/Model/WXAddressInfo.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace KJD_Web.Model
+{
+ public class WXAddressInfo
+ {
+ public int id { get; set; }
+ public string supplier_name { get; set; }
+ public string coid { get; set; }
+ public string after_sale_json { get; set; }
+ public DateTime add_time { get; set; }
+ public DateTime mdy_time { get; set; }
+ public string type { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/KJDService/KJD_WebService/WXProductService.asmx.cs b/KJDService/KJD_WebService/WXProductService.asmx.cs
index a2c8906..4305860 100644
--- a/KJDService/KJD_WebService/WXProductService.asmx.cs
+++ b/KJDService/KJD_WebService/WXProductService.asmx.cs
@@ -183,6 +183,28 @@ namespace KJD_Web
Context.Response.Write(result);
Context.Response.End();
}
+ [WebMethod]
+ public void wx_get_after_sale_list()
+ {
+ string jsontext = GetRequestJsonString();
+
+ var result = jsontext;
+ result = new WXProductManage().WXGetAfterSaleList(jsontext);
+
+ Context.Response.Write(result);
+ Context.Response.End();
+ }
+ [WebMethod]
+ public void wx_del_address()
+ {
+ string jsontext = GetRequestJsonString();
+
+ var result = jsontext;
+ result = new WXProductManage().WXDelAddress(jsontext);
+
+ Context.Response.Write(result);
+ Context.Response.End();
+ }
//WXAddMdyAfterSale
[WebMethod]
diff --git a/TEMUKJD/BLL/ShopBLL.cs b/TEMUKJD/BLL/ShopBLL.cs
index 02d9cec..950330b 100644
--- a/TEMUKJD/BLL/ShopBLL.cs
+++ b/TEMUKJD/BLL/ShopBLL.cs
@@ -84,19 +84,18 @@ namespace TemuKJD.BLL
}
- public static string MdyPDDServerShopSubInfo(ShopLoginInfo _shop)
+ public static string MdyPDDWXServerShopSubInfo(ShopLoginInfo _shop, bool updateNotes = true, bool updateGroup = true, bool updateSubUser = true)
{
var url = BaseClass.BuildObjString("shop/mdy_shop");
var data = UserLogin.GetSignaturex();
data += "&login_name=" + _shop.LoginName;
data += "&login_pass=" + GetHtml.UrlEncodeUtf8(_shop.Password);
- data += "¬es=" + GetHtml.UrlEncodeUtf8(_shop.Notes);
- data += "&group_name=" + GetHtml.UrlEncodeUtf8(_shop.GroupName);
- if (BaseClass.GroupId == 3) // 子账户子账户编辑权限
- {
+ if (updateNotes)
+ data += "¬es=" + GetHtml.UrlEncodeUtf8(_shop.Notes);
+ if (updateGroup)
+ data += "&group_name=" + GetHtml.UrlEncodeUtf8(_shop.GroupName);
+ if (BaseClass.GroupId == 3 && updateSubUser) // 子账户用户无子账户编辑权限
data += "&sub_user_name=" + GetHtml.UrlEncodeUtf8(_shop.SubUserName);
- }
-
var result = GetHtml.PostUtf8(url, data);
if (!result.Contains("\"code\":200") && !result.Contains("已达上限") && !result.Contains("已存在"))
diff --git a/TEMUKJD/BaseForms/BaseGeneralForm.cs b/TEMUKJD/BaseForms/BaseGeneralForm.cs
index 7d73c59..20d9164 100644
--- a/TEMUKJD/BaseForms/BaseGeneralForm.cs
+++ b/TEMUKJD/BaseForms/BaseGeneralForm.cs
@@ -287,10 +287,10 @@ namespace TemuKJD.BaseForms
{
this.SaveComplete?.Invoke(param);
}
- public event Action
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WXShopAddEditForm));
this.panel2 = new System.Windows.Forms.Panel();
+ this.txtChatNick = new DevComponents.DotNetBar.Controls.TextBoxX();
+ this.label7 = new System.Windows.Forms.Label();
this.btnOk = new TemuKJD.UserControls.ButtonEx();
- this.label8 = new System.Windows.Forms.Label();
this.txtNotes = new DevComponents.DotNetBar.Controls.TextBoxX();
this.lblAttention = 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.txtChatNick = new DevComponents.DotNetBar.Controls.TextBoxX();
- this.label7 = new System.Windows.Forms.Label();
+ this.chkSubAccount = new TemuKJD.UserComponent.UcCheckBox(this.components);
+ this.chkNotes = new TemuKJD.UserComponent.UcCheckBox(this.components);
+ this.chkShopGroup = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.panel2.SuspendLayout();
this.SuspendLayout();
//
@@ -57,21 +58,21 @@
this.panel2.Controls.Add(this.txtChatNick);
this.panel2.Controls.Add(this.label7);
this.panel2.Controls.Add(this.btnOk);
- this.panel2.Controls.Add(this.label8);
this.panel2.Controls.Add(this.txtNotes);
this.panel2.Controls.Add(this.lblAttention);
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.chkSubAccount);
+ this.panel2.Controls.Add(this.chkNotes);
+ this.panel2.Controls.Add(this.chkShopGroup);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(1, 33);
this.panel2.Name = "panel2";
@@ -79,6 +80,36 @@
this.panel2.TabIndex = 1;
this.panel2.Paint += new System.Windows.Forms.PaintEventHandler(this.panel2_Paint);
//
+ // txtChatNick
+ //
+ //
+ //
+ //
+ this.txtChatNick.Border.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.txtChatNick.Border.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.txtChatNick.Border.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.txtChatNick.Border.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.txtChatNick.Border.Class = "CrumbBarBackgroundKey";
+ this.txtChatNick.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.txtChatNick.Border.PaddingBottom = 2;
+ this.txtChatNick.Border.PaddingLeft = 2;
+ this.txtChatNick.Border.PaddingRight = 2;
+ this.txtChatNick.Border.PaddingTop = 2;
+ this.txtChatNick.Location = new System.Drawing.Point(91, 95);
+ this.txtChatNick.Name = "txtChatNick";
+ this.txtChatNick.ReadOnly = true;
+ this.txtChatNick.Size = new System.Drawing.Size(172, 23);
+ this.txtChatNick.TabIndex = 388;
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(17, 98);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(68, 17);
+ this.label7.TabIndex = 387;
+ this.label7.Text = "子账户昵称";
+ //
// btnOk
//
this.btnOk.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -95,15 +126,6 @@
this.btnOk.UseVisualStyleBackColor = false;
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
//
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.Location = new System.Drawing.Point(29, 131);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(56, 17);
- this.label8.TabIndex = 386;
- this.label8.Text = " 备注";
- //
// txtNotes
//
//
@@ -202,15 +224,6 @@
this.txtChatAccount.Click += new System.EventHandler(this.txt_Click);
this.txtChatAccount.TextChanged += new System.EventHandler(this.txtChat_TextChanged);
//
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(29, 65);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(56, 17);
- this.label4.TabIndex = 379;
- this.label4.Text = " 子账户";
- //
// txtUploadAccount
//
//
@@ -275,44 +288,41 @@
this.label1.TabIndex = 0;
this.label1.Text = "登录账号";
//
- // label5
+ // chkSubAccount
//
- this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(29, 167);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(56, 17);
- this.label5.TabIndex = 377;
- this.label5.Text = "店铺分组";
+ this.chkSubAccount.AutoSize = true;
+ this.chkSubAccount.Checked = true;
+ this.chkSubAccount.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.chkSubAccount.Location = new System.Drawing.Point(30, 63);
+ this.chkSubAccount.Name = "chkSubAccount";
+ this.chkSubAccount.Size = new System.Drawing.Size(63, 21);
+ this.chkSubAccount.TabIndex = 389;
+ this.chkSubAccount.Text = "子账户";
+ this.chkSubAccount.UseVisualStyleBackColor = true;
//
- // txtChatNick
+ // chkNotes
//
+ this.chkNotes.AutoSize = true;
+ this.chkNotes.Checked = true;
+ this.chkNotes.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.chkNotes.Location = new System.Drawing.Point(42, 129);
+ this.chkNotes.Name = "chkNotes";
+ this.chkNotes.Size = new System.Drawing.Size(51, 21);
+ this.chkNotes.TabIndex = 390;
+ this.chkNotes.Text = "备注";
+ this.chkNotes.UseVisualStyleBackColor = true;
//
+ // chkShopGroup
//
- //
- this.txtChatNick.Border.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
- this.txtChatNick.Border.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
- this.txtChatNick.Border.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
- this.txtChatNick.Border.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
- this.txtChatNick.Border.Class = "CrumbBarBackgroundKey";
- this.txtChatNick.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
- this.txtChatNick.Border.PaddingBottom = 2;
- this.txtChatNick.Border.PaddingLeft = 2;
- this.txtChatNick.Border.PaddingRight = 2;
- this.txtChatNick.Border.PaddingTop = 2;
- this.txtChatNick.Location = new System.Drawing.Point(91, 95);
- this.txtChatNick.Name = "txtChatNick";
- this.txtChatNick.ReadOnly = true;
- this.txtChatNick.Size = new System.Drawing.Size(172, 23);
- this.txtChatNick.TabIndex = 388;
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.Location = new System.Drawing.Point(17, 98);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(68, 17);
- this.label7.TabIndex = 387;
- this.label7.Text = "子账户昵称";
+ this.chkShopGroup.AutoSize = true;
+ this.chkShopGroup.Checked = true;
+ this.chkShopGroup.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.chkShopGroup.Location = new System.Drawing.Point(18, 163);
+ this.chkShopGroup.Name = "chkShopGroup";
+ this.chkShopGroup.Size = new System.Drawing.Size(75, 21);
+ this.chkShopGroup.TabIndex = 391;
+ this.chkShopGroup.Text = "店铺分组";
+ this.chkShopGroup.UseVisualStyleBackColor = true;
//
// WXShopAddEditForm
//
@@ -340,18 +350,18 @@
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 lblAttention;
- private System.Windows.Forms.Label label8;
private DevComponents.DotNetBar.Controls.TextBoxX txtNotes;
private DevComponents.DotNetBar.Controls.TextBoxX txtChatNick;
private System.Windows.Forms.Label label7;
+ public UserComponent.UcCheckBox chkSubAccount;
+ public UserComponent.UcCheckBox chkNotes;
+ public UserComponent.UcCheckBox chkShopGroup;
}
}
\ No newline at end of file
diff --git a/TEMUKJD/WXForms/ShopForms/WXShopAddEditForm.cs b/TEMUKJD/WXForms/ShopForms/WXShopAddEditForm.cs
index c82e1d6..4ba3f83 100644
--- a/TEMUKJD/WXForms/ShopForms/WXShopAddEditForm.cs
+++ b/TEMUKJD/WXForms/ShopForms/WXShopAddEditForm.cs
@@ -10,6 +10,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
+using AllBase;
namespace TemuKJD.WXForms.ShopForms
{
@@ -52,19 +53,28 @@ namespace TemuKJD.WXForms.ShopForms
shop.LoginName = this.txtLoginName.Text.Trim();
if (!string.IsNullOrEmpty(this.txtShopPassword.Text.Trim()))
shop.Password = DataOpenSSL.EncryptString(this.txtShopPassword.Text.Trim());
- shop.GroupName = this.cmbGroup.Text;
- shop.Notes = this.txtNotes.Text;
+
+ if (chkNotes.Checked)
+ shop.Notes = this.txtNotes.Text;
+ if (chkShopGroup.Checked)
+ shop.GroupName = this.cmbGroup.Text;
+ if (chkSubAccount.Checked)
+ shop.SubUserName = shopSubAccountTmp.SubUserName;
+
shop.CompanyName = AllBase.BaseClass.CompanyName;
foreach (var sp in lstShopLoginInfo)
{
- sp.GroupName = this.cmbGroup.Text;
- sp.Notes = this.txtNotes.Text;
sp.CompanyName = AllBase.BaseClass.CompanyName;
- sp.SubUserName = shop.SubUserName;
+ if (chkNotes.Checked)
+ sp.Notes = this.txtNotes.Text;
+ if (chkShopGroup.Checked)
+ sp.GroupName = this.cmbGroup.Text;
+ if (chkSubAccount.Checked)
+ sp.SubUserName = shop.SubUserName;
}
- this.OnSaveComplete(lstShopLoginInfo, isAdd);
+ this.OnSaveComplete(lstShopLoginInfo, isAdd, this);
this.Close();
}
@@ -131,26 +141,28 @@ namespace TemuKJD.WXForms.ShopForms
}
+ ShopLoginInfo shopSubAccountTmp;
private void txt_Click(object sender, EventArgs e)
{
- WXSubAccountShopEditForm f = new WXSubAccountShopEditForm(shop);
+ shopSubAccountTmp = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(shop));
+ WXSubAccountShopEditForm f = new WXSubAccountShopEditForm(shopSubAccountTmp);
f.SaveComplete += F_SaveComplete;
f.ShowDialog();
}
private void F_SaveComplete(object obj)
{
- var shop = obj as ShopLoginInfo;
- if (shop != null)
+ var shopSubAccountTmp = obj as ShopLoginInfo;
+ if (shopSubAccountTmp != null)
{
- this.txtBuyAccount.Text = shop.BuyAccount;
- this.txtChatAccount.Text = shop.ChatAccount;
- this.txtUploadAccount.Text = shop.UploadAccount;
+ this.txtBuyAccount.Text = shopSubAccountTmp.BuyAccount;
+ this.txtChatAccount.Text = shopSubAccountTmp.ChatAccount;
+ this.txtUploadAccount.Text = shopSubAccountTmp.UploadAccount;
- this.txtChatAccount.Text = shop.SubUserName;
- if (!string.IsNullOrEmpty(shop.SubUserName))
+ this.txtChatAccount.Text = shopSubAccountTmp.SubUserName;
+ if (!string.IsNullOrEmpty(shopSubAccountTmp.SubUserName))
{
- var subUserNames = shop.SubUserName.Split(',').Where(su => !string.IsNullOrEmpty(su));
+ var subUserNames = shopSubAccountTmp.SubUserName.Split(',').Where(su => !string.IsNullOrEmpty(su));
var subUsers = WXSubAccountShopEditForm.lstAllSubAccount.Where(su => subUserNames.Contains(su.user_name));
this.txtChatNick.Text = string.Join(",", subUsers.Select(s => s.nick_name));
}
diff --git a/TEMUKJD/WXForms/ShopForms/WXShopListForm.Designer.cs b/TEMUKJD/WXForms/ShopForms/WXShopListForm.Designer.cs
index 960c685..e0caea8 100644
--- a/TEMUKJD/WXForms/ShopForms/WXShopListForm.Designer.cs
+++ b/TEMUKJD/WXForms/ShopForms/WXShopListForm.Designer.cs
@@ -288,7 +288,7 @@
this.cmbGroup.DropDownWidth = 1;
this.cmbGroup.FormattingEnabled = true;
this.cmbGroup.IntegralHeight = false;
- this.cmbGroup.Location = new System.Drawing.Point(307, 5);
+ this.cmbGroup.Location = new System.Drawing.Point(307, 8);
this.cmbGroup.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
this.cmbGroup.Name = "cmbGroup";
this.cmbGroup.Size = new System.Drawing.Size(48, 25);
@@ -314,7 +314,7 @@
this.cmbNotes.DropDownWidth = 1;
this.cmbNotes.FormattingEnabled = true;
this.cmbNotes.IntegralHeight = false;
- this.cmbNotes.Location = new System.Drawing.Point(224, 5);
+ this.cmbNotes.Location = new System.Drawing.Point(224, 8);
this.cmbNotes.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
this.cmbNotes.Name = "cmbNotes";
this.cmbNotes.Size = new System.Drawing.Size(48, 25);
@@ -447,7 +447,7 @@
this.cmbSubAccount.DropDownWidth = 1;
this.cmbSubAccount.FormattingEnabled = true;
this.cmbSubAccount.IntegralHeight = false;
- this.cmbSubAccount.Location = new System.Drawing.Point(402, 5);
+ this.cmbSubAccount.Location = new System.Drawing.Point(402, 8);
this.cmbSubAccount.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
this.cmbSubAccount.Name = "cmbSubAccount";
this.cmbSubAccount.Size = new System.Drawing.Size(48, 25);
diff --git a/TEMUKJD/WXForms/ShopForms/WXShopListForm.cs b/TEMUKJD/WXForms/ShopForms/WXShopListForm.cs
index 705c1bf..379e6fc 100644
--- a/TEMUKJD/WXForms/ShopForms/WXShopListForm.cs
+++ b/TEMUKJD/WXForms/ShopForms/WXShopListForm.cs
@@ -255,8 +255,9 @@ namespace TemuKJD.WXForms.ShopForms
btnRefreshCookie_Click(null, null);
}
- private void Sae_SaveComplete(object obj, object isAdd)
+ private void Sae_SaveComplete(object obj, object isAdd, object sender)
{
+ WXShopAddEditForm saeForm = sender as WXShopAddEditForm;
var shopInfoLst = obj as List;
if (shopInfoLst != null)
{
@@ -296,7 +297,7 @@ namespace TemuKJD.WXForms.ShopForms
this.statusBar.pgbTaskProgress.Maximum = shopInfoLst.Count;
i++;
}));
- ShopBLL.MdyPDDServerShopSubInfo(shopInfo);
+ ShopBLL.MdyPDDWXServerShopSubInfo(shopInfo, saeForm.chkNotes.Checked, saeForm.chkShopGroup.Checked, saeForm.chkSubAccount.Checked);
}
RefreshDataGridView(false);
//btnRefreshCookie_Click(null, null);
@@ -1156,6 +1157,7 @@ namespace TemuKJD.WXForms.ShopForms
List shopNameList = GetCheckedList();
List shops = GlobalConfig.ShopLoginList.Where(s => shopNameList.Contains(s.ShopId)).ToList();
WXShopAddEditForm editForm = new WXShopAddEditForm(shops);
+ editForm.chkSubAccount.Checked = editForm.chkShopGroup.Checked = editForm.chkNotes.Checked = false;
editForm.SaveCompleteWithDescribe += Sae_SaveComplete;
editForm.ShowDialog();
}
diff --git a/Work/Initialization.cs b/Work/Initialization.cs
index ce8a234..d2dd941 100644
--- a/Work/Initialization.cs
+++ b/Work/Initialization.cs
@@ -707,22 +707,40 @@ offCountPara,false;offProductPara,100;IrregularitiesPara,true;noNeerPara,true;no
}
//ZipFile.ExtractToDirectory(tempFile, upTempPath);
//File.Delete(tempFile);
- if (!FileBase.Exists("temp\\wxCat"))
+ //if (!FileBase.Exists("temp\\wxCat"))
+ //{
+ // if(GetHtml.DownloadFile(BaseClass.ServerUrl + "/Download/" + "wxCat.zip", "temp\\wxCat.dll" + ".bak"))
+ // {
+ // FileBase.Move("temp\\wxCat.dll" + ".bak", "temp\\wxCat.zip");
+ // ZipFile.ExtractToDirectory(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat.zip"), Path.Combine(Environment.CurrentDirectory, "temp"));
+ // File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat.zip"));
+ // }
+ //}
+ if (!FileBase.Exists("temp\\wxCat60323"))
{
- if(GetHtml.DownloadFile(BaseClass.ServerUrl + "/Download/" + "wxCat.zip", "temp\\wxCat.dll" + ".bak"))
+ if (GetHtml.DownloadFile(BaseClass.ServerUrl + "/Download/" + "wxCat60323.zip", "temp\\wxCat60323.dll" + ".bak"))
{
- FileBase.Move("temp\\wxCat.dll" + ".bak", "temp\\wxCat.zip");
- ZipFile.ExtractToDirectory(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat.zip"), Path.Combine(Environment.CurrentDirectory, "temp"));
- File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat.zip"));
+ FileBase.Move("temp\\wxCat60323.dll" + ".bak", "temp\\wxCat60323.zip");
+ ZipFile.ExtractToDirectory(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60323.zip"), Path.Combine(Environment.CurrentDirectory, "temp"));
+ File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60323.zip"));
}
}
- if (!FileBase.Exists("temp\\wxCatBound"))
+ //if (!FileBase.Exists("temp\\wxCatBound"))
+ //{
+ // if (GetHtml.DownloadFile(BaseClass.ServerUrl + "/Download/" + "wxCatBound.zip", "temp\\wxCatBound.dll" + ".bak"))
+ // {
+ // FileBase.Move("temp\\wxCatBound.dll" + ".bak", "temp\\wxCatBound.zip");
+ // ZipFile.ExtractToDirectory(Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound.zip"), Path.Combine(Environment.CurrentDirectory, "temp"));
+ // File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound.zip"));
+ // }
+ //}
+ if (!FileBase.Exists("temp\\wxCatBound60323"))
{
- if (GetHtml.DownloadFile(BaseClass.ServerUrl + "/Download/" + "wxCatBound.zip", "temp\\wxCatBound.dll" + ".bak"))
+ if (GetHtml.DownloadFile(BaseClass.ServerUrl + "/Download/" + "wxCatBound60323.zip", "temp\\wxCatBound60323.dll" + ".bak"))
{
- FileBase.Move("temp\\wxCatBound.dll" + ".bak", "temp\\wxCatBound.zip");
- ZipFile.ExtractToDirectory(Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound.zip"), Path.Combine(Environment.CurrentDirectory, "temp"));
- File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound.zip"));
+ FileBase.Move("temp\\wxCatBound60323.dll" + ".bak", "temp\\wxCatBound60323.zip");
+ ZipFile.ExtractToDirectory(Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound60323.zip"), Path.Combine(Environment.CurrentDirectory, "temp"));
+ File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound60323.zip"));
}
}