子账户显示昵称 客服加入批量登录 客服登录后页面不刷新问题修复

This commit is contained in:
wule committed 2026-03-21 13:49:01 +08:00
1 parent b502c6a2ed
commit 8e919b0bd7
22 files changed
+869 -217

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ namespace AllBase
/// <summary>
/// 版本ID
/// </summary>
public static int VersionCount = 921;
public static int VersionCount = 927;
//public static int VersionCount = 613;
/// <summary>
@@ -603,11 +603,13 @@ namespace KJD_Web.BLL.WXXD
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 conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "SELECT * FROM `wxxd`.`after_sale` where coid='" + coid + "'";
string sql = "SELECT coid FROM `wxxd`.`after_sale` where coid='" + coid + "'";
string where = "";
sql += where;
@@ -621,16 +623,23 @@ namespace KJD_Web.BLL.WXXD
mySql = new MysqlUtils(conn);
if (dt.Rows.Count == 0)
{
sql = "INSERT INTO `wxxd`.`after_sale` (coid,after_sale_json) VALUES (@coid,@after_sale_json);";
sql = "INSERT INTO `wxxd`.`after_sale` (coid,after_sale_json,supplier_name,type) VALUES (@coid,@after_sale_json,@supplier_name,@type);";
}
else
{
sql = "UPDATE `wxxd`.`after_sale` SET after_sale_json=@after_sale_json WHERE coid=@coid;";
sql = "UPDATE `wxxd`.`after_sale` SET after_sale_json=@after_sale_json";
if (supplier_name != null)
sql += ", supplier_name=@supplier_name ";
if (type != null)
sql += ", type=@type ";
sql += " WHERE coid=@coid;";
}
List<MySqlParameter> paramLst = new List<MySqlParameter>();
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "coid", Value = coid, });
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "after_sale_json", Value = after_sale_json, });
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "supplier_name", Value = supplier_name.ParseToString(), });
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "type", Value = type.IsNullOrEmpty() ? "jst" : type, });
mySql.ExecuteNonQuery(sql, paramLst.ToArray());
mySql.Close();
if (string.IsNullOrEmpty(mySql.Message))
+357 -7
View File
@@ -1,5 +1,6 @@
using AllBase;
using AllBase.Model.Result;
using AllBase.Model.Result._1688;
using AllBase.Model.Result.PDDResult;
using AllBase.Model.Result.WXResult;
using NaiBa.Util.Extension;
@@ -652,7 +653,7 @@ namespace TemuKJD.BLL
shipment_limit_second_list = null,
sku69_code = "",
};
// 供应商价加价10%(最低1元)赚取差价
// 聚水潭供应商价加价10%(最低1元)赚取差价
int addPrice = (skuInfo.multi_price * 0.1).ParseToInt();
if (addPrice < 100)
addPrice = 100;
@@ -1117,12 +1118,12 @@ namespace TemuKJD.BLL
shipment_limit_second_list = null,
sku69_code = "",
};
// 供应商价加价10%(最低1元)赚取差价
int addPrice = (skuInfo.multi_price * 0.1).ParseToInt();
if (addPrice < 100)
addPrice = 100;
skuInfo.multi_price += addPrice;
skuInfo.price += addPrice;
//// 聚水潭供应商价加价10%(最低1元)赚取差价
//int addPrice = (skuInfo.multi_price * 0.1).ParseToInt();
//if (addPrice < 100)
// addPrice = 100;
//skuInfo.multi_price += addPrice;
//skuInfo.price += addPrice;
foreach (var wxSpec in wxEditSkuInfo.productSkuInfo.saleParam)
{
skuInfo.spec.Add(new spec_item()
@@ -1175,6 +1176,7 @@ namespace TemuKJD.BLL
propInfo.values = new List<value_item>();
foreach (var wxPropVal in wxProp.categorys)
{
// 第一个是属性名,装载属性值的时候跳过
if (wxProp.categorys.IndexOf(wxPropVal) == 0)
continue;
@@ -1204,5 +1206,353 @@ namespace TemuKJD.BLL
return null;
}
}
public PDDProductInfo _1688ClientToPddConvert(out string convertRst, KJDDBProduct dbProd)
{
convertRst = "";
try
{
var prod_json = dbProd.product_json;
var _1688Json = BaseRegex.GetOneJsonObjStrJson(ref prod_json, "_1688DetailData");
_1688ClientProductInfo _1688ClentProdInfo = JsonHelper.DeserializeJsonToObject<_1688ClientProductInfo>(_1688Json);
PDDProductInfo prodInfo = new PDDProductInfo()
{
sale_count = dbProd.sale_count.ParseToString(),
sale_count_text = dbProd.sale_count_text,
};
prodInfo.chance_id = null;
prodInfo.chance_refere = null;
prodInfo.chance_tab = null;
prodInfo.decoration = null;
// 商品详情
prodInfo.detail = new PDDProductDetailInfo();
prodInfo.detail.allergy_refund = 0;
prodInfo.detail.allowed_region = new List<object>();
//prodInfo.detail.appeal_status = null;
//prodInfo.detail.app_id = null;
//prodInfo.detail.app_name = null;
//prodInfo.detail.bad_claim_text = null;
prodInfo.detail.bad_fruit_claim = 0;
//prodInfo.detail.business_source_type = null;
prodInfo.detail.can_appeal = null;
prodInfo.detail.card_verification_list = null;
prodInfo.detail.cats = new List<string>();
prodInfo.detail.cat_id = dbProd.cat_id.ParseToInt();
prodInfo.detail.cat_ids = new List<int?>();
//foreach (var category in _1688EditProdInfo.product.info.category)
//{
// prodInfo.detail.cat_ids.Add(category.catId.ParseToInt());
//}
prodInfo.detail.check_status = 9;
//prodInfo.detail.check_type = null;
//prodInfo.detail.client_id = null;
prodInfo.detail.commit_deleted = 0;
//prodInfo.detail.commit_extension = null;
//prodInfo.detail.community_group_buying = null;
prodInfo.detail.cost_template_id = 0;
//prodInfo.detail.country = null;
prodInfo.detail.country_id = 0;
//prodInfo.detail.created_at = null;
//prodInfo.detail.creator_name = null;
prodInfo.detail.customizable = 0;
prodInfo.detail.customs = "";
prodInfo.detail.damage_claim = 0;
prodInfo.detail.delivery_one_day = 0;
//prodInfo.detail.delivery_type = null;
//prodInfo.detail.elec_goods_attributes = null;
prodInfo.detail.estimate_quantity = 0;
prodInfo.detail.event_type = 0;
prodInfo.detail.extend_warranty_dto = new extend_warranty_dto_item() { extend_warranty = 0 };
//prodInfo.detail.fabric = null;
//prodInfo.detail.fabric_content = null;
prodInfo.detail.galleries = new List<gallery_item>();
foreach (var imgItem in _1688ClentProdInfo.mainImage)
{
prodInfo.detail.galleries.Add(new gallery_item()
{
url = imgItem,
type = 1,
});
}
foreach (var imgItem in _1688ClentProdInfo.offerImgList)
{
prodInfo.detail.galleries.Add(new gallery_item()
{
url = imgItem,
type = 2,
});
}
prodInfo.detail.gold_price_template_id = null;
prodInfo.detail.gold_price_type = null;
prodInfo.detail.goods_certificate = null;
prodInfo.detail.goods_commit_check = new List<object>();
prodInfo.detail.goods_desc = _1688ClentProdInfo.tempModel.offerTitle;
prodInfo.detail.goods_id = _1688ClentProdInfo.tempModel.offerId;
prodInfo.detail.goods_name = _1688ClentProdInfo.tempModel.offerTitle;
prodInfo.detail.goods_name_prefix = "";
prodInfo.detail.goods_pattern = 8;
prodInfo.detail.goods_property_list = null;
prodInfo.detail.goods_sn = null;
prodInfo.detail.goods_srv_templates = new List<object>();
prodInfo.detail.goods_trade_attr = null;
prodInfo.detail.goods_travel_attr = null;
prodInfo.detail.goods_type = 1;
prodInfo.detail.groups = new group_item() { single_price = 0, group_price = 0, customer_num = 2, buy_limit = 999999, order_limit = 999999 };
// 复用前面已经填写过的
prodInfo.detail.hd_thumb_url = prodInfo.detail.galleries.FirstOrDefault(g => g.type == 1)?.url;
// 编辑id,随意填写
prodInfo.detail.id = 0;
// 复用前面已经填写过的
prodInfo.detail.image_url = prodInfo.detail.galleries.FirstOrDefault(g => g.type == 1)?.url;
prodInfo.detail.instruction_vo = new instruction_vo_item() { template_status = -1 };
prodInfo.detail.invoice_mode = null;
prodInfo.detail.invoice_mode_sub_type = null;
prodInfo.detail.invoice_status = 0;
prodInfo.detail.is_all_weight_same = true;
prodInfo.detail.is_app = 0;
prodInfo.detail.is_bangdan = 0;
prodInfo.detail.is_card_secret = false;
prodInfo.detail.is_certificate_provide = 0;
prodInfo.detail.is_customized = 0;
prodInfo.detail.is_customs = 0;
prodInfo.detail.is_deposit = false;
prodInfo.detail.is_draft = false;
prodInfo.detail.is_folt = 0;
prodInfo.detail.is_general_trade = 0;
prodInfo.detail.is_gold_price_matched = null;
prodInfo.detail.is_goods_copy = null;
prodInfo.detail.is_goods_decoration = 1;
prodInfo.detail.is_group_pre_sale = 0;
prodInfo.detail.is_only_for_remote_area = false;
prodInfo.detail.is_pre_sale = 0;
prodInfo.detail.is_refundable = 1;
prodInfo.detail.is_refundable_fifteen_day = 0;
prodInfo.detail.is_shop = 1;
prodInfo.detail.is_size_change_casually = 0;
prodInfo.detail.is_sku_pre_sale = 0;
prodInfo.detail.is_sku_shipment = 0;
prodInfo.detail.is_small_group = null;
prodInfo.detail.is_spring_festival_open_tag = false;
prodInfo.detail.is_two_num_group = false;
prodInfo.detail.is_warranty_one_year = 0;
prodInfo.detail.is_wms = 0;
prodInfo.detail.is_wp_service = 0;
prodInfo.detail.lack_of_weight_claim = 0;
prodInfo.detail.last_commit_check_status = 2;
prodInfo.detail.list_desc = new List<object>();
prodInfo.detail.local_service_id_list = null;
prodInfo.detail.mai_jia_zi_ti = null;
// 1688没有
prodInfo.detail.mall_id = 0;
// 1688没有
prodInfo.detail.mall_info = new mall_info_item();
// 1688没有此处随意填
prodInfo.detail.market_price = 0;
// 1688没有此处随意填
prodInfo.detail.max_group_price = 0;
// 1688没有此处随意填
prodInfo.detail.min_group_price = 0;
prodInfo.detail.must_check_type = 0;
prodInfo.detail.name_prefix = "";
prodInfo.detail.origin_country_id = 0;
prodInfo.detail.origin_country_name = "";
// 货号 1688没有(没找到)
prodInfo.detail.out_goods_sn = "";//_1688EditProdInfo.product.info.spuCode;
//if (prodInfo.detail.out_goods_sn.IsNullOrEmpty())
//{
// convertRst = "货号不存在";
// return null;
//}
prodInfo.detail.out_source_goods_id = null;
prodInfo.detail.out_source_type = null;
prodInfo.detail.oversea_goods = null;
prodInfo.detail.oversea_type = 0;
prodInfo.detail.owner = "主账号";
prodInfo.detail.owner_name = "";
prodInfo.detail.paper_length = null;
prodInfo.detail.paper_net_weight = null;
prodInfo.detail.paper_plies_num = null;
prodInfo.detail.paper_width = null;
prodInfo.detail.pre_sale_time = 0;
prodInfo.detail.privacy_delivery = 0;
prodInfo.detail.processing_charges = null;
prodInfo.detail.processing_charges_type = null;
prodInfo.detail.promised_delivery_seconds = null;
prodInfo.detail.purchase_info_supply = 0;
prodInfo.detail.qualification_id_list = new List<object>();
prodInfo.detail.quan_guo_lian_bao = 0;
prodInfo.detail.quick_refund = 0;
prodInfo.detail.reason = null;
prodInfo.detail.region_limit = 1;
prodInfo.detail.reject_reason = null;
prodInfo.detail.reject_status = null;
prodInfo.detail.same_city_template_id = 0;
prodInfo.detail.schedule_sale = new schedule_sale_item() { sale_type = 0 };
prodInfo.detail.second_hand = 0;
prodInfo.detail.sf_markup_template_sn = null;
prodInfo.detail.shang_men_an_zhuang = null;
// 1688没有
prodInfo.detail.share_desc = "";
prodInfo.detail.shipment_limit_second = 172800;
prodInfo.detail.shoes_template_id = null;
prodInfo.detail.shop_group_id = null;
prodInfo.detail.shop_group_name = null;
prodInfo.detail.show_activity_price = false;
prodInfo.detail.size_parent_spec_id = null;
prodInfo.detail.size_spec_id = null;
prodInfo.detail.sku = new List<sku_item>();
foreach (string skuKey in _1688ClentProdInfo.skuModel.skuInfoMap.Keys)
{
_1688skuInfo _1688skuInfo = _1688ClentProdInfo.skuModel.skuInfoMap[skuKey];
sku_item skuInfo = new sku_item()
{
id = 0,
// 聚水潭为string,散列取数值
sku_id = _1688skuInfo.skuId.ParseToLong(),
sku_sn = null,
carnival_price = 0,
init_quantity = 0,
is_onsale = 1,
limit_quantity = 999999,
multi_price = (_1688skuInfo.price.ParseToDecimal() * 100 + _1688ClentProdInfo.postFeeValue.ParseToDecimal() * 100).ParseToInt(),
multi_price_in_yuan = null,
price = (_1688skuInfo.price.ParseToDecimal() * 100 + _1688ClentProdInfo.postFeeValue.ParseToDecimal() * 100).ParseToInt() + 100,
price_in_yuan = null,
quantity = _1688skuInfo.canBookCount,
reserve_quantity = 0,
weight = 0,
//thumb_url = _1688skuInfo.productSkuInfo.thumbImg,
thumb_url_file_id = null,
thumb_url_status = null,
thumb_url_is_deleted = null,
quantity_delta = 0,
spec = new List<spec_item>(),
// sku货号下面单独设置
out_sku_sn = "",
batch_id = null,
priority = 1,
ware_id = 0,
ware_biz_type = null,
advice_price = null,
length = null,
oversea_sku = null,
cspu_id = null,
child_skus = null,
ref_sku_commit_id = 0,
start_time = null,
end_time = null,
sku_srv_templates = null,
calendar_rule_id = null,
hot_live_group = null,
pre_sale_time = 0,
out_source_sku_id = null,
dd_grocery_sku_params = null,
sku_extended_attribute_dtos = null,
sku_basic_property_dtos = null,
spec_note_map = null,
delivery_schedule_dtos = null,
shipment_limit_second_list = null,
sku69_code = "",
};
//// 聚水潭供应商价加价10%(最低1元)赚取差价
//int addPrice = (skuInfo.multi_price * 0.1).ParseToInt();
//if (addPrice < 100)
// addPrice = 100;
//skuInfo.multi_price += addPrice;
//skuInfo.price += addPrice;
foreach (_1688skuProp _1688skuProp in _1688ClentProdInfo.skuModel.skuProps)
{
foreach (_1688skuValue _1688SpecValue in _1688skuProp.value)
{
if (("&gt;" + skuKey + "&gt;").Contains("&gt;" + _1688SpecValue.name + "&gt;"))
{
skuInfo.spec.Add(new spec_item()
{
parent_id = _1688skuProp.fid.ParseToLong(),
parent_name = _1688skuProp.prop,
spec_id = 0,
spec_name = _1688SpecValue.name,
});
if (!string.IsNullOrEmpty(_1688SpecValue.imageUrl))
skuInfo.thumb_url = _1688SpecValue.imageUrl;
}
}
}
// 1688前端数据没找到货号字段
skuInfo.out_sku_sn = ""; //_1688skuInfo.productSkuInfo.skuCode;
prodInfo.detail.sku.Add(skuInfo);
}
prodInfo.detail.sku_type = null;
prodInfo.detail.song_huo_an_zhuang = null;
prodInfo.detail.song_huo_ru_hu = null;
prodInfo.detail.source = 0;
prodInfo.detail.spu_id = null;
prodInfo.detail.spu_version = null;
prodInfo.detail.submit_time = 0;
prodInfo.detail.thawed_refund = 0;
prodInfo.detail.third_type = 0;
// 复用前面填过的主图
prodInfo.detail.thumb_url = prodInfo.detail.galleries.FirstOrDefault(g => g.type == 1)?.url;
prodInfo.detail.tiny_name = "";
prodInfo.detail.transport_type_list = null;
prodInfo.detail.two_pieces_discount = 99;
prodInfo.detail.user_source = 1;
prodInfo.detail.warehouse = "";
prodInfo.detail.warm_tips = "";
prodInfo.detail.zhi_huan_bu_xiu = 0;
prodInfo.size = null;
prodInfo.material1 = null;
prodInfo.material3 = null;
prodInfo.property = new PDDProductPropertyInfo();
prodInfo.property.sku_properties = new object();
prodInfo.property.goods_properties = new List<goods_propertie_item>();
if (1 == 1)
{
foreach (_1688featureAttributes _1688Attr in _1688ClentProdInfo.offerDetail.featureAttributes)
{
string name = _1688Attr.name;
goods_propertie_item propInfo = new goods_propertie_item();
prodInfo.property.goods_properties.Add(propInfo);
propInfo.name = name;
propInfo.ref_pid = null;
//propInfo.wx_input_type = wxProp.categorys.FirstOrDefault()?.catInfo.inputType;
propInfo.values = new List<value_item>();
List<string> values = (_1688Attr.values == null || _1688Attr.values.Count() == 0) ? _1688Attr.decisionValues : _1688Attr.values;
foreach (var wxPropVal in values)
{
propInfo.values.Add(new value_item()
{
value = wxPropVal,
raw_value = wxPropVal,
vid = null,
unit = ""
});
}
}
}
else
{
//outGoodsParam.productAttrs.Add(new osProductAttrParam { attrKey = "品牌", attrValue = "无品牌" });
}
// 主图 复用前面的
dbProd.main_img = prodInfo.detail.galleries.FirstOrDefault(g => g.type == 1).url;
dbProd.product_json = JsonHelper.SerializeObject(prodInfo);
return prodInfo;
}
catch (Exception ex)
{
convertRst = "转换错误 " + ex.Message;
return null;
}
}
}
}
+4 -1
View File
@@ -92,7 +92,10 @@ namespace TemuKJD.BLL
data += "&login_pass=" + GetHtml.UrlEncodeUtf8(_shop.Password);
data += "&notes=" + GetHtml.UrlEncodeUtf8(_shop.Notes);
data += "&group_name=" + GetHtml.UrlEncodeUtf8(_shop.GroupName);
data += "&sub_user_name=" + GetHtml.UrlEncodeUtf8(_shop.SubUserName);
if (BaseClass.GroupId == 3) // 子账户子账户编辑权限
{
data += "&sub_user_name=" + GetHtml.UrlEncodeUtf8(_shop.SubUserName);
}
var result = GetHtml.PostUtf8(url, data);
@@ -265,6 +265,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms
return;
}
}
if (dbProd.product_get_type_text == "1688厂家")
{
canEdit = false;
string convertRst = "";
var ob = new PDDProdFormConverter()._1688ClientToPddConvert(out convertRst, dbProd);
if (!string.IsNullOrEmpty(convertRst))
{
BaseMsgForm.ShowError("商品结构获取失败");
return;
}
}
PDDDBProdEditDetailForm editDetailForm = new PDDDBProdEditDetailForm(this.dbProd);
if (!canEdit)
+8 -7
View File
@@ -564,7 +564,7 @@ namespace TemuKJD.ToolForms
this.splitContainer1.Panel2.Controls.Add(this.label2);
this.splitContainer1.Panel2.Controls.Add(this.line1);
this.splitContainer1.Size = new System.Drawing.Size(1404, 561);
this.splitContainer1.SplitterDistance = 473;
this.splitContainer1.SplitterDistance = 461;
this.splitContainer1.SplitterWidth = 3;
this.splitContainer1.TabIndex = 4;
//
@@ -580,7 +580,7 @@ namespace TemuKJD.ToolForms
this.ucTabControlMetro1.Name = "ucTabControlMetro1";
this.ucTabControlMetro1.SelectedIndex = 0;
this.ucTabControlMetro1.ShowCloseButton = false;
this.ucTabControlMetro1.Size = new System.Drawing.Size(1404, 473);
this.ucTabControlMetro1.Size = new System.Drawing.Size(1404, 461);
this.ucTabControlMetro1.TabIndex = 462;
this.ucTabControlMetro1.TabSelectColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucTabControlMetro1.TabSelectTextColor = System.Drawing.Color.Gray;
@@ -593,7 +593,7 @@ namespace TemuKJD.ToolForms
this.tabPage1.Margin = new System.Windows.Forms.Padding(5);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(1396, 441);
this.tabPage1.Size = new System.Drawing.Size(1396, 442);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "商品页面";
this.tabPage1.UseVisualStyleBackColor = true;
@@ -612,7 +612,7 @@ namespace TemuKJD.ToolForms
this.splitContainer2.Panel1.Controls.Add(this.btnNext);
this.splitContainer2.Panel1.Controls.Add(this.btnPrev);
this.splitContainer2.Panel1.Controls.Add(this.txtAddress);
this.splitContainer2.Size = new System.Drawing.Size(1390, 435);
this.splitContainer2.Size = new System.Drawing.Size(1390, 436);
this.splitContainer2.SplitterDistance = 26;
this.splitContainer2.TabIndex = 6;
//
@@ -654,7 +654,7 @@ namespace TemuKJD.ToolForms
this.tabPage2.Location = new System.Drawing.Point(4, 28);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(1396, 440);
this.tabPage2.Size = new System.Drawing.Size(1396, 429);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "采集商品列表";
this.tabPage2.UseVisualStyleBackColor = true;
@@ -663,7 +663,7 @@ namespace TemuKJD.ToolForms
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(673, 193);
this.pbLoading.Location = new System.Drawing.Point(673, 187);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -710,10 +710,11 @@ namespace TemuKJD.ToolForms
this.colMsg});
this.dgvProduct.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvProduct.Location = new System.Drawing.Point(3, 3);
this.dgvProduct.MultiSelectCheckBox = true;
this.dgvProduct.Name = "dgvProduct";
this.dgvProduct.ReadOnly = true;
this.dgvProduct.RowTemplate.Height = 23;
this.dgvProduct.Size = new System.Drawing.Size(1390, 434);
this.dgvProduct.Size = new System.Drawing.Size(1390, 423);
this.dgvProduct.TabIndex = 7;
this.dgvProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProduct_CellContentClick);
//
+22 -1
View File
@@ -59,7 +59,7 @@ namespace TemuKJD.UserComponent
rowIndex1 = rowIndex2;
rowIndex2 = e.RowIndex;
if (IsShiftDown)
if (IsShiftDown && MultiSelectCheckBox)
{
if (rowIndex1 > -1 && rowIndex2 > -1)
{
@@ -189,5 +189,26 @@ namespace TemuKJD.UserComponent
e.Graphics.DrawRectangle(new Pen(this.BackgroundColor), new Rectangle(1, 1, this.Width - 2, this.Height - 2));
e.Graphics.DrawRectangle(new Pen(this.BorderColor), new Rectangle(0, 0, this.Width - 1, this.Height - 1));
}
private bool multiSelectCheckBox = true;
/// <summary>
/// 选择框批量选中(使用Shift按键)
/// </summary>
[Description("选择框批量选中(Shift)"), Category("UserProperty")]
public bool MultiSelectCheckBox
{
get
{
return multiSelectCheckBox;
}
set
{
if (multiSelectCheckBox != value)
{
multiSelectCheckBox = value;
this.Invalidate();
}
}
}
}
}
@@ -1358,6 +1358,16 @@ namespace TemuKJD.WXForms.ProductForms
}
#endregion
#region 1688格式转换
if (dbProd.product_get_type_text == "1688厂家")
{
string convertRst = "";
var ob = new PDDProdFormConverter()._1688ClientToPddConvert(out convertRst, dbProd);
if (!string.IsNullOrEmpty(convertRst))
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"商品查询错误 " + convertRst + "\"}";
}
#endregion
#region 将产品数据初始化成微信小店支持的参数
JObject prodJObj = new JObject();
try
@@ -3692,7 +3702,8 @@ namespace TemuKJD.WXForms.ProductForms
var error = BaseRegex.GetStringJson(ref uploadDraftRst, "msg");
if (string.IsNullOrEmpty(error))
error = uploadDraftRst;
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"草稿保存失败 " + error + "\"}";
var draftId = BaseRegex.GetStringJson(ref uploadDraftRst, "productId").ParseToLong();
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"草稿保存失败 " + GetHtml.UrlEncodeUtf8(error) + "\"}";
}
if (cell != null)
{
+36 -33
View File
@@ -32,13 +32,13 @@ namespace TemuKJD.WXForms.ProductForms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.label5 = new System.Windows.Forms.Label();
@@ -640,19 +640,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle15.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle15;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvShop.AutoRowNumber = true;
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle16.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle16;
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.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
@@ -670,6 +670,7 @@ namespace TemuKJD.WXForms.ProductForms
this.colMessage});
this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvShop.Location = new System.Drawing.Point(4, 0);
this.dgvShop.MultiSelectCheckBox = false;
this.dgvShop.Name = "dgvShop";
this.dgvShop.ReadOnly = true;
this.dgvShop.RowHeadersWidth = 25;
@@ -790,19 +791,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvTalent.AllowUserToAddRows = false;
this.dgvTalent.AllowUserToDeleteRows = false;
dataGridViewCellStyle17.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvTalent.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle17;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvTalent.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvTalent.AutoRowNumber = true;
this.dgvTalent.BackgroundColor = System.Drawing.Color.White;
this.dgvTalent.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle18.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvTalent.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle18;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvTalent.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.dgvTalent.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvTalent.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -825,6 +826,7 @@ namespace TemuKJD.WXForms.ProductForms
this.colOpResult});
this.dgvTalent.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvTalent.Location = new System.Drawing.Point(0, 0);
this.dgvTalent.MultiSelectCheckBox = true;
this.dgvTalent.Name = "dgvTalent";
this.dgvTalent.ReadOnly = true;
this.dgvTalent.RowTemplate.Height = 23;
@@ -851,8 +853,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colSupplierName
//
dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle19;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5;
this.colSupplierName.Frozen = true;
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.Name = "colSupplierName";
@@ -900,8 +902,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colNickname
//
dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colNickname.DefaultCellStyle = dataGridViewCellStyle20;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colNickname.DefaultCellStyle = dataGridViewCellStyle6;
this.colNickname.HeaderText = "达人昵称";
this.colNickname.Name = "colNickname";
this.colNickname.ReadOnly = true;
@@ -914,8 +916,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colCatScore
//
dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colCatScore.DefaultCellStyle = dataGridViewCellStyle21;
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colCatScore.DefaultCellStyle = dataGridViewCellStyle7;
this.colCatScore.HeaderText = "类目/评分";
this.colCatScore.Name = "colCatScore";
this.colCatScore.ReadOnly = true;
@@ -1099,6 +1101,7 @@ namespace TemuKJD.WXForms.ProductForms
this.chkReUse.TabIndex = 865;
this.chkReUse.Text = "多店复用达人搜索结果";
this.chkReUse.UseVisualStyleBackColor = true;
this.chkReUse.Visible = false;
//
// btnStop2
//
@@ -44,7 +44,7 @@ namespace TemuKJD.WXForms.ProductForms
public ConcurrentList<AuthInfo> lstShopAuthInfo = new ConcurrentList<AuthInfo>();
public ConcurrentList<WXShopTokenInfo> lstWXShopTokenInfo = new ConcurrentList<WXShopTokenInfo>();
public Dictionary<string, bool> dicCheckedShopId = new Dictionary<string, bool>();
//public Dictionary<string, bool> dicCheckedShopId = new Dictionary<string, bool>();
public Dictionary<string, WxShopUploadInfo> dicShopUpload = new Dictionary<string, WxShopUploadInfo>();
WXAddFinderParam wxAddFinderParam = new WXAddFinderParam();
@@ -78,9 +78,9 @@ namespace TemuKJD.WXForms.ProductForms
lstWXShopTokenInfo = new ConcurrentList<WXShopTokenInfo>();
// 选中信息
dicCheckedShopId = NaiBa.Util.Helper.ConfigHelper.LoadConfig<Dictionary<string, bool>>("wx_checked_shop_dic");
if (dicCheckedShopId == null)
dicCheckedShopId = new Dictionary<string, bool>();
//dicCheckedShopId = NaiBa.Util.Helper.ConfigHelper.LoadConfig<Dictionary<string, bool>>("wx_checked_shop_dic");
//if (dicCheckedShopId == null)
// dicCheckedShopId = new Dictionary<string, bool>();
// 上货信息
dicShopUpload = NaiBa.Util.Helper.ConfigHelper.LoadConfig<Dictionary<string, WxShopUploadInfo>>("wx_shop_upload_info");
@@ -298,11 +298,11 @@ namespace TemuKJD.WXForms.ProductForms
}
}
foreach (var r in dgvShop.Rows.Cast<DataGridViewRow>())
{
dicCheckedShopId[r.Cells["colShopId"].Value.ParseToString()] = r.Cells["colSelect"].Value.ParseToBool();
}
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_checked_shop_dic", dicCheckedShopId);
//foreach (var r in dgvShop.Rows.Cast<DataGridViewRow>())
//{
// dicCheckedShopId[r.Cells["colShopId"].Value.ParseToString()] = r.Cells["colSelect"].Value.ParseToBool();
//}
//NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_checked_shop_dic", dicCheckedShopId);
}
private void btnRefreshShop_Click(object sender, EventArgs e)
@@ -344,6 +344,7 @@ namespace TemuKJD.WXForms.ProductForms
{
cmbFilterShopNotes.Items.Add(note);
}
pbLoadingShop.Visible = false;
}
private void BindShop(ShopLoginInfo shopEntity, List<string> selectShopId = null, string msg = "")
@@ -360,7 +361,7 @@ namespace TemuKJD.WXForms.ProductForms
if (row == null)
{
this.dgvShop.Rows.Add(
dicCheckedShopId.Keys.Contains(shopEntity.ShopId) && dicCheckedShopId[shopEntity.ShopId] == true,
dgvShop.Rows.Count == 0 ? true : (selectShopId.Contains(shopEntity.ShopId) && canUse),
shopEntity.LoginName,
shopEntity.ShopId,
shopEntity.ShopAccount,
@@ -427,6 +428,14 @@ namespace TemuKJD.WXForms.ProductForms
string shopAccount = dgvShop.Rows[e.RowIndex].Cells["colShopName"].Value.ToString();
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId.ToString());
var row = dgvShop.Rows[e.RowIndex];
foreach(DataGridViewRow r in dgvShop.Rows)
{
if (r == row)
continue;
if (r.Cells["colSelect"].Value.ParseToBool() == true)
r.Cells["colSelect"].Value = false;
}
row.Cells["colSelect"].Value = true;
if (currentShop != shop)
{
@@ -458,24 +467,24 @@ namespace TemuKJD.WXForms.ProductForms
switch (columnName)
{
case "colSelect":
//if (row.Cells["colCanUse"].Value.ParseToBool())
{
row.Cells["colSelect"].Value = !row.Cells["colSelect"].Value.ParseToBool();
chkSelectAll.CheckedChanged -= chkSelectAll_CheckedChanged;
if (dgvShop.Rows.Cast<DataGridViewRow>().All(r => r.Cells["colSelect"].Value.ParseToBool()))
chkSelectAll.Checked = true;
else
chkSelectAll.Checked = false;
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
}
//else
////if (row.Cells["colCanUse"].Value.ParseToBool())
//{
// //BaseMsgForm.ShowInfo("店铺未登录!");
//}
// row.Cells["colSelect"].Value = !row.Cells["colSelect"].Value.ParseToBool();
dicCheckedShopId[row.Cells["colShopId"].Value.ParseToString()] = row.Cells["colSelect"].Value.ParseToBool();
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_checked_shop_dic", dicCheckedShopId);
// chkSelectAll.CheckedChanged -= chkSelectAll_CheckedChanged;
// if (dgvShop.Rows.Cast<DataGridViewRow>().All(r => r.Cells["colSelect"].Value.ParseToBool()))
// chkSelectAll.Checked = true;
// else
// chkSelectAll.Checked = false;
// chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
//}
////else
////{
//// //BaseMsgForm.ShowInfo("店铺未登录!");
////}
//dicCheckedShopId[row.Cells["colShopId"].Value.ParseToString()] = row.Cells["colSelect"].Value.ParseToBool();
//NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_checked_shop_dic", dicCheckedShopId);
break;
case "colLoginStatus":
{
@@ -574,15 +583,26 @@ namespace TemuKJD.WXForms.ProductForms
private void btnSearchTalent_Click(object sender, EventArgs e)
{
var shopIdLst = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
if (shopIdLst.Count <= 0)
//var shopIdLst = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
// => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
//if (shopIdLst.Count <= 0)
//{
// BaseMsgForm.ShowError("未勾选店铺!");
// return;
//}
if (currentShop == null)
{
BaseMsgForm.ShowError("未勾选店铺!");
BaseMsgForm.ShowError("当前店铺为空!");
return;
}
btnSearchTalent.Enabled = false;
pbLoading.Visible = true;
if (cancellationTokenSource != null)
cancellationTokenSource.Cancel();
cancellationTokenSource = new CancellationTokenSource();
dgvTalent.Rows.Clear();
Task.Run(() =>
@@ -653,7 +673,9 @@ namespace TemuKJD.WXForms.ProductForms
WXShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
if (shop.LoginStatus != "登录成功")
{
Invoke(new Action(() => { BindShop(shop, new List<string>() { shop.ShopId }, "店铺掉线"); }));
var selectIds = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
Invoke(new Action(() => { BindShop(shop, selectIds, "店铺掉线"); }));
}
if (shopRow != null)
@@ -669,13 +691,14 @@ namespace TemuKJD.WXForms.ProductForms
try
{
var talentObj = JsonHelper.JObjectParse(getFinderTalentRst)["list"];
lstWXFinderTalentInfo = JsonHelper.DeserializeJsonToList<WXFinderTalentInfo>(JsonHelper.SerializeObject(talentObj));
var wxFinderTalentInfo = JsonHelper.DeserializeJsonToList<WXFinderTalentInfo>(JsonHelper.SerializeObject(talentObj));
if (page == 1 || 1 == 1)
{
var totalNum = BaseRegex.GetIntJson(ref getFinderTalentRst, "totalNum");
totalPage = Math.Ceiling(1m * totalNum / pageSize).ParseToInt();
}
foreach (var finderTalent in lstWXFinderTalentInfo)
lstWXFinderTalentInfo.AddRange(wxFinderTalentInfo);
foreach (var finderTalent in wxFinderTalentInfo)
{
Invoke(new Action(() =>
{
@@ -918,9 +941,9 @@ namespace TemuKJD.WXForms.ProductForms
BaseMsgForm.ShowError("联系人不能为空");
return;
}
if (wxAddFinderParam.WxNumber.IsNullOrEmpty() || !wxAddFinderParam.WxNumber.StartsWith("wx") || wxAddFinderParam.WxNumber.Length < 6)
if (wxAddFinderParam.WxNumber.IsNullOrEmpty() || wxAddFinderParam.WxNumber.Length < 6)
{
BaseMsgForm.ShowError("请确定微信号不为空,且必须以wx开头,最少六个字符");
BaseMsgForm.ShowError("请确定微信号不为空,最少六个字符");
return;
}
if (wxAddFinderParam.Mobile.IsNullOrEmpty() || wxAddFinderParam.Mobile.ParseToLong().ToString().Length != 11)
@@ -942,6 +965,15 @@ namespace TemuKJD.WXForms.ProductForms
pbLoading.Visible = true;
string prodIds = txtProductIds.Text.Trim();
this.btnAddFinder.Enabled = false;
Task.Run(() => {
Thread.Sleep(5000);
Invoke(new Action(() => { this.btnAddFinder.Enabled = true; }));
});
if (cancellationTokenSource != null)
cancellationTokenSource.Cancel();
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
if (string.IsNullOrEmpty(prodIds))
@@ -984,13 +1016,16 @@ namespace TemuKJD.WXForms.ProductForms
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "达人邀约 第 " + num + " 条,共 " + selectRows.Count + " 条";
row.Cells["colOpResult"].Value = "";
}));
if (this.cancellationTokenSource.IsCancellationRequested)
break;
var shopId = selectRows.FirstOrDefault().Cells["colSupplierId"].Value.ParseToString();
var shopId = row.Cells["colSupplierId"].Value.ParseToString();
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId);
if (chkReUse.Visible && chkReUse.Checked)
shop = currentShop;
var talentAppid = selectRows.FirstOrDefault().Cells["colTalentAppid"].Value.ParseToString();
var talentAppid = row.Cells["colTalentAppid"].Value.ParseToString();
var talent = this.lstWXFinderTalentInfo.FirstOrDefault(t => t.talentAppid == talentAppid);
if (shop!=null && talent != null)
@@ -998,7 +1033,8 @@ namespace TemuKJD.WXForms.ProductForms
List<string> prodIdLst = prodIds.Split(new string[] { ",", ",", ";", ";", " " }, StringSplitOptions.RemoveEmptyEntries).ToList();
var finderUsername = talent.accountList.FirstOrDefault(a => !a.finderUsername.IsNullOrEmpty())?.finderUsername;
var promotionInvitationRst = WXFinderSquareBLL.createPromotionInvitation(shop, prodIdLst, finderUsername, talent.talentAppid,
wxAddFinderParam.ContactPerson, wxAddFinderParam.WxNumber, wxAddFinderParam.Mobile, wxAddFinderParam.Explain);
wxAddFinderParam.ContactPerson, wxAddFinderParam.WxNumber, wxAddFinderParam.Mobile,
wxAddFinderParam.Explain.Replace("\r", "").Replace("\n", ""));
Thread.Sleep(Randomx.GetId(3000, 5000));
if (!promotionInvitationRst.ParseToString().Contains("\"code\":0"))
@@ -1009,7 +1045,9 @@ namespace TemuKJD.WXForms.ProductForms
if (promotionInvitationRst.ParseToString().Contains("biz magic invalid"))
{
shop.LoginStatus = "未登录";
Invoke(new Action(() => { BindShop(shop, new List<string>() { shop.ShopId }, "店铺掉线"); }));
var selectIds = dgvShop.Rows.Cast<DataGridViewRow>().Where(r
=> r.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
Invoke(new Action(() => { BindShop(shop, selectIds, "店铺掉线"); }));
error = "店铺掉线";
}
Invoke(new Action(() =>
@@ -1035,7 +1073,7 @@ namespace TemuKJD.WXForms.ProductForms
this.statusBar.lblTaskStatus.Text += "达人邀约操作结束";
BaseMsgForm.ShowInfo("达人邀约操作结束");
}));
});
}, cancellationTokenSource.Token);
}
public string GetFinderProdList(ShopLoginInfo shop, WXFinderTalentInfo finderTalent)
@@ -1067,7 +1105,9 @@ namespace TemuKJD.WXForms.ProductForms
if (getFinderProdRst.Contains("biz magic invalid"))
{
shop.LoginStatus = "未登录";
Invoke(new Action(() => { BindShop(shop, new List<string>() { shop.ShopId }, "店铺掉线"); }));
var selectIds = dgvShop.Rows.Cast<DataGridViewRow>().Where(r
=> r.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
Invoke(new Action(() => { BindShop(shop, selectIds, "店铺掉线"); }));
return "{\"success\":false,\"msg\":\"查询达人商品列表失败,店铺掉线\"}";
}
var error = BaseRegex.GetStringJson(ref getFinderProdRst, "msg");
@@ -1118,7 +1158,9 @@ namespace TemuKJD.WXForms.ProductForms
if (getProdRst.Contains("biz magic invalid"))
{
shop.LoginStatus = "未登录";
Invoke(new Action(() => { BindShop(shop, new List<string>() { shop.ShopId }, "店铺掉线"); }));
var selectIds = dgvShop.Rows.Cast<DataGridViewRow>().Where(r
=> r.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
Invoke(new Action(() => { BindShop(shop, selectIds, "店铺掉线"); }));
return "{\"success\":false,\"msg\":\"查询达人商品列表2失败,店铺掉线\"}";
}
var error = BaseRegex.GetStringJson(ref getProdRst, "msg");
+1 -1
View File
@@ -56,6 +56,7 @@
this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(95, 20);
this.tableLayoutPanel1.TabIndex = 0;
//
@@ -110,7 +111,6 @@
//
// UcSubAccount
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.AutoSize = true;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
@@ -45,6 +45,7 @@ namespace TemuKJD.WXForms.ShopForms
private void UcSubAccount_Load(object sender, EventArgs e)
{
this.lblSubAccountName.Text = subAccount.user_name;
this.lblSubAccountName.Text = subAccount.nick_name;
this.lblSubAccountGroupName.Text = subAccount.group_name;
this.lblSubAccountName.Resize += Lbl_Resize;
this.lblSubAccountGroupName.Resize += Lbl_Resize;
+41 -5
View File
@@ -46,12 +46,16 @@
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.panel2.SuspendLayout();
this.SuspendLayout();
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.White;
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);
@@ -94,7 +98,7 @@
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(29, 122);
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;
@@ -115,7 +119,7 @@
this.txtNotes.Border.PaddingLeft = 2;
this.txtNotes.Border.PaddingRight = 2;
this.txtNotes.Border.PaddingTop = 2;
this.txtNotes.Location = new System.Drawing.Point(91, 119);
this.txtNotes.Location = new System.Drawing.Point(91, 128);
this.txtNotes.Name = "txtNotes";
this.txtNotes.Size = new System.Drawing.Size(172, 23);
this.txtNotes.TabIndex = 385;
@@ -140,7 +144,7 @@
"上货",
"数据",
"登录"});
this.cmbGroup.Location = new System.Drawing.Point(91, 164);
this.cmbGroup.Location = new System.Drawing.Point(91, 161);
this.cmbGroup.Name = "cmbGroup";
this.cmbGroup.Size = new System.Drawing.Size(172, 25);
this.cmbGroup.TabIndex = 383;
@@ -190,7 +194,7 @@
this.txtChatAccount.Border.PaddingLeft = 2;
this.txtChatAccount.Border.PaddingRight = 2;
this.txtChatAccount.Border.PaddingTop = 2;
this.txtChatAccount.Location = new System.Drawing.Point(91, 74);
this.txtChatAccount.Location = new System.Drawing.Point(91, 62);
this.txtChatAccount.Name = "txtChatAccount";
this.txtChatAccount.Size = new System.Drawing.Size(172, 23);
this.txtChatAccount.TabIndex = 380;
@@ -201,7 +205,7 @@
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(29, 77);
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;
@@ -280,6 +284,36 @@
this.label5.TabIndex = 377;
this.label5.Text = "店铺分组";
//
// 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 = "子账户昵称";
//
// WXShopAddEditForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -317,5 +351,7 @@
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;
}
}
+20 -1
View File
@@ -91,8 +91,14 @@ namespace TemuKJD.WXForms.ShopForms
this.TitleText = "编辑店铺 - " + shop.ShopAccount;
this.txtBuyAccount.Text = shop.BuyAccount;
this.txtChatAccount.Text = shop.ChatAccount;
this.txtUploadAccount.Text = shop.UploadAccount;
this.txtChatAccount.Text = shop.SubUserName;
if (!string.IsNullOrEmpty( shop.SubUserName))
{
var subUserNames = shop.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));
}
this.txtUploadAccount.Text = shop.UploadAccount;
this.txtLoginName.Enabled = false;
//this.lblAttention.Visible = true;
}
@@ -103,6 +109,11 @@ namespace TemuKJD.WXForms.ShopForms
this.txtUploadAccount.Enabled = false;
this.txtBuyAccount.Text = this.txtChatAccount.Text = this.txtUploadAccount.Text = "请在编辑账户时修改子账户";
}
if (AllBase.BaseClass.GroupId != 3)
{
this.txtChatAccount.Enabled = false;
//this.cmbGroup.Enabled = false;
}
}
private void txtUploadAccount_TextChanged(object sender, EventArgs e)
@@ -135,6 +146,14 @@ namespace TemuKJD.WXForms.ShopForms
this.txtBuyAccount.Text = shop.BuyAccount;
this.txtChatAccount.Text = shop.ChatAccount;
this.txtUploadAccount.Text = shop.UploadAccount;
this.txtChatAccount.Text = shop.SubUserName;
if (!string.IsNullOrEmpty(shop.SubUserName))
{
var subUserNames = shop.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));
}
}
}
}
+16 -5
View File
@@ -68,6 +68,7 @@
this.colGroupName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCookie = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSubUser = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSubUserAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colUploadAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colBuyAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colChatAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -287,7 +288,7 @@
this.cmbGroup.DropDownWidth = 1;
this.cmbGroup.FormattingEnabled = true;
this.cmbGroup.IntegralHeight = false;
this.cmbGroup.Location = new System.Drawing.Point(307, 8);
this.cmbGroup.Location = new System.Drawing.Point(307, 5);
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);
@@ -313,7 +314,7 @@
this.cmbNotes.DropDownWidth = 1;
this.cmbNotes.FormattingEnabled = true;
this.cmbNotes.IntegralHeight = false;
this.cmbNotes.Location = new System.Drawing.Point(224, 8);
this.cmbNotes.Location = new System.Drawing.Point(224, 5);
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);
@@ -446,7 +447,7 @@
this.cmbSubAccount.DropDownWidth = 1;
this.cmbSubAccount.FormattingEnabled = true;
this.cmbSubAccount.IntegralHeight = false;
this.cmbSubAccount.Location = new System.Drawing.Point(402, 8);
this.cmbSubAccount.Location = new System.Drawing.Point(402, 5);
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);
@@ -607,6 +608,7 @@
this.colGroupName,
this.colCookie,
this.colSubUser,
this.colSubUserAccount,
this.colUploadAccount,
this.colBuyAccount,
this.colChatAccount,
@@ -626,6 +628,7 @@
this.colDelete});
this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvShop.Location = new System.Drawing.Point(4, 0);
this.dgvShop.MultiSelectCheckBox = true;
this.dgvShop.Name = "dgvShop";
this.dgvShop.ReadOnly = true;
this.dgvShop.RowTemplate.Height = 23;
@@ -699,6 +702,13 @@
this.colSubUser.Name = "colSubUser";
this.colSubUser.ReadOnly = true;
//
// colSubUserAccount
//
this.colSubUserAccount.FillWeight = 75F;
this.colSubUserAccount.HeaderText = "子账户账号";
this.colSubUserAccount.Name = "colSubUserAccount";
this.colSubUserAccount.ReadOnly = true;
//
// colUploadAccount
//
this.colUploadAccount.FillWeight = 70F;
@@ -939,6 +949,8 @@
private DevComponents.DotNetBar.PanelEx btnRefreshShop;
private UserComponent.UcComboBoxMutiSelect cmbGroup;
private System.Windows.Forms.Label label6;
private DevComponents.DotNetBar.PanelEx btnCheck;
private DevComponents.DotNetBar.PanelEx btnEdit;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
@@ -948,6 +960,7 @@
private System.Windows.Forms.DataGridViewTextBoxColumn colGroupName;
private System.Windows.Forms.DataGridViewTextBoxColumn colCookie;
private System.Windows.Forms.DataGridViewTextBoxColumn colSubUser;
private System.Windows.Forms.DataGridViewTextBoxColumn colSubUserAccount;
private System.Windows.Forms.DataGridViewTextBoxColumn colUploadAccount;
private System.Windows.Forms.DataGridViewTextBoxColumn colBuyAccount;
private System.Windows.Forms.DataGridViewTextBoxColumn colChatAccount;
@@ -965,7 +978,5 @@
private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies;
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private DevComponents.DotNetBar.PanelEx btnCheck;
private DevComponents.DotNetBar.PanelEx btnEdit;
}
}
+24 -3
View File
@@ -536,6 +536,8 @@ namespace TemuKJD.WXForms.ShopForms
}
else
{
var subUserNames = param.SubUserName.Split(',').Where(su => !string.IsNullOrEmpty(su));
var subUsers = WXSubAccountShopEditForm.lstAllSubAccount.Where(su => subUserNames.Contains(su.user_name));
int rowIndex = this.dgvShop.Rows.Add(
isRowCheck,
param.LoginName,
@@ -545,6 +547,7 @@ namespace TemuKJD.WXForms.ShopForms
param.Notes,
param.GroupName,
param.Cookies,
string.Join(",", subUsers.Select(s => s.nick_name)),
param.SubUserName,
param.UploadAccount,
param.BuyAccount,
@@ -576,6 +579,9 @@ namespace TemuKJD.WXForms.ShopForms
{
if (dgvr == null || param == null)
return;
var subUserNames = param.SubUserName.Split(',').Where(su => !string.IsNullOrEmpty(su));
var subUsers = WXSubAccountShopEditForm.lstAllSubAccount.Where(su => subUserNames.Contains(su.user_name));
dgvr.Cells["colCookie"].Value = param.Cookies;
dgvr.Cells["colApiAuth"].Value = param.ApiAuthStatus;
dgvr.Cells["colBuyApiAuth"].Value = param.BuyApiAuth.ApiAuthStatus;
@@ -583,7 +589,8 @@ namespace TemuKJD.WXForms.ShopForms
dgvr.Cells["colShopAccount"].Value = param.ShopAccount;
dgvr.Cells["colNotes"].Value = param.Notes;
dgvr.Cells["colCookie"].Value = param.Cookies;
dgvr.Cells["colSubUser"].Value = param.SubUserName;
dgvr.Cells["colSubUser"].Value = string.Join(",", subUsers.Select(s => s.nick_name));
dgvr.Cells["colSubUserAccount"].Value = param.SubUserName;
dgvr.Cells["colGroupName"].Value = param.GroupName;
dgvr.Cells["colUploadAccount"].Value = param.UploadAccount;
dgvr.Cells["colBuyAccount"].Value = param.BuyAccount;
@@ -716,11 +723,13 @@ namespace TemuKJD.WXForms.ShopForms
{
if (BaseClass.GroupId != 3)
{
this.dgvShop.Columns["ColEdit"].Visible = false;
//this.dgvShop.Columns["ColEdit"].Visible = false;
this.dgvShop.Columns["colDelete"].Visible = false;
this.dgvShop.Columns["colSubUser"].Visible = false;
this.dgvShop.Columns["colSubUserAccount"].Visible = false;
this.btnImport.Visible = false;
this.btnAddShop.Visible = false;
//this.btnEdit.Visible = false;
}
this.dgvShop.AddSelectorColumn("colSelect");
@@ -740,6 +749,17 @@ namespace TemuKJD.WXForms.ShopForms
shop.ShopSubAccountList.Add(subAccount);
}
}
pbLoading.Visible = true;
Task.Run(() =>
{
WXSubAccountShopEditForm.GetServerSubUser();
Invoke(new Action(() =>
{
RefreshDataGridView(false);
pbLoading.Visible = false;
}));
});
}
private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
@@ -944,6 +964,7 @@ namespace TemuKJD.WXForms.ShopForms
try
{
UpdateShop();
WXSubAccountShopEditForm.GetServerSubUser();
RefreshDataGridView(false);
}
catch (Exception ex) { BaseMsgForm.ShowError(ex.Message); }
@@ -1014,7 +1035,7 @@ namespace TemuKJD.WXForms.ShopForms
break;
var shopInfo = GlobalConfig.ShopLoginList.FirstOrDefault(v => v.LoginName == loginName);
if (shopInfo != null && !string.IsNullOrEmpty(shopInfo.LoginName) && !string.IsNullOrEmpty(shopInfo.Password))
if (shopInfo != null && !string.IsNullOrEmpty(shopInfo.LoginName))
{
WXShopLoginForm shopLoginForm = new WXShopLoginForm(shopInfo);
shopLoginForm.openType = EnumOpenType.login;
@@ -144,6 +144,9 @@
<metadata name="colSubUser.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSubUserAccount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colUploadAccount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@@ -43,6 +43,7 @@ namespace TemuKJD.WXForms.ShopForms
public ShopLoginInfo mainShop = null;
public ConcurrentList<ShopLoginInfo> lstSwitchShop = new ConcurrentList<ShopLoginInfo>();
public ConcurrentList<ShopSwitchInfo> lstSwitchInfo = new ConcurrentList<ShopSwitchInfo>();
public ConcurrentList<ShopLoginInfo> lstNeedUpdateShop = new ConcurrentList<ShopLoginInfo>();
const string DefaultUrl = "https://store.weixin.qq.com/shop/home";
const string shopLoginUrl = "https://store.weixin.qq.com/shop?redirect_url=%2Fhome";
@@ -295,14 +296,18 @@ namespace TemuKJD.WXForms.ShopForms
private void ShopLoginForm_FormClosed(object sender, FormClosedEventArgs e)
{
//OnSaveComplete(shop);
Task.Run(() => {
Thread.Sleep(500);
if (!this.Disposing && !this.IsDisposed)
{
MainForm.instance.Invoke(new Action(() => { this.Dispose(); }));
}
});
////OnSaveComplete(shop);
//Task.Run(() =>
//{
// Thread.Sleep(500);
// MainForm.instance.Invoke(new Action(() =>
// {
// if (!this.Disposing && !this.IsDisposed)
// {
// this.Dispose();
// }
// }));
//});
}
private void txtAddress_KeyDown(object sender, KeyEventArgs e)
@@ -330,6 +335,8 @@ namespace TemuKJD.WXForms.ShopForms
{
pbLoading.Visible = true;
btnRefreshNum.Enabled = false;
lstNeedUpdateShop = new ConcurrentList<ShopLoginInfo>();
Task.Run(() =>
{
foreach (var shop in lstSwitchShop)
@@ -352,6 +359,8 @@ namespace TemuKJD.WXForms.ShopForms
continue;
}
lstNeedUpdateShop.Add(shop);
string jsStr1 = @"document.getElementsByClassName('shop-info-popover')[0].style ='';
var divLst = document.getElementsByClassName('shop-info-popover')[0].getElementsByTagName('div');
for (i=0; i<divLst.length; i++){
@@ -40,6 +40,7 @@
this.btnOk = new TemuKJD.UserControls.ButtonEx();
this.panel1 = new System.Windows.Forms.Panel();
this.label2 = new System.Windows.Forms.Label();
this.btnRefresh = new DevComponents.DotNetBar.PanelEx();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -63,8 +64,8 @@
//
// splitContainer1
//
this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
this.splitContainer1.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.splitContainer1.Location = new System.Drawing.Point(12, 41);
this.splitContainer1.Name = "splitContainer1";
@@ -194,6 +195,7 @@
// panel1
//
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Controls.Add(this.btnRefresh);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.splitContainer1);
this.panel1.Controls.Add(this.btnOk);
@@ -213,16 +215,39 @@
this.label2.TabIndex = 374;
this.label2.Text = "label2";
//
// SubAccountShopEditForm
// btnRefresh
//
this.btnRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnRefresh.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnRefresh.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRefresh.DisabledBackColor = System.Drawing.Color.Empty;
this.btnRefresh.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRefresh.Location = new System.Drawing.Point(12, 377);
this.btnRefresh.Name = "btnRefresh";
this.btnRefresh.Size = new System.Drawing.Size(85, 26);
this.btnRefresh.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnRefresh.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRefresh.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRefresh.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnRefresh.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnRefresh.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnRefresh.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnRefresh.Style.GradientAngle = 90;
this.btnRefresh.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnRefresh.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnRefresh.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnRefresh.TabIndex = 676;
this.btnRefresh.Text = "刷新子账号";
this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click);
//
// WXSubAccountShopEditForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.panel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.ShowMinimizedBox = true;
this.Name = "SubAccountShopEditForm";
this.Name = "WXSubAccountShopEditForm";
this.Text = "SubAccountShopEditForm";
this.TitleText = "SubAccountShopEditForm";
this.Load += new System.EventHandler(this.SubAccountShopEditForm_Load);
@@ -255,5 +280,6 @@
private System.Windows.Forms.FlowLayoutPanel flpNotSubAccount;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label2;
private DevComponents.DotNetBar.PanelEx btnRefresh;
}
}
@@ -16,10 +16,13 @@ namespace TemuKJD.WXForms.ShopForms
{
public partial class WXSubAccountShopEditForm : BaseGeneralForm
{
ShopLoginInfo shop = null;
public List<ShopSubAccountInfo> AllSubAccountList { get; set; } = new List<ShopSubAccountInfo>();
public static List<ShopSubAccountInfo> lstAllSubAccount { get; set; } = new List<ShopSubAccountInfo>();
public List<ShopSubAccountInfo> ShopSubAccountList { get; set; } = new List<ShopSubAccountInfo>();
public List<ShopSubAccountInfo> NotShopSubAccountList { get; set; } = new List<ShopSubAccountInfo>();
ShopLoginInfo shop = null;
public WXSubAccountShopEditForm(ShopLoginInfo _shop)
{
InitializeComponent();
@@ -35,18 +38,51 @@ namespace TemuKJD.WXForms.ShopForms
GetUser();
}
private void GetUser()
public void GetUser(bool isReGetSubUser = false)
{
flpNotSubAccount.Controls.Clear();
flpShopSubAccount.Controls.Clear();
AllSubAccountList.Clear();
if (lstAllSubAccount.Count == 0 || isReGetSubUser)
{
GetServerSubUser();
}
if (shop != null)
{
ShopSubAccountList.Clear();
ShopSubAccountList.AddRange(lstAllSubAccount.Where(u => shop.SubUserName.Contains(u.sub_user_name)));
shop.ShopSubAccountList.Clear();
shop.ShopSubAccountList.AddRange(ShopSubAccountList);
NotShopSubAccountList.Clear();
NotShopSubAccountList.AddRange(lstAllSubAccount.Where(u => !ShopSubAccountList.Any(bu => bu.id == u.id)));
foreach (var item in ShopSubAccountList)
{
UcSubAccount s = new UcSubAccount(item, false);
s.AddSubAcountEvent += S_AddSubAcountEvent;
s.RemoveSubAcountEvent += S_RemoveSubAcountEvent;
flpShopSubAccount.Controls.Add(s);
}
foreach (var item in NotShopSubAccountList)
{
UcSubAccount s = new UcSubAccount(item);
s.AddSubAcountEvent += S_AddSubAcountEvent;
s.RemoveSubAcountEvent += S_RemoveSubAcountEvent;
flpNotSubAccount.Controls.Add(s);
}
}
}
public static void GetServerSubUser()
{
string url = BaseClass.BuildObjString("user/get_sub_user");
string data = UserLogin.GetSignaturex();
string html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html))
return;
if (html.Contains("\"data\""))
if (!html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
if (html.Contains("\"code\":200"))
{
lstAllSubAccount.Clear();
var userObj = Newtonsoft.Json.Linq.JObject.Parse(html);
foreach (Newtonsoft.Json.Linq.JObject obj in userObj["data"])
{
@@ -59,30 +95,7 @@ namespace TemuKJD.WXForms.ShopForms
user.group_id = BaseRegex.GetStringJson(ref oStr, "group_id");
user.shop_count = BaseRegex.GetIntJson(ref oStr, "shop_count");
AllSubAccountList.Add(user);
}
if (shop != null)
{
ShopSubAccountList.Clear();
ShopSubAccountList.AddRange(AllSubAccountList.Where(u=>shop.SubUserName.Contains(u.sub_user_name)));
shop.ShopSubAccountList.Clear();
shop.ShopSubAccountList.AddRange(ShopSubAccountList);
NotShopSubAccountList.AddRange(AllSubAccountList.Where(u => !ShopSubAccountList.Any(bu => bu.id == u.id)));
foreach (var item in ShopSubAccountList)
{
UcSubAccount s = new UcSubAccount(item, false);
s.AddSubAcountEvent += S_AddSubAcountEvent;
s.RemoveSubAcountEvent += S_RemoveSubAcountEvent;
flpShopSubAccount.Controls.Add(s);
}
foreach (var item in NotShopSubAccountList)
{
UcSubAccount s = new UcSubAccount(item);
s.AddSubAcountEvent += S_AddSubAcountEvent;
s.RemoveSubAcountEvent += S_RemoveSubAcountEvent;
flpNotSubAccount.Controls.Add(s);
}
lstAllSubAccount.Add(user);
}
}
}
@@ -190,5 +203,10 @@ namespace TemuKJD.WXForms.ShopForms
OnSaveComplete(shop);
this.Close();
}
private void btnRefresh_Click(object sender, EventArgs e)
{
GetUser(true);
}
}
}
+90 -61
View File
@@ -36,8 +36,7 @@ namespace TemuKJD.WXForms.TalkForms
this.panel3 = new System.Windows.Forms.Panel();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.chkShowShopStatistics = new System.Windows.Forms.CheckBox();
this.chkShowAutoReplyNum = new System.Windows.Forms.CheckBox();
this.btnMultiLogin = new DevComponents.DotNetBar.PanelEx();
this.chkNotShowMessageWindow = new System.Windows.Forms.CheckBox();
this.cmbMessage = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
@@ -45,7 +44,6 @@ namespace TemuKJD.WXForms.TalkForms
this.line4 = new DevComponents.DotNetBar.Controls.Line();
this.chkIsAutoReply = new System.Windows.Forms.CheckBox();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.colSelect = new TemuKJD.UserComponent.UcDataGridViewCheckBoxColumn(this.components);
this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -61,6 +59,7 @@ namespace TemuKJD.WXForms.TalkForms
this.colPunishCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colScore = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.lblTalkCount = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.btnRefreshMsgCount = new DevComponents.DotNetBar.PanelEx();
@@ -85,6 +84,8 @@ namespace TemuKJD.WXForms.TalkForms
this.btnPrev = new DevComponents.DotNetBar.PanelEx();
this.txtAddress = new System.Windows.Forms.TextBox();
this.pnlTalk = new System.Windows.Forms.Panel();
this.chkShowAutoReplyNum = new System.Windows.Forms.CheckBox();
this.chkShowShopStatistics = new System.Windows.Forms.CheckBox();
this.chkIsAutoReLogin = new System.Windows.Forms.CheckBox();
this.txtAutoReplyText = new System.Windows.Forms.TextBox();
this.tabPage2 = new System.Windows.Forms.TabPage();
@@ -112,8 +113,8 @@ namespace TemuKJD.WXForms.TalkForms
this.splitContainer4.Panel1.SuspendLayout();
this.splitContainer4.Panel2.SuspendLayout();
this.splitContainer4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
this.ucTabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit();
@@ -131,7 +132,7 @@ namespace TemuKJD.WXForms.TalkForms
// lblVersionName
//
this.lblVersionName.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblVersionName.Location = new System.Drawing.Point(25821, 33);
this.lblVersionName.Location = new System.Drawing.Point(27423, 33);
//
// panel3
//
@@ -173,8 +174,7 @@ namespace TemuKJD.WXForms.TalkForms
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.chkShowShopStatistics);
this.splitContainer2.Panel1.Controls.Add(this.chkShowAutoReplyNum);
this.splitContainer2.Panel1.Controls.Add(this.btnMultiLogin);
this.splitContainer2.Panel1.Controls.Add(this.chkNotShowMessageWindow);
this.splitContainer2.Panel1.Controls.Add(this.cmbMessage);
this.splitContainer2.Panel1.Controls.Add(this.label1);
@@ -190,31 +190,27 @@ namespace TemuKJD.WXForms.TalkForms
this.splitContainer2.SplitterDistance = 62;
this.splitContainer2.TabIndex = 0;
//
// chkShowShopStatistics
// btnMultiLogin
//
this.chkShowShopStatistics.AutoSize = true;
this.chkShowShopStatistics.Checked = true;
this.chkShowShopStatistics.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkShowShopStatistics.Location = new System.Drawing.Point(340, 38);
this.chkShowShopStatistics.Name = "chkShowShopStatistics";
this.chkShowShopStatistics.Size = new System.Drawing.Size(123, 21);
this.chkShowShopStatistics.TabIndex = 206;
this.chkShowShopStatistics.Text = "显示店铺统计信息";
this.chkShowShopStatistics.UseVisualStyleBackColor = true;
this.chkShowShopStatistics.Visible = false;
//
// chkShowAutoReplyNum
//
this.chkShowAutoReplyNum.AutoSize = true;
this.chkShowAutoReplyNum.Checked = true;
this.chkShowAutoReplyNum.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkShowAutoReplyNum.Location = new System.Drawing.Point(211, 38);
this.chkShowAutoReplyNum.Name = "chkShowAutoReplyNum";
this.chkShowAutoReplyNum.Size = new System.Drawing.Size(123, 21);
this.chkShowAutoReplyNum.TabIndex = 205;
this.chkShowAutoReplyNum.Text = "显示自动回复数量";
this.chkShowAutoReplyNum.UseVisualStyleBackColor = true;
this.chkShowAutoReplyNum.Visible = false;
this.btnMultiLogin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnMultiLogin.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnMultiLogin.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnMultiLogin.DisabledBackColor = System.Drawing.Color.Empty;
this.btnMultiLogin.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMultiLogin.Location = new System.Drawing.Point(412, 37);
this.btnMultiLogin.Name = "btnMultiLogin";
this.btnMultiLogin.Size = new System.Drawing.Size(83, 20);
this.btnMultiLogin.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnMultiLogin.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnMultiLogin.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnMultiLogin.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnMultiLogin.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnMultiLogin.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnMultiLogin.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnMultiLogin.Style.GradientAngle = 90;
this.btnMultiLogin.TabIndex = 213;
this.btnMultiLogin.Text = "批量登录";
this.btnMultiLogin.Click += new System.EventHandler(this.btnMultiLogin_Click);
//
// chkNotShowMessageWindow
//
@@ -327,11 +323,11 @@ namespace TemuKJD.WXForms.TalkForms
//
// splitContainer4.Panel1
//
this.splitContainer4.Panel1.Controls.Add(this.pbLoading);
this.splitContainer4.Panel1.Controls.Add(this.dgvShop);
//
// splitContainer4.Panel2
//
this.splitContainer4.Panel2.Controls.Add(this.pbLoading);
this.splitContainer4.Panel2.Controls.Add(this.lblTalkCount);
this.splitContainer4.Panel2.Controls.Add(this.label6);
this.splitContainer4.Panel2.Controls.Add(this.btnRefreshMsgCount);
@@ -352,18 +348,6 @@ namespace TemuKJD.WXForms.TalkForms
this.splitContainer4.SplitterDistance = 450;
this.splitContainer4.TabIndex = 7;
//
// 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(223, 200);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbLoading.TabIndex = 8;
this.pbLoading.TabStop = false;
this.pbLoading.Visible = false;
//
// dgvShop
//
this.dgvShop.AllowUserToAddRows = false;
@@ -400,6 +384,7 @@ namespace TemuKJD.WXForms.TalkForms
this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvShop.Location = new System.Drawing.Point(0, 0);
this.dgvShop.MultiSelect = false;
this.dgvShop.MultiSelectCheckBox = true;
this.dgvShop.Name = "dgvShop";
this.dgvShop.ReadOnly = true;
this.dgvShop.RowHeadersWidth = 25;
@@ -519,13 +504,25 @@ namespace TemuKJD.WXForms.TalkForms
this.colCanUse.Visible = false;
this.colCanUse.Width = 28;
//
// 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(408, 2);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(25, 25);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbLoading.TabIndex = 8;
this.pbLoading.TabStop = false;
this.pbLoading.Visible = false;
//
// lblTalkCount
//
this.lblTalkCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblTalkCount.AutoSize = true;
this.lblTalkCount.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblTalkCount.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.lblTalkCount.Location = new System.Drawing.Point(182, 6);
this.lblTalkCount.Location = new System.Drawing.Point(180, 6);
this.lblTalkCount.Name = "lblTalkCount";
this.lblTalkCount.Size = new System.Drawing.Size(17, 19);
this.lblTalkCount.TabIndex = 755;
@@ -535,7 +532,7 @@ namespace TemuKJD.WXForms.TalkForms
//
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(138, 7);
this.label6.Location = new System.Drawing.Point(136, 7);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(56, 17);
this.label6.TabIndex = 754;
@@ -548,9 +545,9 @@ namespace TemuKJD.WXForms.TalkForms
this.btnRefreshMsgCount.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRefreshMsgCount.DisabledBackColor = System.Drawing.Color.Empty;
this.btnRefreshMsgCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRefreshMsgCount.Location = new System.Drawing.Point(451, 5);
this.btnRefreshMsgCount.Location = new System.Drawing.Point(434, 4);
this.btnRefreshMsgCount.Name = "btnRefreshMsgCount";
this.btnRefreshMsgCount.Size = new System.Drawing.Size(42, 21);
this.btnRefreshMsgCount.Size = new System.Drawing.Size(59, 22);
this.btnRefreshMsgCount.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnRefreshMsgCount.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRefreshMsgCount.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -565,7 +562,7 @@ namespace TemuKJD.WXForms.TalkForms
this.btnRefreshMsgCount.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnRefreshMsgCount.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnRefreshMsgCount.TabIndex = 738;
this.btnRefreshMsgCount.Text = "刷新";
this.btnRefreshMsgCount.Text = "刷新客服";
this.btnRefreshMsgCount.Click += new System.EventHandler(this.btnRefreshMsgCount_Click);
//
// lblUserCount
@@ -586,7 +583,7 @@ namespace TemuKJD.WXForms.TalkForms
this.lblReplyCount.AutoSize = true;
this.lblReplyCount.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblReplyCount.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.lblReplyCount.Location = new System.Drawing.Point(319, 6);
this.lblReplyCount.Location = new System.Drawing.Point(315, 6);
this.lblReplyCount.Name = "lblReplyCount";
this.lblReplyCount.Size = new System.Drawing.Size(17, 19);
this.lblReplyCount.TabIndex = 241;
@@ -596,7 +593,7 @@ namespace TemuKJD.WXForms.TalkForms
//
this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(275, 7);
this.label7.Location = new System.Drawing.Point(271, 7);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(56, 17);
this.label7.TabIndex = 240;
@@ -779,7 +776,8 @@ namespace TemuKJD.WXForms.TalkForms
this.ucTabControl1.Controls.Add(this.tabPage1);
this.ucTabControl1.Controls.Add(this.tabPage2);
this.ucTabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.ucTabControl1.ItemSize = new System.Drawing.Size(73, 28);
this.ucTabControl1.Font = new System.Drawing.Font("微软雅黑", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ucTabControl1.ItemSize = new System.Drawing.Size(80, 31);
this.ucTabControl1.Location = new System.Drawing.Point(0, 0);
this.ucTabControl1.Name = "ucTabControl1";
this.ucTabControl1.SelectedIndex = 0;
@@ -793,10 +791,11 @@ namespace TemuKJD.WXForms.TalkForms
// tabPage1
//
this.tabPage1.Controls.Add(this.splitContainer3);
this.tabPage1.Location = new System.Drawing.Point(2, 32);
this.tabPage1.Font = new System.Drawing.Font("微软雅黑", 9F);
this.tabPage1.Location = new System.Drawing.Point(2, 35);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(991, 582);
this.tabPage1.Size = new System.Drawing.Size(991, 579);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "客服窗口";
this.tabPage1.UseVisualStyleBackColor = true;
@@ -819,7 +818,7 @@ namespace TemuKJD.WXForms.TalkForms
// splitContainer3.Panel2
//
this.splitContainer3.Panel2.Controls.Add(this.pnlTalk);
this.splitContainer3.Size = new System.Drawing.Size(985, 576);
this.splitContainer3.Size = new System.Drawing.Size(985, 573);
this.splitContainer3.SplitterDistance = 25;
this.splitContainer3.TabIndex = 2;
//
@@ -915,14 +914,42 @@ namespace TemuKJD.WXForms.TalkForms
//
// pnlTalk
//
this.pnlTalk.Controls.Add(this.chkShowAutoReplyNum);
this.pnlTalk.Controls.Add(this.chkShowShopStatistics);
this.pnlTalk.Controls.Add(this.chkIsAutoReLogin);
this.pnlTalk.Controls.Add(this.txtAutoReplyText);
this.pnlTalk.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlTalk.Location = new System.Drawing.Point(0, 0);
this.pnlTalk.Name = "pnlTalk";
this.pnlTalk.Size = new System.Drawing.Size(985, 547);
this.pnlTalk.Size = new System.Drawing.Size(985, 544);
this.pnlTalk.TabIndex = 1;
//
// chkShowAutoReplyNum
//
this.chkShowAutoReplyNum.AutoSize = true;
this.chkShowAutoReplyNum.Checked = true;
this.chkShowAutoReplyNum.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkShowAutoReplyNum.Location = new System.Drawing.Point(17, 137);
this.chkShowAutoReplyNum.Name = "chkShowAutoReplyNum";
this.chkShowAutoReplyNum.Size = new System.Drawing.Size(123, 21);
this.chkShowAutoReplyNum.TabIndex = 205;
this.chkShowAutoReplyNum.Text = "显示自动回复数量";
this.chkShowAutoReplyNum.UseVisualStyleBackColor = true;
this.chkShowAutoReplyNum.Visible = false;
//
// chkShowShopStatistics
//
this.chkShowShopStatistics.AutoSize = true;
this.chkShowShopStatistics.Checked = true;
this.chkShowShopStatistics.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkShowShopStatistics.Location = new System.Drawing.Point(17, 110);
this.chkShowShopStatistics.Name = "chkShowShopStatistics";
this.chkShowShopStatistics.Size = new System.Drawing.Size(123, 21);
this.chkShowShopStatistics.TabIndex = 206;
this.chkShowShopStatistics.Text = "显示店铺统计信息";
this.chkShowShopStatistics.UseVisualStyleBackColor = true;
this.chkShowShopStatistics.Visible = false;
//
// chkIsAutoReLogin
//
this.chkIsAutoReLogin.AutoSize = true;
@@ -938,7 +965,7 @@ namespace TemuKJD.WXForms.TalkForms
//
this.txtAutoReplyText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtAutoReplyText.Location = new System.Drawing.Point(18, 45);
this.txtAutoReplyText.Location = new System.Drawing.Point(17, 45);
this.txtAutoReplyText.Multiline = true;
this.txtAutoReplyText.Name = "txtAutoReplyText";
this.txtAutoReplyText.Size = new System.Drawing.Size(156, 50);
@@ -948,10 +975,11 @@ namespace TemuKJD.WXForms.TalkForms
// tabPage2
//
this.tabPage2.Controls.Add(this.mainPanel);
this.tabPage2.Location = new System.Drawing.Point(2, 32);
this.tabPage2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tabPage2.Location = new System.Drawing.Point(2, 35);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(991, 582);
this.tabPage2.Size = new System.Drawing.Size(991, 579);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "店铺后台";
this.tabPage2.UseVisualStyleBackColor = true;
@@ -961,7 +989,7 @@ namespace TemuKJD.WXForms.TalkForms
this.mainPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.mainPanel.Location = new System.Drawing.Point(3, 3);
this.mainPanel.Name = "mainPanel";
this.mainPanel.Size = new System.Drawing.Size(985, 576);
this.mainPanel.Size = new System.Drawing.Size(985, 573);
this.mainPanel.TabIndex = 1;
//
// ColumnShopStatus
@@ -1067,8 +1095,8 @@ namespace TemuKJD.WXForms.TalkForms
this.splitContainer4.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit();
this.splitContainer4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
this.ucTabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.splitContainer3.Panel1.ResumeLayout(false);
@@ -1150,5 +1178,6 @@ namespace TemuKJD.WXForms.TalkForms
private System.Windows.Forms.DataGridViewTextBoxColumn colPunishCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colScore;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse;
private DevComponents.DotNetBar.PanelEx btnMultiLogin;
}
}
+28
View File
@@ -1619,6 +1619,34 @@ namespace TemuKJD.WXForms.TalkForms
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_talk_auto_reply_template", LstTalkTemplatePair);
}
private void btnMultiLogin_Click(object sender, EventArgs e)
{
WXShopListForm.Instance.CheckShopLogin(new string[] { currentShop.LoginName }, false);
if (currentShop.LoginStatus != "登录成功")
{
BaseMsgForm.ShowError("批量登录需要主店铺处于登录状态!");
}
else
{
WXShopMultiLoginForm shopMultiLoginForm = new WXShopMultiLoginForm(currentShop);
shopMultiLoginForm.openType = EnumOpenType.multi_login;
shopMultiLoginForm.ShowDialog();
var switchShopLst = shopMultiLoginForm.lstSwitchShop.ToList();
var needUpdateShopLst = shopMultiLoginForm.lstNeedUpdateShop.ToList();
pbLoading.Visible = true;
Task.Run(() =>
{
LoadShop(switchShopLst);
foreach (var shop in needUpdateShopLst)
{
ShowChat(shop);
}
Invoke(new Action(() => { pbLoading.Visible = false; }));
});
}
}
public static string defaultTalkTemplate = @"###亲亲,客服人员正在仓库核实打包发货,您的问题我们记录好,客服小姐姐回来会为您解答哦!
###亲亲,在的呢亲亲,这款商品质量很好的呢,现在下单为您优先发出哦
###亲,客户已经听到您的呼叫,请稍等!