From b05de6797e2e72ed6e8ed955f367d6299004b606 Mon Sep 17 00:00:00 2001 From: wule Date: Thu, 4 Dec 2025 20:45:18 +0800 Subject: [PATCH] =?UTF-8?q?temu=E6=8E=A8=E5=8D=95=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AllBase/AllBase.csproj | 1 + AllBase/BaseClass.cs | 2 +- AllBase/Model/Result/TemuDBOrderInfo.cs | 215 +++ .../KJD_WebService/BLL/KJD/OrderManage.cs | 259 +++ .../KJD_WebService/BLL/KJD/ToolManage.cs | 153 +- KJDService/KJD_WebService/Global.asax.cs | 5 + .../KJD_WebService/KJD_WebService.csproj | 7 + .../KJD_WebService/Model/TemuDBOrderInfo.cs | 57 + KJDService/KJD_WebService/OrderService.asmx | 1 + .../KJD_WebService/OrderService.asmx.cs | 90 + .../KJD_WebService/ProductService.asmx.cs | 4 +- .../Utils/Extension/Extension.Convert.cs | 46 + KJDService/KJD_WebService/Utils/TimeUtils.cs | 13 + TEMUKJD/KJD.csproj | 11 +- .../AdminProductPriceCheckForm.Designer.cs | 177 +- .../AdminForms/AdminProductPriceCheckForm.cs | 161 +- TEMUKJD/KJDForms/JITForms/JITForm.Designer.cs | 52 +- TEMUKJD/KJDForms/JITForms/JITForm.cs | 7 +- .../JITForms/JitPushOrder.Designer.cs | 1590 +++++++++++++++++ TEMUKJD/KJDForms/JITForms/JitPushOrder.cs | 1379 ++++++++++++++ TEMUKJD/KJDForms/JITForms/JitPushOrder.resx | 222 +++ .../KJDForms/ProductForms/JoinDeliveryForm.cs | 5 +- .../ProductChangePriceForm.Designer.cs | 7 +- .../ProductForms/ProductChangePriceForm.cs | 20 +- .../ProductForms/TemuJitForm.Designer.cs | 148 +- TEMUKJD/KJDForms/ProductForms/TemuJitForm.cs | 14 +- .../DbProductSelectListManageForm.cs | 230 ++- 27 files changed, 4561 insertions(+), 315 deletions(-) create mode 100644 AllBase/Model/Result/TemuDBOrderInfo.cs create mode 100644 KJDService/KJD_WebService/BLL/KJD/OrderManage.cs create mode 100644 KJDService/KJD_WebService/Model/TemuDBOrderInfo.cs create mode 100644 KJDService/KJD_WebService/OrderService.asmx create mode 100644 KJDService/KJD_WebService/OrderService.asmx.cs create mode 100644 TEMUKJD/KJDForms/JITForms/JitPushOrder.Designer.cs create mode 100644 TEMUKJD/KJDForms/JITForms/JitPushOrder.cs create mode 100644 TEMUKJD/KJDForms/JITForms/JitPushOrder.resx diff --git a/AllBase/AllBase.csproj b/AllBase/AllBase.csproj index f23c641..5bff925 100644 --- a/AllBase/AllBase.csproj +++ b/AllBase/AllBase.csproj @@ -226,6 +226,7 @@ + diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index 7cce23d..cc162a4 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,7 +27,7 @@ namespace AllBase /// /// 版本ID /// - public static int VersionCount = 706; + public static int VersionCount = 709; //public static int VersionCount = 613; /// diff --git a/AllBase/Model/Result/TemuDBOrderInfo.cs b/AllBase/Model/Result/TemuDBOrderInfo.cs new file mode 100644 index 0000000..a696f9a --- /dev/null +++ b/AllBase/Model/Result/TemuDBOrderInfo.cs @@ -0,0 +1,215 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AllBase.Model.Result +{ + public class TemuDBOrderInfo + { + public int? id { get; set; } + public string supplierId { get; set; } // '店铺Id', + public string supplierName { get; set; } + public string originalPurchaseOrderSn { get; set; } // '备货单号', + public string subPurchaseOrderSn { get; set; } // '备货母单号', + public string productName { get; set; } + public string category { get; set; } + public string productId { get; set; } // '商品编号', + public string upProductId { get; set; } // 上家商品编号 + public string productSkcId { get; set; } // + public string productSkcPicture { get; set; } //'主图', + public string productSn { get; set; } // '货号', + public int status { get; set; } = 1; // '状态 1待发货 2已送货 7已入库 8已作废', + public string productSkuId { get; set; } // CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + /// + /// 订单sku货号 + /// + public string extCode { get; set; } // 'sku货号', + public string className { get; set; } // 'sku规格', + public string currencyType { get; set; } // 价格单位 + public int supplierPrice { get; set; } // '申报价格', + public int? costPrice { get; set; } // '成本价', + public int? deliveryFee { get; set; } // '车队费', + public int? markFee { get; set; } // '贴标费', + public int purchaseQuantity { get; set; } // '备货件数', + public int deliverQuantity { get; set; } // '送货件数', + public int realReceiveAuthenticQuantity { get; set; } // '入库件数', + public decimal? availableSaleDays { get; set; } // '可售天数', + public int? qcResult { get; set; } // '抽检结果 1合格 2不合格', + public string thumbUrlList { get; set; } // 'sku图片', + public long purchaseTime { get; set; } // '备货单创建时间', + public long? deliverTime { get; set; } // '发货时间', + public long? receiveTime { get; set; } // '收货时间', + public long expectLatestDeliverTimeOrDefault { get; set; } // '最迟发货时间', + public long expectLatestArrivalTimeOrDefault { get; set; } // '最迟到货时间', + public string deliveryOrderSn { get; set; } // '发货单号', + public string receiveWarehouseId { get; set; } // '实际收货仓库Id', + public string receiveWarehouseName { get; set; } // '实际收货仓库', + public string warehouseGroupId { get; set; } // '仓组Id', + public string jiaTongCode { get; set; } // '佳同码', + public string barCodeMd5 { get; set; } // '商品条码MD5', + public string shippingMark​Md5 { get; set; } // '箱唛文件MD5', + public string notes { get; set; } // '备注', + public int upLoadStatus { get; set; } = 0; // '是否上传订单(上传后扣除用户授权金额,产生扣费记录)', + public DateTime? add_time { get; set; } // + public DateTime? mdy_time { get; set; } // + } + + public class subOrderForSupplier + { + public long? supplierId { get; set; } // 634418225872187, + public string supplierName { get; set; } // "CZhaoH", + public string originalPurchaseOrderSn { get; set; } // "WP2512015632492", + public string subPurchaseOrderSn { get; set; } // "WB2512013405446", + public string productName { get; set; } // "Factory supplied slippers, Multi colored optional slippers, Travel slippers, Leisure slippers, Warm Home Shoes, New Year's home slippers, indoor slippers, hotel slippers, Portable travel slippers, Winter team building slippers, Men's outdoor slippers, Father's Day Comfortable Slippers, Wear resistant slippers, Waterproof slippers, Open mouth breathable thick soled sandals, Indoor and outdoor, Apartment household slippers, beach slippers, Washable slippers, summer slippers", + public string category { get; set; } // "女士居家鞋、室内拖鞋", + public int? categoryType { get; set; } // 0, + public long? productId { get; set; } // 7907989544, + public long? productSkcId { get; set; } // 13093977686, + public string productSkcPicture { get; set; } // "https://img.kwcdn.com/product/20add7005a/f0aad84d-54d6-466c-afeb-bc73dda970bd_800x800.jpeg", + public string productSn { get; set; } // "benpao-256", + public int? status { get; set; } // 1, + public object fulfilmentFormId { get; set; } // null, + public object fulfilmentFormStatus { get; set; } // null, + public List skuQuantityDetailList { get; set; } + public object skuQuantityDetailForCustomList { get; set; } + public skuQuantityDetail skuQuantityTotalInfo { get; set; } + public expectLatestTime expectLatestDeliverTime { get; set; } + public expectLatestTime expectLatestArrivalTime { get; set; } + public deliverInfo deliverInfo { get; set; } + public long? defectiveTime { get; set; } // null, + public long? purchaseTime { get; set; } // 1764544907763, + public bool? isCanJoinDeliverPlatform { get; set; } // true, + public object joinDeliverPlatformReason { get; set; } // null, + public int? settlementType { get; set; } // 1, + public bool? existConfirmAdjustOrder { get; set; } // false, + public bool? hasProductImage { get; set; } // true, + public int? urgencyType { get; set; } // 1, + public bool? isCustomProduct { get; set; } // false, + public int? purchaseStockType { get; set; } // 1, + public bool? isCloseJit { get; set; } // false, + public bool? isFirst { get; set; } // true, + public int? source { get; set; } // 9999, + public bool? displayWaterLevelChart { get; set; } // false, + public bool? canAdjustPurchaseNum { get; set; } // false, + public bool? supportIncreaseNum { get; set; } // false, + public int? hasQcBill { get; set; } // 0, + public string deliveryOrderSn { get; set; } // null, + public List priceAdjustLogVOList { get; set; } // [], + public int? inventoryRegion { get; set; } // 1, + public object deleteType { get; set; } // null, + public List skuLackItemList { get; set; } + public int? qcReject { get; set; } // 0, + public object skuQcRejectItemList { get; set; } // null, + public int? skuLackSnapshot { get; set; } // 1, + public int? supplyStatus { get; set; } // 0, + public int? applyChangeSupplyStatus { get; set; } // 0, + public int? applyDeleteStatus { get; set; } // 0, + public List lackOrSoldOutTagList { get; set; } + public bool? todayCanDeliver { get; set; } // true, + public bool? inFulfilmentPunish { get; set; } // true, + public bool? hotTag { get; set; } // false, + public int? progressStatus { get; set; } // 0, + public object canDeliverTime { get; set; } // null, + public string remark { get; set; } // "", + public object supplementType { get; set; } // null, + public bool? qcNotPassCreate { get; set; } // false, + public object qcOriginalSubPurchaseOrderSn { get; set; } // null, + public object qcOriginalSubPurchaseOrderLatestDeliveryTime { get; set; } // null, + public object qcOriginalSubPurchaseOrderLatestArrivalTime { get; set; } // null, + public object qcNotPassCreateSubPurchaseOrderSnList { get; set; } // null, + public object autoAcceptCountDownMs { get; set; } // null, + public object activityType { get; set; } // null, + public long? subWarehouseId { get; set; } // 0, + public object subWarehouseName { get; set; } // null, + public long? warehouseGroupId { get; set; } // 828046, + public int? appealStatus { get; set; } // 0, + public object expectLatestArrivalIntervalDays { get; set; } // null, + public List customTagList { get; set; } // [], + public bool? isAdProduct { get; set; } // false, + public object canCombine { get; set; } // null, + public int? combineStatus { get; set; } // 0, + public bool? canApplyToDelete { get; set; } // true + + + } + + public class lackOrSoldOutTag + { + public string skuDisplay { get; set; } // "绿色44-45", + public bool? isLack { get; set; } // true, + public object soldOut { get; set; } // null + } + + public class skuLackItem + { + public string skuDisplay { get; set; } // "绿色44-45" + } + public class deliverInfo + { + public long? deliverTime { get; set; } // null, + public long? receiveTime { get; set; } // null, + public long? expectLatestDeliverTimeOrDefault { get; set; } // 1764631288942, + public long? expectLatestArrivalTimeOrDefault { get; set; } // 1764804088425, + public long? expectLatestPickTime { get; set; } // null, + public string deliveryOrderSn { get; set; } // null, + public long? receiveWarehouseId { get; set; } // null, + public string receiveWarehouseName { get; set; } // null + + } + public class expectLatestTime + { + public long? time { get; set; } // 1764631288942, + public int? timeStatus { get; set; } // 1, + public object remainingTimeInHour { get; set; } // null + } + public class skuQuantityDetail + { + public long? productSkuId { get; set; } // 50427451228, + public object goodsSkuId { get; set; } // null, + public string extCode { get; set; } // "", + public string className { get; set; } // "绿色-44-45", + public string currencyType { get; set; } // "CNY", + public int? supplierPrice { get; set; } // 1000, + public int? usd2cnySupplierPrice { get; set; } // null, + public object exchangeRate { get; set; } // null, + public object exchangeRateDenominator { get; set; } // null, + public int? purchaseQuantity { get; set; } // 1, + public int? adviceQuantity { get; set; } // 1, + public int? purchaseUpLimit { get; set; } // 1, + public object purchaseDownLimit { get; set; } // null, + public int? deliverQuantity { get; set; } // 0, + public int? waitReceiveNum { get; set; } // 0, + public int? waitQcNum { get; set; } // 0, + public int? waitOnShelfNum { get; set; } // 0, + public int? waitInStock { get; set; } // 0, + public int? realReceiveAuthenticQuantity { get; set; } // 0, + public int? defectiveQuantity { get; set; } // 0, + public decimal? availableSaleDays { get; set; } // null, + public object availableSaleDaysFromInventory { get; set; } // null, + public object isAdjusted { get; set; } // null, + public int? onShelfWaitingQcQuantity { get; set; } // 0, + public int? onShelfQcQuantity { get; set; } // 0, + public int? qcWaitingWithdrawQuantity { get; set; } // 0, + public int? qcWithdrawQuantity { get; set; } // 0, + public long? fulfilmentProductSkuId { get; set; } // 50427451228, + public object personalText { get; set; } // null, + public object orderSn { get; set; } // null, + public int? qcResult { get; set; } // null, + public object inboundReturn { get; set; } // null, + public object skuLackNum { get; set; } // null, + public object accumulateDeliverNum { get; set; } // null, + public object accumulateInboundNum { get; set; } // null, + public List thumbUrlList { get; set; } // [ "https://img.kwcdn.com/product/20add7005a/cb936aca-2b6a-4507-ab1f-129ee9afd2cc_800x800.jpeg" ], + public object inStockAvlbDays { get; set; } // null, + public int? customizationType { get; set; } // 0, + public string purchaseConfig { get; set; } // "0 + 0", + public int? purchaseConfigDays { get; set; } // 0, + public int? initialQuantity { get; set; } // 1, + public object availableStock { get; set; } // null, + public object purchaseLabel { get; set; } // null, + public bool? supportIncreaseNum { get; set; } // false, + public object processTypeVO { get; set; } // null + } +} diff --git a/KJDService/KJD_WebService/BLL/KJD/OrderManage.cs b/KJDService/KJD_WebService/BLL/KJD/OrderManage.cs new file mode 100644 index 0000000..dd7cc0e --- /dev/null +++ b/KJDService/KJD_WebService/BLL/KJD/OrderManage.cs @@ -0,0 +1,259 @@ +using KJD_Web.Model; +using KJD_Web.Utils; +using NaiBa.Util.Extension; +using NaiBa.Util.Helper; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Web; + +namespace KJD_Web.BLL +{ + public class OrderManage + { + public string AddOrder(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var time = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "time"), out time); + string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); + if (time1 != EncrypUtil.Encryption(time)) + return "{\"code\":50000,\"msg\":\"校验失败\"}"; + + string user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + if (string.IsNullOrEmpty(user_name)) + { + return "{\"code\":500,\"msg\":\"没有用户名\"}"; + } + var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id")?.Replace("'", "\\'"); + if (string.IsNullOrEmpty(shop_id)) + return "{\"code\":500,\"msg\":\"请输入店铺\"}"; + + string order_data = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "order_data"))?.Replace("'", "\\'"); + if (string.IsNullOrEmpty(order_data)) + return "{\"code\":500,\"msg\":\"请输入订单\"}"; + JObject jObj = null; + try + { + jObj = JObject.Parse(order_data); + } + catch + { + return "{\"code\":500,\"msg\":\"数据格式错误\"}"; + } + + long table_id = shop_id.ParseToLong() % 128; + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = ""; + + sql = "insert into kjd_order.order_" + table_id + " ("; + foreach (var item in jObj) + { + if (item.Key.ParseToString() != "id" && JsonConvert.SerializeObject(item.Value) != "null" && + item.Key.ParseToString() != "add_time" && item.Key.ParseToString() != "mdy_time") + sql += item.Key + ","; + } + sql = sql.Trim(','); + sql += ")"; + sql += "values ("; + foreach (var item in jObj) + { + if (item.Key.ParseToString() != "id" && JsonConvert.SerializeObject(item.Value) != "null" && + item.Key.ParseToString() != "add_time" && item.Key.ParseToString() != "mdy_time") + sql += "'" + item.Value.ParseToString().Replace("\\'", "'").Replace("'", "\\'") + "',"; + } + sql = sql.Trim(','); + sql += ");"; + var rst = mySql.ExecuteInsertId(sql); + mySql.Close(); + if (rst > 0) + { + return "{\"code\":200,\"msg\":\"success\"}"; + } + else + { + return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}"; + } + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + public string GetOrderList(string inputData, bool isDetail = false) + { + if (!string.IsNullOrEmpty(inputData)) + { + 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("'", "\\'"); + var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'"); + + var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id")?.Replace("'", "\\'"); + if (string.IsNullOrEmpty(shop_id)) + return "{\"code\":500,\"msg\":\"请输入查询店铺\",\"data\":[],\"count\":" + 0 + "}"; + //var start_time = RegexUtils.GetStringQuery(ref inputData, "start_time")?.Replace("'", "\\'"); + var start_time = TimeUtils.DateTimeToTimestampMilliseconds(DateTime.Now.Date.AddDays(-45)); + + int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); + int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + + long table_id = shop_id.ParseToLong() % 128; + string sql = "select count(id) from kjd_order.order_" + table_id + " o where 1=1"; + + string where = ""; + if (start_time > 0) + where += " and o.purchaseTime > " + start_time; + if (!string.IsNullOrWhiteSpace(shop_id)) + where += " and o.supplierId = '" + shop_id + "'"; + sql += where; + + var count = mySql.ExecuteRowCount(sql); + + DataTable dt; + if (count == 0) + { + dt = new DataTable(); + } + else + { + sql = "SELECT * from kjd_order.order_" + table_id + " o where 1=1"; // p.is_del=0 + + //where子句 + sql += where; + sql += " ORDER BY o.purchaseTime"; + //sql += " ORDER BY o.select_total_count desc, p.id desc"; + sql += " LIMIT " + Math.Max(page - 1, 0) * page_size + "," + page_size; + dt = mySql.ExecuteDataTable(sql); + } + + mySql.Close(); + if (dt != null) + { + try + { + List orderLst = new List(); + foreach (DataRow row in dt.Rows) + { + TemuDBOrderInfo prod = new TemuDBOrderInfo + { + id = Convert.ToInt32(row["id"]), + add_time = Convert.ToDateTime(row["add_time"]), + mdy_time = Convert.ToDateTime(row["mdy_time"]), + notes = row["notes"].ToString(), + availableSaleDays = row["availableSaleDays"].ParseToNullableDecimal(), + barCodeMd5 = row["barCodeMd5"].ParseToString(), + category = row["category"].ParseToString(), + className = row["className"].ParseToString(), + costPrice = row["costPrice"].ParseToNullableInt(), + currencyType = row["currencyType"].ParseToString(), + deliverQuantity = row["deliverQuantity"].ParseToInt(), + deliverTime = row["deliverTime"].ParseToNullableLong(), + deliveryFee = row["deliveryFee"].ParseToNullableInt(), + deliveryOrderSn = row["deliveryOrderSn"].ParseToString(), + expectLatestArrivalTimeOrDefault = row["expectLatestArrivalTimeOrDefault"].ParseToLong(), + expectLatestDeliverTimeOrDefault = row["expectLatestDeliverTimeOrDefault"].ParseToLong(), + extCode = row["extCode"].ParseToString(), + jiaTongCode = row["jiaTongCode"].ParseToString(), + markFee = row["markFee"].ParseToNullableInt(), + originalPurchaseOrderSn = row["originalPurchaseOrderSn"].ParseToString(), + productId = row["productId"].ParseToString(), + productName = row["productName"].ParseToString(), + productSkcPicture = row["productSkcPicture"].ParseToString(), + productSkcId = row["productSkcId"].ParseToString(), + productSkuId = row["productSkuId"].ParseToString(), + productSn = row["productSn"].ParseToString(), + purchaseQuantity = row["purchaseQuantity"].ParseToInt(), + purchaseTime = row["purchaseTime"].ParseToLong(), + qcResult = row["qcResult"].ParseToNullableInt(), + realReceiveAuthenticQuantity = row["realReceiveAuthenticQuantity"].ParseToInt(), + receiveTime = row["receiveTime"].ParseToNullableLong(), + receiveWarehouseId = row["receiveWarehouseId"].ParseToString(), + receiveWarehouseName = row["receiveWarehouseName"].ParseToString(), + shippingMarkMd5 = row["shippingMarkMd5"].ParseToString(), + status = row["status"].ParseToInt(), + subPurchaseOrderSn = row["subPurchaseOrderSn"].ParseToString(), + supplierId = row["supplierId"].ParseToString(), + supplierName = row["supplierName"].ParseToString(), + supplierPrice = row["supplierPrice"].ParseToInt(), + thumbUrlList = row["thumbUrlList"].ParseToString(), + upLoadStatus = row["upLoadStatus"].ParseToInt(), + upProductId = row["upProductId"].ParseToString(), + warehouseGroupId = row["warehouseGroupId"].ParseToString(), + }; + orderLst.Add(prod); + } + var data = JsonUtils.SerializerObjectToString(orderLst); + return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; + } + 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 UpdateOrderStatus1(string inputData, bool isDetail = false) + { + if (!string.IsNullOrEmpty(inputData)) + { + 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("'", "\\'"); + var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'"); + + var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id")?.Replace("'", "\\'"); + if (string.IsNullOrEmpty(shop_id)) + return "{\"code\":500,\"msg\":\"请输入查询店铺\"}"; + var product_id = RegexUtils.GetStringQuery(ref inputData, "product_id")?.Replace("'", "\\'"); + if (string.IsNullOrEmpty(product_id)) + return "{\"code\":500,\"msg\":\"请输入商品编号\"}"; + + int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); + int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + + long table_id = shop_id.ParseToLong() % 128; + string sql = "update kjd_order.order_" + table_id + " o set o.upLoadStatus=1"; + + string where = ""; + where += " and o.supplierId = '" + shop_id + "'"; + where += " and o.productId = '" + product_id + "'"; + where += " and o.upLoadStatus < 1"; + sql += where; + + var rst = mySql.ExecuteNonQuery(sql); + + if (rst) + { + return "{\"code\":200,\"msg\":\"success\"}"; + } + else + { + return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}"; + } + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + } +} \ No newline at end of file diff --git a/KJDService/KJD_WebService/BLL/KJD/ToolManage.cs b/KJDService/KJD_WebService/BLL/KJD/ToolManage.cs index 2623c0a..08e5e00 100644 --- a/KJDService/KJD_WebService/BLL/KJD/ToolManage.cs +++ b/KJDService/KJD_WebService/BLL/KJD/ToolManage.cs @@ -9,49 +9,140 @@ namespace KJD_Web.BLL public class ToolManage { //mysql workbench 存储过程,可以使用分隔符重定义 -// string 存储过程1 = @" -//DELIMITER $ -//DROP PROCEDURE IF EXISTS add_spu_map; -//CREATE PROCEDURE add_spu_map() -//BEGIN -//insert into kjd_map.spu_map_0 (draft_id,from_spu_id,shop_id) values(9122600878,727585921,'3049342434562'); -//update kjd.third_product_select set draft_id='9122600878', status='已上传', add_times=add_times+1, mdy_time='2025-08-06 11:54:50' where id=6532; -//END $ -//DELIMITER ; -//CALL add_spu_map();"; + // string 存储过程1 = @" + //DELIMITER $ + //DROP PROCEDURE IF EXISTS add_spu_map; + //CREATE PROCEDURE add_spu_map() + //BEGIN + //insert into kjd_map.spu_map_0 (draft_id,from_spu_id,shop_id) values(9122600878,727585921,'3049342434562'); + //update kjd.third_product_select set draft_id='9122600878', status='已上传', add_times=add_times+1, mdy_time='2025-08-06 11:54:50' where id=6532; + //END $ + //DELIMITER ; + //CALL add_spu_map();"; //腾讯云服务器存储过程,不能使用分隔符重定义 -// string 存储过程2 = @" -//DROP PROCEDURE IF EXISTS add_spu_map; -//CREATE PROCEDURE add_spu_map() -//BEGIN -//insert into kjd_map.spu_map_1 (draft_id,from_spu_id,shop_id) values(9122600878,727585921,'3049342434562'); -//update kjd.third_product_select set draft_id='9122600878', status='已上传', add_times=add_times+1, mdy_time='2025-08-06 11:54:50' where id=6532; -//END ; -//CALL add_spu_map();"; + // string 存储过程2 = @" + //DROP PROCEDURE IF EXISTS add_spu_map; + //CREATE PROCEDURE add_spu_map() + //BEGIN + //insert into kjd_map.spu_map_1 (draft_id,from_spu_id,shop_id) values(9122600878,727585921,'3049342434562'); + //update kjd.third_product_select set draft_id='9122600878', status='已上传', add_times=add_times+1, mdy_time='2025-08-06 11:54:50' where id=6532; + //END ; + //CALL add_spu_map();"; public void CreateTable() { + // string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + // MysqlUtils mySql = new MysqlUtils(conn); + // string sql = ""; + // string sql1 = ""; + // for (int i = 0; i < 64; i++) + // { + // //sql = @"drop table if exists kjd_map.spu_map_" + i + ";\r\n"; + // sql = @"CREATE TABLE IF NOT EXISTS kjd_map.jit_product_select_map_" + i + @" ( + // `id` int NOT NULL AUTO_INCREMENT, + // `product_id` bigint NOT NULL COMMENT '草稿箱/商品Id', + // `product_select_db_id` bigint NOT NULL COMMENT '选品上传数据库Id', + // `shop_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '上传的店铺', + // PRIMARY KEY (`id`) + //) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '上传商品kjd库Id与商品DraftId映射关系';"; + + // sql += @" + //ALTER TABLE + // kjd_map.jit_product_select_map_" + i + @" + //ADD + // COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP"; + // var rst = mySql.ExecuteNonQuery(sql); + // } + // mySql.Close(); + + + + // string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + // MysqlUtils mySql = new MysqlUtils(conn); + // string sql = ""; + // for (int i = 0; i < 128; i++) + // { + // //sql = @"drop table if exists kjd_map.spu_map_" + i + ";\r\n"; + // sql = @"CREATE TABLE IF NOT EXISTS kjd_order.order_code_" + i + @" ( + // `id` int unsigned NOT NULL AUTO_INCREMENT, + // `supplierId` varchar(25) COLLATE utf8mb4_general_ci NOT NULL, + // `subPurchaseOrderSn` varchar(25) COLLATE utf8mb4_general_ci DEFAULT NULL, + // `jiaTongCode` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, + // `barCodeMd5` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL, + // `barCodeBase64` longtext COLLATE utf8mb4_general_ci, + // `shippingMark​Md5` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL, + // `shippingMarkBase64` longtext COLLATE utf8mb4_general_ci, + // `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + // `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + // PRIMARY KEY (`id`), + // UNIQUE KEY `index_subPurchaseOrderSn` (`subPurchaseOrderSn`) USING BTREE + //) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci"; + // sql = "ALTER TABLE\r\n kjd_order.order_code_" + i + "\r\nMODIFY\r\n COLUMN `jiaTongCode` varchar (50) NULL COMMENT '佳同码'\r\nAFTER\r\n `subPurchaseOrderSn`"; + // var rst = mySql.ExecuteNonQuery(sql); + // } + // mySql.Close(); + + + // string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; // MysqlUtils mySql = new MysqlUtils(conn); // string sql = ""; -// string sql1 = ""; -// for (int i = 0; i < 64; i++) +// for (int i = 0; i < 128; i++) // { // //sql = @"drop table if exists kjd_map.spu_map_" + i + ";\r\n"; -// sql = @"CREATE TABLE IF NOT EXISTS kjd_map.jit_product_select_map_" + i + @" ( +// sql = @"CREATE TABLE IF NOT EXISTS kjd_order.order_" + i + @" ( // `id` int NOT NULL AUTO_INCREMENT, -// `product_id` bigint NOT NULL COMMENT '草稿箱/商品Id', -// `product_select_db_id` bigint NOT NULL COMMENT '选品上传数据库Id', -// `shop_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '上传的店铺', -// PRIMARY KEY (`id`) -//) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '上传商品kjd库Id与商品DraftId映射关系';"; +// `supplierId` varchar(25) COLLATE utf8mb4_general_ci NOT NULL COMMENT '店铺Id', +// `originalPurchaseOrderSn` varchar(25) COLLATE utf8mb4_general_ci NOT NULL COMMENT '备货单号', +// `subPurchaseOrderSn` varchar(25) COLLATE utf8mb4_general_ci NOT NULL COMMENT '备货母单号', +// `productName` varchar(1000) COLLATE utf8mb4_general_ci NOT NULL, +// `category` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, +// `productId` varchar(25) COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品编号', +// `productSkcId` varchar(25) COLLATE utf8mb4_general_ci NOT NULL, +// `productSkcPicture` varchar(250) COLLATE utf8mb4_general_ci NOT NULL COMMENT '主图', +// `productSn` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '货号', +// `status` int NOT NULL COMMENT '状态 1待发货 2已送货 7已入库 8已作废', +// `productSkuId` varchar(25) COLLATE utf8mb4_general_ci NOT NULL, +// `className` varchar(100) COLLATE utf8mb4_general_ci NOT NULL COMMENT 'sku规格', +// `currencyType` varchar(10) COLLATE utf8mb4_general_ci NOT NULL, +// `supplierPrice` int NOT NULL COMMENT '申报价格', +// `purchaseQuantity` int NOT NULL COMMENT '备货件数', +// `deliverQuantity` int NOT NULL COMMENT '送货件数', +// `realReceiveAuthenticQuantity` int NOT NULL COMMENT '入库件数', +// `availableSaleDays` decimal(10, 0) NOT NULL COMMENT '可售天数', +// `qcResult` int DEFAULT NULL COMMENT '抽检结果 1合格 2不合格', +// `thumbUrlList` varchar(500) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'sku图片', +// `purchaseTime` bigint NOT NULL COMMENT '备货单创建时间', +// `deliverTime` bigint DEFAULT NULL COMMENT '发货时间', +// `receiveTime` bigint DEFAULT NULL COMMENT '收货时间', +// `expectLatestDeliverTimeOrDefault` bigint NOT NULL COMMENT '最迟发货时间', +// `expectLatestArrivalTimeOrDefault` bigint NOT NULL COMMENT '最迟到货时间', +// `deliveryOrderSn` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '发货单号', +// `receiveWarehouseId` varchar(25) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '实际收货仓库Id', +// `receiveWarehouseName` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '实际收货仓库', +// `warehouseGroupId` varchar(25) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '仓组Id', +// `jiaTongCode` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '佳同码', +// `barCodeMd5` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '商品条码MD5', +// `shippingMark​Md5` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '箱唛文件MD5', +// `notes` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注', +// `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, +// `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +// PRIMARY KEY (`id`), +// UNIQUE KEY `index_subPurchaseOrderSn` (`subPurchaseOrderSn`) USING BTREE +//) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单推送表'"; -// sql += @" -//ALTER TABLE -// kjd_map.jit_product_select_map_" + i + @" -//ADD -// COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP"; +// sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nADD\r\n COLUMN `upLoadStatus` int NOT NULL DEFAULT 0 COMMENT '是否上传订单(上传后扣除用户授权金额,产生扣费记录)',\r\nMODIFY\r\n COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP\r\nAFTER\r\n `upLoadStatus`,\r\nMODIFY\r\n COLUMN `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\r\nAFTER\r\n `add_time`"; +// sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nADD\r\n COLUMN `extCode` varchar (50) NOT NULL COMMENT 'sku货号',\r\nMODIFY\r\n COLUMN `className` varchar (100) NOT NULL COMMENT 'sku规格'\r\nAFTER\r\n `extCode`,\r\nMODIFY\r\n COLUMN `currencyType` varchar (10) NOT NULL\r\nAFTER\r\n `className`,\r\nMODIFY\r\n COLUMN `supplierPrice` int NOT NULL COMMENT '申报价格'\r\nAFTER\r\n `currencyType`,\r\nMODIFY\r\n COLUMN `purchaseQuantity` int NOT NULL COMMENT '备货件数'\r\nAFTER\r\n `supplierPrice`,\r\nMODIFY\r\n COLUMN `deliverQuantity` int NOT NULL COMMENT '送货件数'\r\nAFTER\r\n `purchaseQuantity`,\r\nMODIFY\r\n COLUMN `realReceiveAuthenticQuantity` int NOT NULL COMMENT '入库件数'\r\nAFTER\r\n `deliverQuantity`,\r\nMODIFY\r\n COLUMN `availableSaleDays` decimal (10, 0) NOT NULL COMMENT '可售天数'\r\nAFTER\r\n `realReceiveAuthenticQuantity`,\r\nMODIFY\r\n COLUMN `qcResult` int NULL COMMENT '抽检结果 1合格 2不合格'\r\nAFTER\r\n `availableSaleDays`,\r\nMODIFY\r\n COLUMN `thumbUrlList` varchar (500) NULL COMMENT 'sku图片'\r\nAFTER\r\n `qcResult`,\r\nMODIFY\r\n COLUMN `purchaseTime` bigint NOT NULL COMMENT '备货单创建时间'\r\nAFTER\r\n `thumbUrlList`,\r\nMODIFY\r\n COLUMN `deliverTime` bigint NULL COMMENT '发货时间'\r\nAFTER\r\n `purchaseTime`,\r\nMODIFY\r\n COLUMN `receiveTime` bigint NULL COMMENT '收货时间'\r\nAFTER\r\n `deliverTime`,\r\nMODIFY\r\n COLUMN `expectLatestDeliverTimeOrDefault` bigint NOT NULL COMMENT '最迟发货时间'\r\nAFTER\r\n `receiveTime`,\r\nMODIFY\r\n COLUMN `expectLatestArrivalTimeOrDefault` bigint NOT NULL COMMENT '最迟到货时间'\r\nAFTER\r\n `expectLatestDeliverTimeOrDefault`,\r\nMODIFY\r\n COLUMN `deliveryOrderSn` varchar (50) NULL COMMENT '发货单号'\r\nAFTER\r\n `expectLatestArrivalTimeOrDefault`,\r\nMODIFY\r\n COLUMN `receiveWarehouseId` varchar (25) NULL COMMENT '实际收货仓库Id'\r\nAFTER\r\n `deliveryOrderSn`,\r\nMODIFY\r\n COLUMN `receiveWarehouseName` varchar (50) NULL COMMENT '实际收货仓库'\r\nAFTER\r\n `receiveWarehouseId`,\r\nMODIFY\r\n COLUMN `warehouseGroupId` varchar (25) NULL COMMENT '仓组Id'\r\nAFTER\r\n `receiveWarehouseName`,\r\nMODIFY\r\n COLUMN `jiaTongCode` varchar (50) NULL COMMENT '佳同码'\r\nAFTER\r\n `warehouseGroupId`,\r\nMODIFY\r\n COLUMN `barCodeMd5` varchar (32) NULL COMMENT '商品条码MD5'\r\nAFTER\r\n `jiaTongCode`,\r\nMODIFY\r\n COLUMN `shippingMark​Md5` varchar (32) NULL COMMENT '箱唛文件MD5'\r\nAFTER\r\n `barCodeMd5`,\r\nMODIFY\r\n COLUMN `notes` varchar (50) NULL COMMENT '备注'\r\nAFTER\r\n `shippingMark​Md5`,\r\nMODIFY\r\n COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP\r\nAFTER\r\n `notes`,\r\nMODIFY\r\n COLUMN `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\r\nAFTER\r\n `add_time`"; +// sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nMODIFY\r\n COLUMN `extCode` varchar (50) NOT NULL COMMENT 'sku货号'\r\nAFTER\r\n `productSkuId`,\r\nMODIFY\r\n COLUMN `className` varchar (100) NOT NULL COMMENT 'sku规格'\r\nAFTER\r\n `extCode`,\r\nMODIFY\r\n COLUMN `currencyType` varchar (10) NOT NULL\r\nAFTER\r\n `className`,\r\nMODIFY\r\n COLUMN `supplierPrice` int NOT NULL COMMENT '申报价格'\r\nAFTER\r\n `currencyType`,\r\nMODIFY\r\n COLUMN `purchaseQuantity` int NOT NULL COMMENT '备货件数'\r\nAFTER\r\n `supplierPrice`,\r\nMODIFY\r\n COLUMN `deliverQuantity` int NOT NULL COMMENT '送货件数'\r\nAFTER\r\n `purchaseQuantity`,\r\nMODIFY\r\n COLUMN `realReceiveAuthenticQuantity` int NOT NULL COMMENT '入库件数'\r\nAFTER\r\n `deliverQuantity`,\r\nMODIFY\r\n COLUMN `availableSaleDays` decimal (10, 0) NOT NULL COMMENT '可售天数'\r\nAFTER\r\n `realReceiveAuthenticQuantity`,\r\nMODIFY\r\n COLUMN `qcResult` int NULL COMMENT '抽检结果 1合格 2不合格'\r\nAFTER\r\n `availableSaleDays`,\r\nMODIFY\r\n COLUMN `thumbUrlList` varchar (500) NULL COMMENT 'sku图片'\r\nAFTER\r\n `qcResult`,\r\nMODIFY\r\n COLUMN `purchaseTime` bigint NOT NULL COMMENT '备货单创建时间'\r\nAFTER\r\n `thumbUrlList`,\r\nMODIFY\r\n COLUMN `deliverTime` bigint NULL COMMENT '发货时间'\r\nAFTER\r\n `purchaseTime`,\r\nMODIFY\r\n COLUMN `receiveTime` bigint NULL COMMENT '收货时间'\r\nAFTER\r\n `deliverTime`,\r\nMODIFY\r\n COLUMN `expectLatestDeliverTimeOrDefault` bigint NOT NULL COMMENT '最迟发货时间'\r\nAFTER\r\n `receiveTime`,\r\nMODIFY\r\n COLUMN `expectLatestArrivalTimeOrDefault` bigint NOT NULL COMMENT '最迟到货时间'\r\nAFTER\r\n `expectLatestDeliverTimeOrDefault`,\r\nMODIFY\r\n COLUMN `deliveryOrderSn` varchar (50) NULL COMMENT '发货单号'\r\nAFTER\r\n `expectLatestArrivalTimeOrDefault`,\r\nMODIFY\r\n COLUMN `receiveWarehouseId` varchar (25) NULL COMMENT '实际收货仓库Id'\r\nAFTER\r\n `deliveryOrderSn`,\r\nMODIFY\r\n COLUMN `receiveWarehouseName` varchar (50) NULL COMMENT '实际收货仓库'\r\nAFTER\r\n `receiveWarehouseId`,\r\nMODIFY\r\n COLUMN `warehouseGroupId` varchar (25) NULL COMMENT '仓组Id'\r\nAFTER\r\n `receiveWarehouseName`,\r\nMODIFY\r\n COLUMN `jiaTongCode` varchar (50) NULL COMMENT '佳同码'\r\nAFTER\r\n `warehouseGroupId`,\r\nMODIFY\r\n COLUMN `barCodeMd5` varchar (32) NULL COMMENT '商品条码MD5'\r\nAFTER\r\n `jiaTongCode`,\r\nMODIFY\r\n COLUMN `shippingMark​Md5` varchar (32) NULL COMMENT '箱唛文件MD5'\r\nAFTER\r\n `barCodeMd5`,\r\nMODIFY\r\n COLUMN `notes` varchar (50) NULL COMMENT '备注'\r\nAFTER\r\n `shippingMark​Md5`,\r\nMODIFY\r\n COLUMN `upLoadStatus` int NOT NULL DEFAULT '0' COMMENT '是否上传订单(上传后扣除用户授权金额,产生扣费记录)'\r\nAFTER\r\n `notes`"; +// sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nADD\r\n COLUMN `costPrice` int NULL COMMENT '成本价',\r\nADD\r\n COLUMN `deliveryFee` int NULL COMMENT '车队费',\r\nADD\r\n COLUMN `markFee` int NULL COMMENT '贴标费',\r\nMODIFY\r\n COLUMN `purchaseQuantity` int NOT NULL COMMENT '备货件数'\r\nAFTER\r\n `markFee`,\r\nMODIFY\r\n COLUMN `deliverQuantity` int NOT NULL COMMENT '送货件数'\r\nAFTER\r\n `purchaseQuantity`,\r\nMODIFY\r\n COLUMN `realReceiveAuthenticQuantity` int NOT NULL COMMENT '入库件数'\r\nAFTER\r\n `deliverQuantity`,\r\nMODIFY\r\n COLUMN `availableSaleDays` decimal (10, 0) NOT NULL COMMENT '可售天数'\r\nAFTER\r\n `realReceiveAuthenticQuantity`,\r\nMODIFY\r\n COLUMN `qcResult` int NULL COMMENT '抽检结果 1合格 2不合格'\r\nAFTER\r\n `availableSaleDays`,\r\nMODIFY\r\n COLUMN `thumbUrlList` varchar (500) NULL COMMENT 'sku图片'\r\nAFTER\r\n `qcResult`,\r\nMODIFY\r\n COLUMN `purchaseTime` bigint NOT NULL COMMENT '备货单创建时间'\r\nAFTER\r\n `thumbUrlList`,\r\nMODIFY\r\n COLUMN `deliverTime` bigint NULL COMMENT '发货时间'\r\nAFTER\r\n `purchaseTime`,\r\nMODIFY\r\n COLUMN `receiveTime` bigint NULL COMMENT '收货时间'\r\nAFTER\r\n `deliverTime`,\r\nMODIFY\r\n COLUMN `expectLatestDeliverTimeOrDefault` bigint NOT NULL COMMENT '最迟发货时间'\r\nAFTER\r\n `receiveTime`,\r\nMODIFY\r\n COLUMN `expectLatestArrivalTimeOrDefault` bigint NOT NULL COMMENT '最迟到货时间'\r\nAFTER\r\n `expectLatestDeliverTimeOrDefault`,\r\nMODIFY\r\n COLUMN `deliveryOrderSn` varchar (50) NULL COMMENT '发货单号'\r\nAFTER\r\n `expectLatestArrivalTimeOrDefault`,\r\nMODIFY\r\n COLUMN `receiveWarehouseId` varchar (25) NULL COMMENT '实际收货仓库Id'\r\nAFTER\r\n `deliveryOrderSn`,\r\nMODIFY\r\n COLUMN `receiveWarehouseName` varchar (50) NULL COMMENT '实际收货仓库'\r\nAFTER\r\n `receiveWarehouseId`,\r\nMODIFY\r\n COLUMN `warehouseGroupId` varchar (25) NULL COMMENT '仓组Id'\r\nAFTER\r\n `receiveWarehouseName`,\r\nMODIFY\r\n COLUMN `jiaTongCode` varchar (50) NULL COMMENT '佳同码'\r\nAFTER\r\n `warehouseGroupId`,\r\nMODIFY\r\n COLUMN `barCodeMd5` varchar (32) NULL COMMENT '商品条码MD5'\r\nAFTER\r\n `jiaTongCode`,\r\nMODIFY\r\n COLUMN `shippingMark​Md5` varchar (32) NULL COMMENT '箱唛文件MD5'\r\nAFTER\r\n `barCodeMd5`,\r\nMODIFY\r\n COLUMN `notes` varchar (50) NULL COMMENT '备注'\r\nAFTER\r\n `shippingMark​Md5`,\r\nMODIFY\r\n COLUMN `upLoadStatus` int NOT NULL DEFAULT '0' COMMENT '是否上传订单(上传后扣除用户授权金额,产生扣费记录)'\r\nAFTER\r\n `notes`,\r\nMODIFY\r\n COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP\r\nAFTER\r\n `upLoadStatus`,\r\nMODIFY\r\n COLUMN `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\r\nAFTER\r\n `add_time`"; +// sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nMODIFY\r\n COLUMN `originalPurchaseOrderSn` varchar (25) NOT NULL COMMENT '备母货单号'\r\nAFTER\r\n `supplierId`,\r\nMODIFY\r\n COLUMN `subPurchaseOrderSn` varchar (25) NOT NULL COMMENT '备货单号'\r\nAFTER\r\n `originalPurchaseOrderSn`"; +// sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nMODIFY\r\n COLUMN `availableSaleDays` decimal (10, 0) NULL COMMENT '可售天数'\r\nAFTER\r\n `realReceiveAuthenticQuantity`"; +// sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nADD\r\n COLUMN `upProductId` varchar (25) NOT NULL COMMENT '上家编号',\r\nMODIFY\r\n COLUMN `productSkcId` varchar (25) NOT NULL\r\nAFTER\r\n `upProductId`,\r\nMODIFY\r\n COLUMN `productSkcPicture` varchar (250) NOT NULL COMMENT '主图'\r\nAFTER\r\n `productSkcId`,\r\nMODIFY\r\n COLUMN `productSn` varchar (50) NULL COMMENT '货号'\r\nAFTER\r\n `productSkcPicture`,\r\nMODIFY\r\n COLUMN `status` int NOT NULL COMMENT '状态 1待发货 2已送货 7已入库 8已作废'\r\nAFTER\r\n `productSn`,\r\nMODIFY\r\n COLUMN `productSkuId` varchar (25) NOT NULL\r\nAFTER\r\n `status`,\r\nMODIFY\r\n COLUMN `extCode` varchar (50) NOT NULL COMMENT 'sku货号'\r\nAFTER\r\n `productSkuId`,\r\nMODIFY\r\n COLUMN `className` varchar (100) NOT NULL COMMENT 'sku规格'\r\nAFTER\r\n `extCode`,\r\nMODIFY\r\n COLUMN `currencyType` varchar (10) NOT NULL\r\nAFTER\r\n `className`,\r\nMODIFY\r\n COLUMN `supplierPrice` int NOT NULL COMMENT '申报价格'\r\nAFTER\r\n `currencyType`,\r\nMODIFY\r\n COLUMN `costPrice` int NULL COMMENT '成本价'\r\nAFTER\r\n `supplierPrice`,\r\nMODIFY\r\n COLUMN `deliveryFee` int NULL COMMENT '车队费'\r\nAFTER\r\n `costPrice`,\r\nMODIFY\r\n COLUMN `markFee` int NULL COMMENT '贴标费'\r\nAFTER\r\n `deliveryFee`,\r\nMODIFY\r\n COLUMN `purchaseQuantity` int NOT NULL COMMENT '备货件数'\r\nAFTER\r\n `markFee`,\r\nMODIFY\r\n COLUMN `deliverQuantity` int NOT NULL COMMENT '送货件数'\r\nAFTER\r\n `purchaseQuantity`,\r\nMODIFY\r\n COLUMN `realReceiveAuthenticQuantity` int NOT NULL COMMENT '入库件数'\r\nAFTER\r\n `deliverQuantity`,\r\nMODIFY\r\n COLUMN `availableSaleDays` decimal (10, 0) NULL COMMENT '可售天数'\r\nAFTER\r\n `realReceiveAuthenticQuantity`,\r\nMODIFY\r\n COLUMN `qcResult` int NULL COMMENT '抽检结果 1合格 2不合格'\r\nAFTER\r\n `availableSaleDays`,\r\nMODIFY\r\n COLUMN `thumbUrlList` varchar (500) NULL COMMENT 'sku图片'\r\nAFTER\r\n `qcResult`,\r\nMODIFY\r\n COLUMN `purchaseTime` bigint NOT NULL COMMENT '备货单创建时间'\r\nAFTER\r\n `thumbUrlList`,\r\nMODIFY\r\n COLUMN `deliverTime` bigint NULL COMMENT '发货时间'\r\nAFTER\r\n `purchaseTime`,\r\nMODIFY\r\n COLUMN `receiveTime` bigint NULL COMMENT '收货时间'\r\nAFTER\r\n `deliverTime`,\r\nMODIFY\r\n COLUMN `expectLatestDeliverTimeOrDefault` bigint NOT NULL COMMENT '最迟发货时间'\r\nAFTER\r\n `receiveTime`,\r\nMODIFY\r\n COLUMN `expectLatestArrivalTimeOrDefault` bigint NOT NULL COMMENT '最迟到货时间'\r\nAFTER\r\n `expectLatestDeliverTimeOrDefault`,\r\nMODIFY\r\n COLUMN `deliveryOrderSn` varchar (50) NULL COMMENT '发货单号'\r\nAFTER\r\n `expectLatestArrivalTimeOrDefault`,\r\nMODIFY\r\n COLUMN `receiveWarehouseId` varchar (25) NULL COMMENT '实际收货仓库Id'\r\nAFTER\r\n `deliveryOrderSn`,\r\nMODIFY\r\n COLUMN `receiveWarehouseName` varchar (50) NULL COMMENT '实际收货仓库'\r\nAFTER\r\n `receiveWarehouseId`,\r\nMODIFY\r\n COLUMN `warehouseGroupId` varchar (25) NULL COMMENT '仓组Id'\r\nAFTER\r\n `receiveWarehouseName`,\r\nMODIFY\r\n COLUMN `jiaTongCode` varchar (50) NULL COMMENT '佳同码'\r\nAFTER\r\n `warehouseGroupId`,\r\nMODIFY\r\n COLUMN `barCodeMd5` varchar (32) NULL COMMENT '商品条码MD5'\r\nAFTER\r\n `jiaTongCode`,\r\nMODIFY\r\n COLUMN `shippingMark​Md5` varchar (32) NULL COMMENT '箱唛文件MD5'\r\nAFTER\r\n `barCodeMd5`,\r\nMODIFY\r\n COLUMN `notes` varchar (50) NULL COMMENT '备注'\r\nAFTER\r\n `shippingMark​Md5`,\r\nMODIFY\r\n COLUMN `upLoadStatus` int NOT NULL DEFAULT '0' COMMENT '是否上传订单(上传后扣除用户授权金额,产生扣费记录)'\r\nAFTER\r\n `notes`,\r\nMODIFY\r\n COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP\r\nAFTER\r\n `upLoadStatus`,\r\nMODIFY\r\n COLUMN `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\r\nAFTER\r\n `add_time`"; +// sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nMODIFY\r\n COLUMN `upProductId` varchar (25) NULL COMMENT '上家编号'\r\nAFTER\r\n `productId`"; +// sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nADD\r\n COLUMN `supplierName` varchar (50) NOT NULL COMMENT '店铺名称',\r\nMODIFY\r\n COLUMN `originalPurchaseOrderSn` varchar (25) NOT NULL COMMENT '备母货单号'\r\nAFTER\r\n `supplierName`,\r\nMODIFY\r\n COLUMN `subPurchaseOrderSn` varchar (25) NOT NULL COMMENT '备货单号'\r\nAFTER\r\n `originalPurchaseOrderSn`,\r\nMODIFY\r\n COLUMN `productName` varchar (1000) NOT NULL\r\nAFTER\r\n `subPurchaseOrderSn`,\r\nMODIFY\r\n COLUMN `category` varchar (50) NOT NULL\r\nAFTER\r\n `productName`,\r\nMODIFY\r\n COLUMN `productId` varchar (25) NOT NULL COMMENT '商品编号'\r\nAFTER\r\n `category`,\r\nMODIFY\r\n COLUMN `upProductId` varchar (25) NULL COMMENT '上家编号'\r\nAFTER\r\n `productId`,\r\nMODIFY\r\n COLUMN `productSkcId` varchar (25) NOT NULL\r\nAFTER\r\n `upProductId`,\r\nMODIFY\r\n COLUMN `productSkcPicture` varchar (250) NOT NULL COMMENT '主图'\r\nAFTER\r\n `productSkcId`,\r\nMODIFY\r\n COLUMN `productSn` varchar (50) NULL COMMENT '货号'\r\nAFTER\r\n `productSkcPicture`,\r\nMODIFY\r\n COLUMN `status` int NOT NULL COMMENT '状态 1待发货 2已送货 7已入库 8已作废'\r\nAFTER\r\n `productSn`,\r\nMODIFY\r\n COLUMN `productSkuId` varchar (25) NOT NULL\r\nAFTER\r\n `status`,\r\nMODIFY\r\n COLUMN `extCode` varchar (50) NOT NULL COMMENT 'sku货号'\r\nAFTER\r\n `productSkuId`,\r\nMODIFY\r\n COLUMN `className` varchar (100) NOT NULL COMMENT 'sku规格'\r\nAFTER\r\n `extCode`,\r\nMODIFY\r\n COLUMN `currencyType` varchar (10) NOT NULL\r\nAFTER\r\n `className`,\r\nMODIFY\r\n COLUMN `supplierPrice` int NOT NULL COMMENT '申报价格'\r\nAFTER\r\n `currencyType`,\r\nMODIFY\r\n COLUMN `costPrice` int NULL COMMENT '成本价'\r\nAFTER\r\n `supplierPrice`,\r\nMODIFY\r\n COLUMN `deliveryFee` int NULL COMMENT '车队费'\r\nAFTER\r\n `costPrice`,\r\nMODIFY\r\n COLUMN `markFee` int NULL COMMENT '贴标费'\r\nAFTER\r\n `deliveryFee`,\r\nMODIFY\r\n COLUMN `purchaseQuantity` int NOT NULL COMMENT '备货件数'\r\nAFTER\r\n `markFee`,\r\nMODIFY\r\n COLUMN `deliverQuantity` int NOT NULL COMMENT '送货件数'\r\nAFTER\r\n `purchaseQuantity`,\r\nMODIFY\r\n COLUMN `realReceiveAuthenticQuantity` int NOT NULL COMMENT '入库件数'\r\nAFTER\r\n `deliverQuantity`,\r\nMODIFY\r\n COLUMN `availableSaleDays` decimal (10, 0) NULL COMMENT '可售天数'\r\nAFTER\r\n `realReceiveAuthenticQuantity`,\r\nMODIFY\r\n COLUMN `qcResult` int NULL COMMENT '抽检结果 1合格 2不合格'\r\nAFTER\r\n `availableSaleDays`,\r\nMODIFY\r\n COLUMN `thumbUrlList` varchar (500) NULL COMMENT 'sku图片'\r\nAFTER\r\n `qcResult`,\r\nMODIFY\r\n COLUMN `purchaseTime` bigint NOT NULL COMMENT '备货单创建时间'\r\nAFTER\r\n `thumbUrlList`,\r\nMODIFY\r\n COLUMN `deliverTime` bigint NULL COMMENT '发货时间'\r\nAFTER\r\n `purchaseTime`,\r\nMODIFY\r\n COLUMN `receiveTime` bigint NULL COMMENT '收货时间'\r\nAFTER\r\n `deliverTime`,\r\nMODIFY\r\n COLUMN `expectLatestDeliverTimeOrDefault` bigint NOT NULL COMMENT '最迟发货时间'\r\nAFTER\r\n `receiveTime`,\r\nMODIFY\r\n COLUMN `expectLatestArrivalTimeOrDefault` bigint NOT NULL COMMENT '最迟到货时间'\r\nAFTER\r\n `expectLatestDeliverTimeOrDefault`,\r\nMODIFY\r\n COLUMN `deliveryOrderSn` varchar (50) NULL COMMENT '发货单号'\r\nAFTER\r\n `expectLatestArrivalTimeOrDefault`,\r\nMODIFY\r\n COLUMN `receiveWarehouseId` varchar (25) NULL COMMENT '实际收货仓库Id'\r\nAFTER\r\n `deliveryOrderSn`,\r\nMODIFY\r\n COLUMN `receiveWarehouseName` varchar (50) NULL COMMENT '实际收货仓库'\r\nAFTER\r\n `receiveWarehouseId`,\r\nMODIFY\r\n COLUMN `warehouseGroupId` varchar (25) NULL COMMENT '仓组Id'\r\nAFTER\r\n `receiveWarehouseName`,\r\nMODIFY\r\n COLUMN `jiaTongCode` varchar (50) NULL COMMENT '佳同码'\r\nAFTER\r\n `warehouseGroupId`,\r\nMODIFY\r\n COLUMN `barCodeMd5` varchar (32) NULL COMMENT '商品条码MD5'\r\nAFTER\r\n `jiaTongCode`,\r\nMODIFY\r\n COLUMN `shippingMark​Md5` varchar (32) NULL COMMENT '箱唛文件MD5'\r\nAFTER\r\n `barCodeMd5`,\r\nMODIFY\r\n COLUMN `notes` varchar (50) NULL COMMENT '备注'\r\nAFTER\r\n `shippingMark​Md5`,\r\nMODIFY\r\n COLUMN `upLoadStatus` int NOT NULL DEFAULT '0' COMMENT '是否上传订单(上传后扣除用户授权金额,产生扣费记录)'\r\nAFTER\r\n `notes`,\r\nMODIFY\r\n COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP\r\nAFTER\r\n `upLoadStatus`,\r\nMODIFY\r\n COLUMN `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\r\nAFTER\r\n `add_time`"; + +// sql = "ALTER TABLE\r\n kjd_order.order_" + i + " CHANGE COLUMN `shippingMark​Md5` `shippingMarkMd5` varchar (32) NULL COMMENT '箱唛文件MD5'"; // var rst = mySql.ExecuteNonQuery(sql); // } // mySql.Close(); diff --git a/KJDService/KJD_WebService/Global.asax.cs b/KJDService/KJD_WebService/Global.asax.cs index 6941abb..05b1aba 100644 --- a/KJDService/KJD_WebService/Global.asax.cs +++ b/KJDService/KJD_WebService/Global.asax.cs @@ -38,6 +38,11 @@ namespace KJD_Web hPath = hPath.Replace("/update/", "/UpdateService.asmx/"); Context.RewritePath(hPath); } + else if (!hPath.Contains(".asmx") && hPath.Contains("/order/")) + { + hPath = hPath.Replace("/order/", "/OrderService.asmx/"); + Context.RewritePath(hPath); + } else if (!hPath.Contains(".asmx") && hPath.Contains("/product/")) { hPath = hPath.Replace("/product/", "/ProductService.asmx/"); diff --git a/KJDService/KJD_WebService/KJD_WebService.csproj b/KJDService/KJD_WebService/KJD_WebService.csproj index 7732ce0..462f8af 100644 --- a/KJDService/KJD_WebService/KJD_WebService.csproj +++ b/KJDService/KJD_WebService/KJD_WebService.csproj @@ -79,6 +79,7 @@ + @@ -95,6 +96,7 @@ + @@ -116,6 +118,7 @@ + BXXPriceService.asmx @@ -133,6 +136,10 @@ BXXProductThirdService.asmx Component + + OrderService.asmx + Component + ProductThirdService.asmx Component diff --git a/KJDService/KJD_WebService/Model/TemuDBOrderInfo.cs b/KJDService/KJD_WebService/Model/TemuDBOrderInfo.cs new file mode 100644 index 0000000..127bf8a --- /dev/null +++ b/KJDService/KJD_WebService/Model/TemuDBOrderInfo.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; + +namespace KJD_Web.Model +{ + public class TemuDBOrderInfo + { + public int? id { get; set; } + public string supplierId { get; set; } // '店铺Id', + public string supplierName { get; set; } + public string originalPurchaseOrderSn { get; set; } // '备货单号', + public string subPurchaseOrderSn { get; set; } // '备货母单号', + public string productName { get; set; } + public string category { get; set; } + public string productId { get; set; } // '商品编号', + public string upProductId { get; set; } // 上家商品编号 + public string productSkcId { get; set; } // + public string productSkcPicture { get; set; } //'主图', + public string productSn { get; set; } // '货号', + public int status { get; set; } = 1; // '状态 1待发货 2已送货 7已入库 8已作废', + public string productSkuId { get; set; } // CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + /// + /// 订单sku货号 + /// + public string extCode { get; set; } // 'sku货号', + public string className { get; set; } // 'sku规格', + public string currencyType { get; set; } // 价格单位 + public int supplierPrice { get; set; } // '申报价格', + public int? costPrice { get; set; } // '成本价', + public int? deliveryFee { get; set; } // '车队费', + public int? markFee { get; set; } // '贴标费', + public int purchaseQuantity { get; set; } // '备货件数', + public int deliverQuantity { get; set; } // '送货件数', + public int realReceiveAuthenticQuantity { get; set; } // '入库件数', + public decimal? availableSaleDays { get; set; } // '可售天数', + public int? qcResult { get; set; } // '抽检结果 1合格 2不合格', + public string thumbUrlList { get; set; } // 'sku图片', + public long purchaseTime { get; set; } // '备货单创建时间', + public long? deliverTime { get; set; } // '发货时间', + public long? receiveTime { get; set; } // '收货时间', + public long expectLatestDeliverTimeOrDefault { get; set; } // '最迟发货时间', + public long expectLatestArrivalTimeOrDefault { get; set; } // '最迟到货时间', + public string deliveryOrderSn { get; set; } // '发货单号', + public string receiveWarehouseId { get; set; } // '实际收货仓库Id', + public string receiveWarehouseName { get; set; } // '实际收货仓库', + public string warehouseGroupId { get; set; } // '仓组Id', + public string jiaTongCode { get; set; } // '佳同码', + public string barCodeMd5 { get; set; } // '商品条码MD5', + public string shippingMark​Md5 { get; set; } // '箱唛文件MD5', + public string notes { get; set; } // '备注', + public int upLoadStatus { get; set; } = 0; // '是否上传订单(上传后扣除用户授权金额,产生扣费记录)', + public DateTime add_time { get; set; } // + public DateTime mdy_time { get; set; } // + } +} \ No newline at end of file diff --git a/KJDService/KJD_WebService/OrderService.asmx b/KJDService/KJD_WebService/OrderService.asmx new file mode 100644 index 0000000..c32a283 --- /dev/null +++ b/KJDService/KJD_WebService/OrderService.asmx @@ -0,0 +1 @@ +<%@ WebService Language="C#" CodeBehind="OrderService.asmx.cs" Class="KJD_Web.OrderService" %> diff --git a/KJDService/KJD_WebService/OrderService.asmx.cs b/KJDService/KJD_WebService/OrderService.asmx.cs new file mode 100644 index 0000000..aa3d279 --- /dev/null +++ b/KJDService/KJD_WebService/OrderService.asmx.cs @@ -0,0 +1,90 @@ +using KJD_Web.BLL; +using KJD_Web.Utils; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Web; +using System.Web.Services; + +namespace KJD_Web +{ + /// + /// OrderService 的摘要说明 + /// + [WebService(Namespace = "http://tempuri.org/")] + [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] + [System.ComponentModel.ToolboxItem(false)] + // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消注释以下行。 + // [System.Web.Script.Services.ScriptService] + public class OrderService : System.Web.Services.WebService + { + private string GetRequestJsonString() + { + Context.Response.ContentType = "text/html;charset=utf-8"; + Context.Response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8"); + + using (Stream s = HttpContext.Current.Request.InputStream) // 获得json 字符流 + { + // 还原数据流 + byte[] b = new byte[s.Length]; + s.Read(b, 0, (int)s.Length); + string jsonText = Encoding.UTF8.GetString(b); // JSON字符串 + if (string.IsNullOrEmpty(jsonText)) + { + var qs = HttpContext.Current.Request.QueryString; + if (qs != null && qs.Keys.Count > 0) + { + jsonText = "{"; + foreach (var key in qs.Keys) + { + jsonText += "\"" + key + "\":" + "\"" + qs[key.ToString()] + "\";"; + } + jsonText = jsonText.TrimEnd(';') + "}"; + } + } + return jsonText; + } + } + + [WebMethod] + public void add_order() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new OrderManage().AddOrder(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + + + [WebMethod] + public void get_order_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new OrderManage().GetOrderList(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + //UpdateOrderStatus1 + [WebMethod] + public void update_order_status1() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new OrderManage().UpdateOrderStatus1(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + } +} diff --git a/KJDService/KJD_WebService/ProductService.asmx.cs b/KJDService/KJD_WebService/ProductService.asmx.cs index efd2f6e..4e119f2 100644 --- a/KJDService/KJD_WebService/ProductService.asmx.cs +++ b/KJDService/KJD_WebService/ProductService.asmx.cs @@ -311,7 +311,7 @@ namespace KJD_Web //AddCateSizeWeightConfig [WebMethod] - public void add_cate_size_weight_config() + public void add_cate_size_weight_config_v2() { string jsontext = GetRequestJsonString(); var result = jsontext; @@ -322,7 +322,7 @@ namespace KJD_Web } [WebMethod] - public void get_cate_size_weight_config() + public void get_cate_size_weight_config_v2() { string jsontext = GetRequestJsonString(); var result = jsontext; diff --git a/KJDService/KJD_WebService/Utils/Extension/Extension.Convert.cs b/KJDService/KJD_WebService/Utils/Extension/Extension.Convert.cs index 21b71ad..7ef9ace 100644 --- a/KJDService/KJD_WebService/Utils/Extension/Extension.Convert.cs +++ b/KJDService/KJD_WebService/Utils/Extension/Extension.Convert.cs @@ -39,6 +39,26 @@ namespace NaiBa.Util.Extension } } + public static long? ParseToNullableLong(this object obj) + { + if (obj == null) + return null; + + try + { + string str = obj.ParseToString(); + if (string.IsNullOrEmpty(str)) + { + return null; + } + return long.Parse(str); + } + catch + { + return null; + } + } + /// /// 将object转换为long,若转换失败,则返回指定值。不抛出异常。 /// @@ -82,6 +102,21 @@ namespace NaiBa.Util.Extension } } + public static int? ParseToNullableInt(this object str) + { + if (str == null) + return null; + + try + { + return Convert.ToInt32(str); + } + catch + { + return null; + } + } + public static int DecimalPointParseToInt(this object str) { try @@ -194,6 +229,17 @@ namespace NaiBa.Util.Extension return 0; } } + public static decimal? ParseToNullableDecimal(this object str) + { + try + { + return decimal.Parse(str.ToString()); + } + catch + { + return null; + } + } #endregion #region 转化为bool diff --git a/KJDService/KJD_WebService/Utils/TimeUtils.cs b/KJDService/KJD_WebService/Utils/TimeUtils.cs index 08a3b36..9ca886c 100644 --- a/KJDService/KJD_WebService/Utils/TimeUtils.cs +++ b/KJDService/KJD_WebService/Utils/TimeUtils.cs @@ -20,6 +20,19 @@ namespace KJD_Web.Utils return dateTimeStart.Add(toNow); } + /// + /// 时间戳转为C#格式时间 + /// + /// + /// + public static DateTime StampMillisecondsToDateTime(long timeStamp) + { + DateTime dateTimeStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); + long lTime = long.Parse(timeStamp + "0000"); + TimeSpan toNow = new TimeSpan(lTime); + return dateTimeStart.Add(toNow); + } + /// /// C#格式时间转换为Unix时间戳(秒) /// diff --git a/TEMUKJD/KJD.csproj b/TEMUKJD/KJD.csproj index 3e8251c..0083095 100644 --- a/TEMUKJD/KJD.csproj +++ b/TEMUKJD/KJD.csproj @@ -37,7 +37,7 @@ AnyCPU true full - true + false ..\bin\ DEBUG;TRACE prompt @@ -160,6 +160,12 @@ JITForm.cs + + Form + + + JitPushOrder.cs + Form @@ -913,6 +919,9 @@ JITForm.cs + + JitPushOrder.cs + JitShopActiveForm.cs diff --git a/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.Designer.cs b/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.Designer.cs index 9bd3df2..9ca6e3e 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.Designer.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.Designer.cs @@ -30,20 +30,22 @@ namespace TemuKJD.KJDForms.AdminForms private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.btnSearchPrice3 = new DevComponents.DotNetBar.PanelEx(); this.numSleep = new System.Windows.Forms.NumericUpDown(); this.lblSleep = new System.Windows.Forms.Label(); this.btnRestoreFilterParams = new DevComponents.DotNetBar.PanelEx(); + this.btnStop = new DevComponents.DotNetBar.PanelEx(); this.btnSaveFilterParams = new DevComponents.DotNetBar.PanelEx(); this.btnRestoreSizeAndNumber = new DevComponents.DotNetBar.PanelEx(); this.txtPrice2 = new System.Windows.Forms.TextBox(); @@ -67,7 +69,6 @@ namespace TemuKJD.KJDForms.AdminForms this.btnMutliOk = new DevComponents.DotNetBar.PanelEx(); this.dtpEndTime = new System.Windows.Forms.DateTimePicker(); this.dtpStartTime = new System.Windows.Forms.DateTimePicker(); - this.btnStop = new DevComponents.DotNetBar.PanelEx(); this.btnSearchPrice2 = new DevComponents.DotNetBar.PanelEx(); this.btnRestoreProdName = new DevComponents.DotNetBar.PanelEx(); this.txtSkcId = new System.Windows.Forms.TextBox(); @@ -221,9 +222,11 @@ namespace TemuKJD.KJDForms.AdminForms | System.Windows.Forms.AnchorStyles.Right))); this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucGroupBoxEx1.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx1.Controls.Add(this.btnSearchPrice3); this.ucGroupBoxEx1.Controls.Add(this.numSleep); this.ucGroupBoxEx1.Controls.Add(this.lblSleep); this.ucGroupBoxEx1.Controls.Add(this.btnRestoreFilterParams); + this.ucGroupBoxEx1.Controls.Add(this.btnStop); this.ucGroupBoxEx1.Controls.Add(this.btnSaveFilterParams); this.ucGroupBoxEx1.Controls.Add(this.btnRestoreSizeAndNumber); this.ucGroupBoxEx1.Controls.Add(this.txtPrice2); @@ -244,7 +247,6 @@ namespace TemuKJD.KJDForms.AdminForms this.ucGroupBoxEx1.Controls.Add(this.btnMutliOk); this.ucGroupBoxEx1.Controls.Add(this.dtpEndTime); this.ucGroupBoxEx1.Controls.Add(this.dtpStartTime); - this.ucGroupBoxEx1.Controls.Add(this.btnStop); this.ucGroupBoxEx1.Controls.Add(this.btnSearchPrice2); this.ucGroupBoxEx1.Controls.Add(this.btnRestoreProdName); this.ucGroupBoxEx1.Controls.Add(this.txtSkcId); @@ -273,6 +275,30 @@ namespace TemuKJD.KJDForms.AdminForms this.ucGroupBoxEx1.TabStop = false; this.ucGroupBoxEx1.Text = "参数设置"; // + // btnSearchPrice3 + // + this.btnSearchPrice3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSearchPrice3.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSearchPrice3.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSearchPrice3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSearchPrice3.Location = new System.Drawing.Point(267, 110); + this.btnSearchPrice3.Name = "btnSearchPrice3"; + this.btnSearchPrice3.Size = new System.Drawing.Size(71, 23); + this.btnSearchPrice3.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearchPrice3.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearchPrice3.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearchPrice3.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSearchPrice3.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSearchPrice3.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSearchPrice3.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSearchPrice3.Style.GradientAngle = 90; + this.btnSearchPrice3.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearchPrice3.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearchPrice3.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearchPrice3.TabIndex = 1164; + this.btnSearchPrice3.Text = "读取已发布"; + this.btnSearchPrice3.Click += new System.EventHandler(this.btnSearchPrice3_Click); + // // numSleep // this.numSleep.DecimalPlaces = 2; @@ -331,6 +357,30 @@ namespace TemuKJD.KJDForms.AdminForms this.btnRestoreFilterParams.Text = "还原选中配置"; this.btnRestoreFilterParams.Click += new System.EventHandler(this.btnRestoreFilterParams_Click); // + // btnStop + // + this.btnStop.CanvasColor = System.Drawing.SystemColors.Control; + this.btnStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnStop.DisabledBackColor = System.Drawing.Color.Empty; + this.btnStop.Location = new System.Drawing.Point(280, 86); + this.btnStop.Name = "btnStop"; + this.btnStop.Size = new System.Drawing.Size(44, 23); + this.btnStop.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnStop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnStop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnStop.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnStop.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnStop.Style.GradientAngle = 90; + this.btnStop.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnStop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnStop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnStop.TabIndex = 797; + this.btnStop.Text = "停止"; + this.btnStop.Click += new System.EventHandler(this.btnStop_Click); + // // btnSaveFilterParams // this.btnSaveFilterParams.CanvasColor = System.Drawing.SystemColors.Control; @@ -446,22 +496,22 @@ namespace TemuKJD.KJDForms.AdminForms // this.dgvExtCode.AllowUserToAddRows = false; this.dgvExtCode.AllowUserToDeleteRows = false; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); - this.dgvExtCode.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); + this.dgvExtCode.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10; this.dgvExtCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left))); this.dgvExtCode.AutoRowNumber = false; this.dgvExtCode.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dgvExtCode.BackgroundColor = System.Drawing.Color.White; this.dgvExtCode.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvExtCode.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvExtCode.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11; this.dgvExtCode.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colSelectExtCode, this.colFilterExtCode, @@ -672,39 +722,15 @@ namespace TemuKJD.KJDForms.AdminForms this.dtpStartTime.Size = new System.Drawing.Size(183, 23); this.dtpStartTime.TabIndex = 825; // - // btnStop - // - this.btnStop.CanvasColor = System.Drawing.SystemColors.Control; - this.btnStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnStop.DisabledBackColor = System.Drawing.Color.Empty; - this.btnStop.Location = new System.Drawing.Point(453, 110); - this.btnStop.Name = "btnStop"; - this.btnStop.Size = new System.Drawing.Size(56, 23); - this.btnStop.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnStop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.btnStop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.btnStop.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.btnStop.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnStop.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.btnStop.Style.GradientAngle = 90; - this.btnStop.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; - this.btnStop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnStop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnStop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnStop.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.btnStop.TabIndex = 797; - this.btnStop.Text = "停止读取"; - this.btnStop.Click += new System.EventHandler(this.btnStop_Click); - // // btnSearchPrice2 // this.btnSearchPrice2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnSearchPrice2.Cursor = System.Windows.Forms.Cursors.Hand; this.btnSearchPrice2.DisabledBackColor = System.Drawing.Color.Empty; this.btnSearchPrice2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSearchPrice2.Location = new System.Drawing.Point(357, 110); + this.btnSearchPrice2.Location = new System.Drawing.Point(411, 110); this.btnSearchPrice2.Name = "btnSearchPrice2"; - this.btnSearchPrice2.Size = new System.Drawing.Size(94, 23); + this.btnSearchPrice2.Size = new System.Drawing.Size(98, 23); this.btnSearchPrice2.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnSearchPrice2.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnSearchPrice2.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -781,9 +807,9 @@ namespace TemuKJD.KJDForms.AdminForms this.btnSearchPrice.Cursor = System.Windows.Forms.Cursors.Hand; this.btnSearchPrice.DisabledBackColor = System.Drawing.Color.Empty; this.btnSearchPrice.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSearchPrice.Location = new System.Drawing.Point(280, 110); + this.btnSearchPrice.Location = new System.Drawing.Point(339, 110); this.btnSearchPrice.Name = "btnSearchPrice"; - this.btnSearchPrice.Size = new System.Drawing.Size(75, 23); + this.btnSearchPrice.Size = new System.Drawing.Size(71, 23); this.btnSearchPrice.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnSearchPrice.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnSearchPrice.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -1322,19 +1348,19 @@ namespace TemuKJD.KJDForms.AdminForms // this.dgvShop.AllowUserToAddRows = false; this.dgvShop.AllowUserToDeleteRows = false; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle12.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle12; 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))))); - 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.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle13.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle13; this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colSelect, @@ -1553,19 +1579,19 @@ namespace TemuKJD.KJDForms.AdminForms // this.dgvPriceCheck.AllowUserToAddRows = false; this.dgvPriceCheck.AllowUserToDeleteRows = false; - dataGridViewCellStyle5.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvPriceCheck.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle14.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvPriceCheck.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle14; this.dgvPriceCheck.AutoRowNumber = true; this.dgvPriceCheck.BackgroundColor = System.Drawing.Color.White; this.dgvPriceCheck.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvPriceCheck.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle15.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvPriceCheck.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle15; this.dgvPriceCheck.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvPriceCheck.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colCheck, @@ -1678,8 +1704,8 @@ namespace TemuKJD.KJDForms.AdminForms // // colProdName // - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colProdName.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProdName.DefaultCellStyle = dataGridViewCellStyle16; this.colProdName.HeaderText = "标题"; this.colProdName.Name = "colProdName"; this.colProdName.ReadOnly = true; @@ -1687,8 +1713,8 @@ namespace TemuKJD.KJDForms.AdminForms // // colSkuName // - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colSkuName.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colSkuName.DefaultCellStyle = dataGridViewCellStyle17; this.colSkuName.HeaderText = "规格名称"; this.colSkuName.Name = "colSkuName"; this.colSkuName.ReadOnly = true; @@ -1738,8 +1764,8 @@ namespace TemuKJD.KJDForms.AdminForms // // colCreatTime // - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colCreatTime.DefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colCreatTime.DefaultCellStyle = dataGridViewCellStyle18; this.colCreatTime.HeaderText = "创建时间"; this.colCreatTime.Name = "colCreatTime"; this.colCreatTime.ReadOnly = true; @@ -1998,5 +2024,6 @@ namespace TemuKJD.KJDForms.AdminForms private System.Windows.Forms.NumericUpDown numPieces; private System.Windows.Forms.Label label17; private System.Windows.Forms.Panel pnlRestoreSizeAndNumber; + private DevComponents.DotNetBar.PanelEx btnSearchPrice3; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs b/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs index fcaa3d2..d9fbcf8 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs @@ -21,6 +21,7 @@ using TemuKJD.KJDForms.ShopForms; using Work; using TemuKJD.KJDForms.JITForms; using AllBase.Helper; +using NaiBa.Util; namespace TemuKJD.KJDForms.AdminForms { @@ -31,9 +32,9 @@ namespace TemuKJD.KJDForms.AdminForms PriceCheckConfig priceCheckConfig = null; List lstPriceCheckFilterConfig = new List(); public CancellationTokenSource cancellationTokenSource { get; set; } = null; - public List lstAdminShopInfo { get; set; } = new List(); - public List lstCheckPriceInfo = new List(); - public List lstCateSizeWeightConfig = new List(); + public ConcurrentList lstAdminShopInfo { get; set; } = new ConcurrentList(); + public ConcurrentList lstCheckPriceInfo = new ConcurrentList(); + public ConcurrentList lstCateSizeWeightConfig = new ConcurrentList(); public AdminProductPriceCheckForm() { @@ -80,16 +81,18 @@ namespace TemuKJD.KJDForms.AdminForms pnlRestoreSizeAndNumber.Visible = false; btnRestoreSizeAndNumber.Text = "还原核价设置"; - this.numJudgeLen.Value = 15; - this.numJudgeWeight.Value = 150; - this.numLen1.Value = 8; - this.numLen2.Value = 8; - this.numWidth1.Value = 7; - this.numWidth2.Value = 7; - this.numHeight1.Value = 6; - this.numHeight2.Value = 6; - this.numWeight1.Value = 6; - this.numWeight2.Value = 6; + this.numJudgeLen.Value = 26; + this.numJudgeWeight.Value = 201; + this.numLen1.Value = 25; + this.numLen2.Value = 25; + this.numWidth1.Value = 20; + this.numWidth2.Value = 20; + this.numHeight1.Value = 8; + this.numHeight2.Value = 8; + this.numWeight1.Value = 200; + this.numWeight2.Value = 200; + + btnSearchPrice3.Visible = false; } if (IsClientJit) @@ -762,6 +765,20 @@ namespace TemuKJD.KJDForms.AdminForms this.dgvPriceCheck.Columns["colCancel"].Visible = false; this.dgvPriceCheck.Columns["colCancelWithTitleWrong"].Visible = true; SearchPrice("待创建首单"); + //SearchPrice("已发布到站点"); + } + + private void btnSearchPrice3_Click(object sender, EventArgs e) + { + this.pnlDetailOperate1.Visible = false; + this.btnMutliOk.Visible = false; + this.btnMutliCancel.Visible = false; + this.pnlMutliCancelWithTitleWrong.Visible = false; + this.pnlMutliCancelWithTitleWrong.Location = btnMutliOk.Location; + this.dgvPriceCheck.Columns["colOk"].Visible = false; + this.dgvPriceCheck.Columns["colCancel"].Visible = false; + this.dgvPriceCheck.Columns["colCancelWithTitleWrong"].Visible = false; + SearchPrice("已发布到站点"); } private void SearchPrice(string type = "待卖家确认") @@ -1055,6 +1072,8 @@ namespace TemuKJD.KJDForms.AdminForms body += "\"priceReviewStatusList\":[1],\"secondarySelectStatusList\":[7],"; else if (type == "待创建首单") body += "\"secondarySelectStatusList\":[10],"; + else if (type == "已发布到站点") + body += "\"secondarySelectStatusList\":[12],\"supplierTodoTypeList\":[],"; body += "\"supplierTodoTypeList\":[],"; if (!string.IsNullOrEmpty(prodSkcIds)) body += "\"productSkcIdList\":[" + prodSkcIds + "],"; @@ -1145,7 +1164,7 @@ namespace TemuKJD.KJDForms.AdminForms /// /// /// - private string editPriceProductSizeAndNumberBatchAdd(ShopLoginInfo shop, string productId) + public static string editPriceProductSizeAndNumberBatchAdd(ShopLoginInfo shop, string productId) { string url = "https://agentseller.temu.com/lich-mms/audit/edit/task/product/batchAdd"; string body = @"{""bizIdType"":1,""bizIds"":[" + productId + @"],""productEditItems"":[{""editItem"":4,""editAdvice"":""优化""},{""editItem"":8,""editAdvice"":""优化""}]}"; @@ -1153,7 +1172,7 @@ namespace TemuKJD.KJDForms.AdminForms return HttpResponseBLL.PostResponse2(shop, url, body, referer); } - private string editPriceProductSizeAndNumberTaskQuery(ShopLoginInfo shop, string productId) + public static string editPriceProductSizeAndNumberTaskQuery(ShopLoginInfo shop, string productId) { string url = "https://agentseller.temu.com/lich-mms/audit/edit/task/product/pageQuery"; string body = @"{""page"":1,""pageSize"":10,""editTaskAggStatuses"":[1],""productIdList"":[" + productId + "]}"; @@ -1161,7 +1180,7 @@ namespace TemuKJD.KJDForms.AdminForms return HttpResponseBLL.PostResponse2(shop, url, body, referer); } - private string editPriceProductQuery(ShopLoginInfo shop, string prodId, string taskUid) + public static string editPriceProductQuery(ShopLoginInfo shop, string prodId, string taskUid) { string url = "https://agentseller.temu.com/visage-agent-seller/product/query"; string body = @"{""productId"":" + prodId + @",""productEditTaskUid"":""" + taskUid + @"""}"; @@ -1169,14 +1188,25 @@ namespace TemuKJD.KJDForms.AdminForms return HttpResponseBLL.PostResponse2(shop, url, body, refere); } - private string queryProductSizeAndWeightConfig(ShopLoginInfo shop, string taskUid, string productId) + public static string queryProductSizeAndWeightConfig(ShopLoginInfo shop, string taskUid, string productId, string catId) { string url = "https://agentseller.temu.com/anniston-agent-seller/product/check/common/queryConfig"; string body = "{}"; string referer = "https://agentseller.temu.com/goods/edit?from=platform&productId=" + productId + "&taskUid=" + taskUid; return HttpResponseBLL.PostResponse2(shop, url, body, referer); } - private string editPriceProductSizeAndNumber(ShopLoginInfo shop, string taskUid, string productId, string data) + + public static string queryCatSizeAndWeightConfig(ShopLoginInfo shop, string taskUid, string productId, string catId) + { + string url = "https://agentseller.temu.com/anniston-agent-seller/product/check/common/queryConfig"; + url = "https://agentseller.temu.com/anniston-agent-seller/product/check/cat/queryConfig"; + string body = "{}"; + body = @"{""catId"":" + catId + "}"; + string referer = "https://agentseller.temu.com/goods/edit?from=platform&productId=" + productId + "&taskUid=" + taskUid; + referer = "https://agentseller.temu.com/goods/edit?from=productList&productId=" + productId; + return HttpResponseBLL.PostResponse2(shop, url, body, referer); + } + public static string editPriceProductSizeAndNumber(ShopLoginInfo shop, string taskUid, string productId, string data) { string url = "https://agentseller.temu.com/visage-agent-seller/product/edit/task/reply"; //string body = @"{""productId"":4432690492,""taskUid"":""8de73095-733e-4cdf-8fbd-3ddd8d9dff18"",""taskVersion"":0,""refuseEdit"":false,""productName"":""男士轻便 EVA 拖鞋,带钩环后跟带 ,舒适的露趾拖鞋,适合室内和室外使用,家居拖鞋,易于使用的魔鬼毡扣带扣,洞洞鞋,家居拖鞋,带钩环扣件,适合室内和室外使用,带扣凉鞋,后厨工专用鞋简约款两用,适合室内/室外使用,春夏凉鞋,EVA 拖鞋,适合19个不同的搭配风格""}"; @@ -1865,7 +1895,7 @@ namespace TemuKJD.KJDForms.AdminForms if (cateSizeWeightConfig == null) { - var url = BaseClass.BuildObjString("product/get_cate_size_weight_config"); + var url = BaseClass.BuildObjString("product/get_cate_size_weight_config_v2"); var data = UserLogin.GetSignaturex() + "&cat_id=" + catId; html = GetHtml.PostUtf8(url, data); @@ -1877,7 +1907,7 @@ namespace TemuKJD.KJDForms.AdminForms { var jArr = JObject.Parse(html)["data"]; cateSizeWeightConfig = JsonHelper.DeserializeJsonToObject(jArr.ToString()); - if (lstCateSizeWeightConfig != null) + if (cateSizeWeightConfig != null) lstCateSizeWeightConfig.Add(cateSizeWeightConfig); } catch { } @@ -1887,36 +1917,57 @@ namespace TemuKJD.KJDForms.AdminForms if (cateSizeWeightConfig == null) { //查询接口尺寸重量限制 - html = queryProductSizeAndWeightConfig(shop, taskUid.ParseToString(), price.productId.ParseToString()); + html = queryProductSizeAndWeightConfig(shop, taskUid.ParseToString(), price.productId.ParseToString(), catId.ParseToString()); + var html1 = queryCatSizeAndWeightConfig(shop, taskUid.ParseToString(), price.productId.ParseToString(), catId.ParseToString()); + if (!string.IsNullOrEmpty(html1) && html1.Contains("length")) + html = html1; //{"success":true,"errorCode":1000000,"errorMsg":null,"result":{"common":{"operatorId":null,"operatorName":null,"operatorType":null,"checkSideRelation":false,"noticeSideEquation":false,"length":{"min":10,"max":2999},"width":{"min":5,"max":2999},"height":{"min":2,"max":2999},"weight":{"min":2000,"max":99999000}}}} Thread.Sleep(Randomx.GetId(25, 75)); commonSleep(); if (html.Contains("\"success\":true")) { - JObject jObj = JObject.Parse(html); - cateSizeWeightConfig = new CateSizeWeightConfig() { catId = catId.ToString() }; - cateSizeWeightConfig.minLen = jObj["result"]["common"]["length"]["min"].ParseToInt(); - cateSizeWeightConfig.maxLen = jObj["result"]["common"]["length"]["max"].ParseToInt(); - cateSizeWeightConfig.minWidth = jObj["result"]["common"]["width"]["min"].ParseToInt(); - cateSizeWeightConfig.maxWidth = jObj["result"]["common"]["width"]["max"].ParseToInt(); - cateSizeWeightConfig.minHeight = jObj["result"]["common"]["height"]["min"].ParseToInt(); - cateSizeWeightConfig.maxHeight = jObj["result"]["common"]["height"]["max"].ParseToInt(); - cateSizeWeightConfig.minWeight = jObj["result"]["common"]["weight"]["min"].ParseToInt(); - cateSizeWeightConfig.maxWeight = jObj["result"]["common"]["weight"]["max"].ParseToInt(); - lstCateSizeWeightConfig.Add(cateSizeWeightConfig); + try + { + JObject jObj = JObject.Parse(html); + cateSizeWeightConfig = new CateSizeWeightConfig() { catId = catId.ToString() }; + if (html.Contains("common")) + { + cateSizeWeightConfig.minLen = jObj["result"]["common"]["length"]["min"].ParseToInt(); + cateSizeWeightConfig.maxLen = jObj["result"]["common"]["length"]["max"].ParseToInt(); + cateSizeWeightConfig.minWidth = jObj["result"]["common"]["width"]["min"].ParseToInt(); + cateSizeWeightConfig.maxWidth = jObj["result"]["common"]["width"]["max"].ParseToInt(); + cateSizeWeightConfig.minHeight = jObj["result"]["common"]["height"]["min"].ParseToInt(); + cateSizeWeightConfig.maxHeight = jObj["result"]["common"]["height"]["max"].ParseToInt(); + cateSizeWeightConfig.minWeight = jObj["result"]["common"]["weight"]["min"].ParseToInt(); + cateSizeWeightConfig.maxWeight = jObj["result"]["common"]["weight"]["max"].ParseToInt(); + } + else + { + cateSizeWeightConfig.minLen = jObj["result"]["length"]["min"].ParseToInt(); + cateSizeWeightConfig.maxLen = jObj["result"]["length"]["max"].ParseToInt(); + cateSizeWeightConfig.minWidth = jObj["result"]["width"]["min"].ParseToInt(); + cateSizeWeightConfig.maxWidth = jObj["result"]["width"]["max"].ParseToInt(); + cateSizeWeightConfig.minHeight = jObj["result"]["height"]["min"].ParseToInt(); + cateSizeWeightConfig.maxHeight = jObj["result"]["height"]["max"].ParseToInt(); + cateSizeWeightConfig.minWeight = jObj["result"]["weight"]["min"].ParseToInt(); + cateSizeWeightConfig.maxWeight = jObj["result"]["weight"]["max"].ParseToInt(); + } + lstCateSizeWeightConfig.Add(cateSizeWeightConfig); - var url = BaseClass.BuildObjString("product/add_cate_size_weight_config"); - var data = UserLogin.GetSignaturex(); - data += "&cat_id=" + catId; - data += "&minLen=" + cateSizeWeightConfig.minLen; - data += "&maxLen=" + cateSizeWeightConfig.maxLen; - data += "&minWidth=" + cateSizeWeightConfig.minWidth; - data += "&maxWidth=" + cateSizeWeightConfig.maxWidth; - data += "&minHeight=" + cateSizeWeightConfig.minHeight; - data += "&maxHeight=" + cateSizeWeightConfig.maxHeight; - data += "&minWeight=" + cateSizeWeightConfig.minWeight; - data += "&maxWeight=" + cateSizeWeightConfig.maxWeight; - html = GetHtml.PostUtf8(url, data); + var url = BaseClass.BuildObjString("product/add_cate_size_weight_config_v2"); + var data = UserLogin.GetSignaturex(); + data += "&cat_id=" + catId; + data += "&minLen=" + cateSizeWeightConfig.minLen; + data += "&maxLen=" + cateSizeWeightConfig.maxLen; + data += "&minWidth=" + cateSizeWeightConfig.minWidth; + data += "&maxWidth=" + cateSizeWeightConfig.maxWidth; + data += "&minHeight=" + cateSizeWeightConfig.minHeight; + data += "&maxHeight=" + cateSizeWeightConfig.maxHeight; + data += "&minWeight=" + cateSizeWeightConfig.minWeight; + data += "&maxWeight=" + cateSizeWeightConfig.maxWeight; + html = GetHtml.PostUtf8(url, data); + } + catch { } } else { @@ -1942,16 +1993,18 @@ namespace TemuKJD.KJDForms.AdminForms } } - // 设置长宽高 - if (len < cateSizeWeightConfig.minLen) len = cateSizeWeightConfig.minLen; - if (len > cateSizeWeightConfig.maxLen) len = cateSizeWeightConfig.maxLen; - if (width < cateSizeWeightConfig.minWidth) width = cateSizeWeightConfig.minWidth; - if (width > cateSizeWeightConfig.maxWidth) width = cateSizeWeightConfig.maxWidth; - if (height < cateSizeWeightConfig.minHeight) height = cateSizeWeightConfig.minHeight; - if (height > cateSizeWeightConfig.maxHeight) height = cateSizeWeightConfig.maxHeight; - if (weight < cateSizeWeightConfig.minWeight) weight = cateSizeWeightConfig.minWeight; - if (weight > cateSizeWeightConfig.maxWeight) weight = cateSizeWeightConfig.maxWeight; - + if (cateSizeWeightConfig != null) + { + // 设置长宽高 + if (len < cateSizeWeightConfig.minLen) len = cateSizeWeightConfig.minLen; + if (len > cateSizeWeightConfig.maxLen) len = cateSizeWeightConfig.maxLen; + if (width < cateSizeWeightConfig.minWidth) width = cateSizeWeightConfig.minWidth; + if (width > cateSizeWeightConfig.maxWidth) width = cateSizeWeightConfig.maxWidth; + if (height < cateSizeWeightConfig.minHeight) height = cateSizeWeightConfig.minHeight; + if (height > cateSizeWeightConfig.maxHeight) height = cateSizeWeightConfig.maxHeight; + if (weight < cateSizeWeightConfig.minWeight) weight = cateSizeWeightConfig.minWeight; + if (weight > cateSizeWeightConfig.maxWeight) weight = cateSizeWeightConfig.maxWeight; + } //JObject jPost = new JObject(); //jPost.Add("productId", price.productId); diff --git a/TEMUKJD/KJDForms/JITForms/JITForm.Designer.cs b/TEMUKJD/KJDForms/JITForms/JITForm.Designer.cs index 6594038..6711bc2 100644 --- a/TEMUKJD/KJDForms/JITForms/JITForm.Designer.cs +++ b/TEMUKJD/KJDForms/JITForms/JITForm.Designer.cs @@ -29,17 +29,19 @@ namespace TemuKJD.KJDForms.JITForms /// private void InitializeComponent() { - System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("JIT卡密激活"); - System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("JIT商品选品"); - System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("JIT商品上传"); - System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("JIT商品核价"); - System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("开通JIT"); - System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("JIT", new System.Windows.Forms.TreeNode[] { - treeNode1, - treeNode2, - treeNode3, - treeNode4, - treeNode5}); + System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("JIT卡密激活"); + System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("JIT商品选品"); + System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("JIT商品上传"); + System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("JIT商品核价"); + System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("开通JIT"); + System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("JIT推单"); + System.Windows.Forms.TreeNode treeNode14 = new System.Windows.Forms.TreeNode("JIT", new System.Windows.Forms.TreeNode[] { + treeNode8, + treeNode9, + treeNode10, + treeNode11, + treeNode12, + treeNode13}); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.tv = new TemuKJD.UserComponent.UcTreeView(); this.panel1 = new System.Windows.Forms.Panel(); @@ -92,20 +94,22 @@ namespace TemuKJD.KJDForms.JITForms this.tv.Location = new System.Drawing.Point(0, 0); this.tv.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.tv.Name = "tv"; - treeNode1.Name = "JIT卡密激活"; - treeNode1.Text = "JIT卡密激活"; - treeNode2.Name = "JIT商品选品"; - treeNode2.Text = "JIT商品选品"; - treeNode3.Name = "JIT商品上传"; - treeNode3.Text = "JIT商品上传"; - treeNode4.Name = "JIT商品核价"; - treeNode4.Text = "JIT商品核价"; - treeNode5.Name = "开通JIT"; - treeNode5.Text = "开通JIT"; - treeNode6.Name = "JIT"; - treeNode6.Text = "JIT"; + treeNode8.Name = "JIT卡密激活"; + treeNode8.Text = "JIT卡密激活"; + treeNode9.Name = "JIT商品选品"; + treeNode9.Text = "JIT商品选品"; + treeNode10.Name = "JIT商品上传"; + treeNode10.Text = "JIT商品上传"; + treeNode11.Name = "JIT商品核价"; + treeNode11.Text = "JIT商品核价"; + treeNode12.Name = "开通JIT"; + treeNode12.Text = "开通JIT"; + treeNode13.Name = "JIT推单"; + treeNode13.Text = "JIT推单"; + treeNode14.Name = "JIT"; + treeNode14.Text = "JIT"; this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { - treeNode6}); + treeNode14}); this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); this.tv.Size = new System.Drawing.Size(140, 450); this.tv.TabIndex = 4; diff --git a/TEMUKJD/KJDForms/JITForms/JITForm.cs b/TEMUKJD/KJDForms/JITForms/JITForm.cs index e74288d..6034ace 100644 --- a/TEMUKJD/KJDForms/JITForms/JITForm.cs +++ b/TEMUKJD/KJDForms/JITForms/JITForm.cs @@ -21,6 +21,7 @@ namespace TemuKJD.KJDForms.JITForms public Lazy dDbProductSelectListManageForm = new Lazy(); // jit商品上传 public Lazy productPriceCheckForm = new Lazy(); // jit商品核价 public Lazy temuJitForm = new Lazy(); + public Lazy jitPushOrder = new Lazy(); public JITForm() { InitializeComponent(); @@ -30,7 +31,7 @@ namespace TemuKJD.KJDForms.JITForms tv.SelectedNode = tv.Nodes[0].Nodes[0]; tv.ExpandGroup(tv.Nodes[0].Name); - List hideName = new List() { "请在列表中填写要隐藏的Tab页面" }; + List hideName = new List() { "请在列表中填写要隐藏的Tab页面", "JIT推单" }; foreach (var item in hideName) { @@ -69,6 +70,10 @@ namespace TemuKJD.KJDForms.JITForms temuJitForm.Value.IsClientJit = true; SetForm(temuJitForm.Value); break; + case "JIT推单": + jitPushOrder.Value.IsClientJit = true; + SetForm(jitPushOrder.Value); + break; } } diff --git a/TEMUKJD/KJDForms/JITForms/JitPushOrder.Designer.cs b/TEMUKJD/KJDForms/JITForms/JitPushOrder.Designer.cs new file mode 100644 index 0000000..8e62e24 --- /dev/null +++ b/TEMUKJD/KJDForms/JITForms/JitPushOrder.Designer.cs @@ -0,0 +1,1590 @@ + +namespace TemuKJD.KJDForms.JITForms +{ + partial class JitPushOrder + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle35 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle36 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle40 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle41 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle42 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle43 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle44 = new System.Windows.Forms.DataGridViewCellStyle(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.lblNextGetTime = new System.Windows.Forms.Label(); + this.btnFilter = new DevComponents.DotNetBar.PanelEx(); + this.txtSkcId = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.line2 = new DevComponents.DotNetBar.Controls.Line(); + this.line3 = new DevComponents.DotNetBar.Controls.Line(); + this.line1 = new DevComponents.DotNetBar.Controls.Line(); + this.btnStop = new DevComponents.DotNetBar.PanelEx(); + this.btnResetExtCode = new DevComponents.DotNetBar.PanelEx(); + this.txtExtCode = new System.Windows.Forms.TextBox(); + this.label12 = new System.Windows.Forms.Label(); + this.dtpEndTime = new System.Windows.Forms.DateTimePicker(); + this.dtpStartTime = new System.Windows.Forms.DateTimePicker(); + this.btnSearchOrder = new DevComponents.DotNetBar.PanelEx(); + this.txtSpuId = new System.Windows.Forms.TextBox(); + this.label7 = new System.Windows.Forms.Label(); + this.btnEmpty = new DevComponents.DotNetBar.PanelEx(); + this.label5 = new System.Windows.Forms.Label(); + this.txtNotes = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx(); + this.txtShopName = new System.Windows.Forms.TextBox(); + this.txtShopId = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.chkSearchTime = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.splitContainer3 = new System.Windows.Forms.SplitContainer(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.pbShopLoading = new System.Windows.Forms.PictureBox(); + this.chkSearchAllShop = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx(); + this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colUser = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colJitStatus = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.pbLoading = new System.Windows.Forms.PictureBox(); + this.dgvStock = new TemuKJD.UserComponent.DataGridViewEx(); + this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colIndexId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSupplierName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSupplierInfo = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSubOrderSn = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colSubOrderSnInfo = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colProductSkcPic = new System.Windows.Forms.DataGridViewImageColumn(); + this.colParentStockId = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colProductId = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colUpProuctId = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colProdSkc = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colProdName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colProductSn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colProdInfo = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSkuImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSkuImg = new System.Windows.Forms.DataGridViewImageColumn(); + this.colSkuInfo = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colCost = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colPrcie = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colStockUpNum = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colCreateTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colUploadCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colUploadOrder = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.splitContainer4 = new System.Windows.Forms.SplitContainer(); + this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); + this.btnClear = new DevComponents.DotNetBar.PanelEx(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + this.btnRestoreSizeAndNumber = new DevComponents.DotNetBar.PanelEx(); + this.numJudgeWeight = new System.Windows.Forms.NumericUpDown(); + this.numJudgeLen = new System.Windows.Forms.NumericUpDown(); + this.lblJudgeLen = new System.Windows.Forms.Label(); + this.lblJudgeWeight = new System.Windows.Forms.Label(); + this.chkFilterSize = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.pnlRestoreSizeAndNumber = new System.Windows.Forms.Panel(); + this.numPieces = new System.Windows.Forms.NumericUpDown(); + this.label11 = new System.Windows.Forms.Label(); + this.label17 = new System.Windows.Forms.Label(); + this.numHeight2 = new System.Windows.Forms.NumericUpDown(); + this.numHeight1 = new System.Windows.Forms.NumericUpDown(); + this.numWidth1 = new System.Windows.Forms.NumericUpDown(); + this.numWidth2 = new System.Windows.Forms.NumericUpDown(); + this.numLen1 = new System.Windows.Forms.NumericUpDown(); + this.numWeight2 = new System.Windows.Forms.NumericUpDown(); + this.numWeight1 = new System.Windows.Forms.NumericUpDown(); + this.numLen2 = new System.Windows.Forms.NumericUpDown(); + this.label15 = new System.Windows.Forms.Label(); + this.label18 = new System.Windows.Forms.Label(); + this.label19 = new System.Windows.Forms.Label(); + this.label20 = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.ucGroupBoxEx1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); + this.splitContainer3.Panel1.SuspendLayout(); + this.splitContainer3.Panel2.SuspendLayout(); + this.splitContainer3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvStock)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit(); + this.splitContainer4.Panel1.SuspendLayout(); + this.splitContainer4.Panel2.SuspendLayout(); + this.splitContainer4.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numJudgeWeight)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numJudgeLen)).BeginInit(); + this.pnlRestoreSizeAndNumber.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numPieces)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numHeight2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numHeight1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numWidth1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numWidth2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numLen1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numWeight2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numWeight1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numLen2)).BeginInit(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.BackColor = System.Drawing.Color.White; + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.splitContainer3); + this.splitContainer1.Size = new System.Drawing.Size(1469, 611); + this.splitContainer1.SplitterDistance = 140; + this.splitContainer1.TabIndex = 13; + // + // ucGroupBoxEx1 + // + this.ucGroupBoxEx1.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.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.ucGroupBoxEx1.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx1.Controls.Add(this.lblNextGetTime); + this.ucGroupBoxEx1.Controls.Add(this.btnFilter); + this.ucGroupBoxEx1.Controls.Add(this.txtSkcId); + this.ucGroupBoxEx1.Controls.Add(this.label1); + this.ucGroupBoxEx1.Controls.Add(this.line2); + this.ucGroupBoxEx1.Controls.Add(this.line3); + this.ucGroupBoxEx1.Controls.Add(this.line1); + this.ucGroupBoxEx1.Controls.Add(this.btnStop); + this.ucGroupBoxEx1.Controls.Add(this.btnResetExtCode); + this.ucGroupBoxEx1.Controls.Add(this.txtExtCode); + this.ucGroupBoxEx1.Controls.Add(this.label12); + this.ucGroupBoxEx1.Controls.Add(this.dtpEndTime); + this.ucGroupBoxEx1.Controls.Add(this.dtpStartTime); + this.ucGroupBoxEx1.Controls.Add(this.btnSearchOrder); + this.ucGroupBoxEx1.Controls.Add(this.txtSpuId); + this.ucGroupBoxEx1.Controls.Add(this.label7); + this.ucGroupBoxEx1.Controls.Add(this.btnEmpty); + this.ucGroupBoxEx1.Controls.Add(this.label5); + this.ucGroupBoxEx1.Controls.Add(this.txtNotes); + this.ucGroupBoxEx1.Controls.Add(this.label4); + this.ucGroupBoxEx1.Controls.Add(this.btnRefreshShop); + this.ucGroupBoxEx1.Controls.Add(this.txtShopName); + this.ucGroupBoxEx1.Controls.Add(this.txtShopId); + this.ucGroupBoxEx1.Controls.Add(this.label2); + this.ucGroupBoxEx1.Controls.Add(this.label3); + this.ucGroupBoxEx1.Controls.Add(this.chkSearchTime); + this.ucGroupBoxEx1.Location = new System.Drawing.Point(2, 2); + this.ucGroupBoxEx1.Name = "ucGroupBoxEx1"; + this.ucGroupBoxEx1.Size = new System.Drawing.Size(1465, 140); + this.ucGroupBoxEx1.TabIndex = 399; + this.ucGroupBoxEx1.TabStop = false; + this.ucGroupBoxEx1.Text = "参数设置"; + // + // lblNextGetTime + // + this.lblNextGetTime.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.lblNextGetTime.Location = new System.Drawing.Point(563, 53); + this.lblNextGetTime.Name = "lblNextGetTime"; + this.lblNextGetTime.Size = new System.Drawing.Size(201, 72); + this.lblNextGetTime.TabIndex = 1291; + this.lblNextGetTime.Text = "这里显示距离下次读取订单剩余时间间隔数字"; + // + // btnFilter + // + this.btnFilter.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnFilter.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnFilter.DisabledBackColor = System.Drawing.Color.Empty; + this.btnFilter.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnFilter.Location = new System.Drawing.Point(952, 111); + this.btnFilter.Name = "btnFilter"; + this.btnFilter.Size = new System.Drawing.Size(110, 23); + this.btnFilter.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnFilter.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnFilter.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnFilter.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnFilter.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnFilter.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnFilter.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnFilter.Style.GradientAngle = 90; + this.btnFilter.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnFilter.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnFilter.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnFilter.TabIndex = 1290; + this.btnFilter.Text = "筛选显示订单"; + // + // txtSkcId + // + this.txtSkcId.Location = new System.Drawing.Point(841, 39); + this.txtSkcId.Name = "txtSkcId"; + this.txtSkcId.Size = new System.Drawing.Size(221, 23); + this.txtSkcId.TabIndex = 1285; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(797, 41); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(52, 17); + this.label1.TabIndex = 1286; + this.label1.Text = "SkcId:"; + // + // line2 + // + this.line2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.line2.Location = new System.Drawing.Point(780, 21); + this.line2.Name = "line2"; + this.line2.Size = new System.Drawing.Size(11, 104); + this.line2.TabIndex = 1284; + this.line2.Text = "line2"; + this.line2.VerticalLine = true; + // + // line3 + // + this.line3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.line3.Location = new System.Drawing.Point(263, 21); + this.line3.Name = "line3"; + this.line3.Size = new System.Drawing.Size(11, 104); + this.line3.TabIndex = 1265; + this.line3.Text = "line3"; + this.line3.VerticalLine = true; + // + // line1 + // + this.line1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.line1.Location = new System.Drawing.Point(534, 21); + this.line1.Name = "line1"; + this.line1.Size = new System.Drawing.Size(11, 104); + this.line1.TabIndex = 1263; + this.line1.Text = "line1"; + this.line1.VerticalLine = true; + // + // btnStop + // + this.btnStop.CanvasColor = System.Drawing.SystemColors.Control; + this.btnStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnStop.DisabledBackColor = System.Drawing.Color.Empty; + this.btnStop.Location = new System.Drawing.Point(565, 24); + this.btnStop.Name = "btnStop"; + this.btnStop.Size = new System.Drawing.Size(45, 23); + this.btnStop.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnStop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnStop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnStop.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnStop.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnStop.Style.GradientAngle = 90; + this.btnStop.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnStop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnStop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnStop.TabIndex = 999; + this.btnStop.Text = "停止"; + this.btnStop.Click += new System.EventHandler(this.btnStop_Click); + // + // btnResetExtCode + // + this.btnResetExtCode.CanvasColor = System.Drawing.SystemColors.Control; + this.btnResetExtCode.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnResetExtCode.DisabledBackColor = System.Drawing.Color.Empty; + this.btnResetExtCode.Location = new System.Drawing.Point(1030, 63); + this.btnResetExtCode.Name = "btnResetExtCode"; + this.btnResetExtCode.Size = new System.Drawing.Size(32, 23); + this.btnResetExtCode.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnResetExtCode.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnResetExtCode.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnResetExtCode.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnResetExtCode.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnResetExtCode.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnResetExtCode.Style.GradientAngle = 90; + this.btnResetExtCode.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnResetExtCode.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnResetExtCode.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnResetExtCode.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnResetExtCode.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnResetExtCode.TabIndex = 1005; + this.btnResetExtCode.Text = "重置"; + // + // txtExtCode + // + this.txtExtCode.Location = new System.Drawing.Point(841, 63); + this.txtExtCode.Name = "txtExtCode"; + this.txtExtCode.Size = new System.Drawing.Size(187, 23); + this.txtExtCode.TabIndex = 1003; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(807, 66); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(44, 17); + this.label12.TabIndex = 1004; + this.label12.Text = "货号:"; + // + // dtpEndTime + // + this.dtpEndTime.Location = new System.Drawing.Point(952, 87); + this.dtpEndTime.Name = "dtpEndTime"; + this.dtpEndTime.Size = new System.Drawing.Size(110, 23); + this.dtpEndTime.TabIndex = 1001; + // + // dtpStartTime + // + this.dtpStartTime.Location = new System.Drawing.Point(841, 87); + this.dtpStartTime.Name = "dtpStartTime"; + this.dtpStartTime.Size = new System.Drawing.Size(110, 23); + this.dtpStartTime.TabIndex = 1000; + // + // btnSearchOrder + // + this.btnSearchOrder.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSearchOrder.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSearchOrder.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSearchOrder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSearchOrder.Location = new System.Drawing.Point(612, 24); + this.btnSearchOrder.Name = "btnSearchOrder"; + this.btnSearchOrder.Size = new System.Drawing.Size(147, 23); + this.btnSearchOrder.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearchOrder.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearchOrder.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearchOrder.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSearchOrder.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSearchOrder.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSearchOrder.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSearchOrder.Style.GradientAngle = 90; + this.btnSearchOrder.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearchOrder.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearchOrder.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearchOrder.TabIndex = 996; + this.btnSearchOrder.Text = "查询待发货订单"; + this.btnSearchOrder.Click += new System.EventHandler(this.btnSearchOrder_Click); + // + // txtSpuId + // + this.txtSpuId.Location = new System.Drawing.Point(841, 15); + this.txtSpuId.Name = "txtSpuId"; + this.txtSpuId.Size = new System.Drawing.Size(221, 23); + this.txtSpuId.TabIndex = 997; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(797, 17); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(54, 17); + this.label7.TabIndex = 998; + this.label7.Text = "SpuId:"; + // + // btnEmpty + // + this.btnEmpty.CanvasColor = System.Drawing.SystemColors.Control; + this.btnEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnEmpty.DisabledBackColor = System.Drawing.Color.Empty; + this.btnEmpty.Location = new System.Drawing.Point(214, 107); + this.btnEmpty.Name = "btnEmpty"; + this.btnEmpty.Size = new System.Drawing.Size(40, 23); + this.btnEmpty.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnEmpty.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnEmpty.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnEmpty.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnEmpty.Style.GradientAngle = 90; + this.btnEmpty.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnEmpty.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnEmpty.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnEmpty.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnEmpty.TabIndex = 697; + this.btnEmpty.Text = "重置"; + this.btnEmpty.Click += new System.EventHandler(this.btnEmpty_Click); + // + // label5 + // + this.label5.AutoSize = true; + this.label5.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.label5.Location = new System.Drawing.Point(12, 110); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(128, 17); + this.label5.TabIndex = 685; + this.label5.Text = "注:逗号分隔查询多店"; + // + // txtNotes + // + this.txtNotes.Location = new System.Drawing.Point(68, 77); + this.txtNotes.Name = "txtNotes"; + this.txtNotes.Size = new System.Drawing.Size(186, 23); + this.txtNotes.TabIndex = 382; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(11, 80); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(68, 17); + this.label4.TabIndex = 383; + this.label4.Text = "店铺分组:"; + // + // btnRefreshShop + // + this.btnRefreshShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnRefreshShop.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnRefreshShop.DisabledBackColor = System.Drawing.Color.Empty; + this.btnRefreshShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnRefreshShop.Location = new System.Drawing.Point(143, 107); + this.btnRefreshShop.Name = "btnRefreshShop"; + this.btnRefreshShop.Size = new System.Drawing.Size(65, 23); + this.btnRefreshShop.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnRefreshShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRefreshShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRefreshShop.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnRefreshShop.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnRefreshShop.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnRefreshShop.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnRefreshShop.Style.GradientAngle = 90; + this.btnRefreshShop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnRefreshShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnRefreshShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnRefreshShop.TabIndex = 431; + this.btnRefreshShop.Text = "查询/刷新"; + this.btnRefreshShop.Click += new System.EventHandler(this.btnRefreshShop_Click); + // + // txtShopName + // + this.txtShopName.Location = new System.Drawing.Point(68, 47); + this.txtShopName.Name = "txtShopName"; + this.txtShopName.Size = new System.Drawing.Size(186, 23); + this.txtShopName.TabIndex = 380; + // + // txtShopId + // + this.txtShopId.Location = new System.Drawing.Point(68, 17); + this.txtShopId.Name = "txtShopId"; + this.txtShopId.Size = new System.Drawing.Size(186, 23); + this.txtShopId.TabIndex = 378; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(22, 20); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(57, 17); + this.label2.TabIndex = 379; + this.label2.Text = "店铺ID:"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(11, 50); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(68, 17); + this.label3.TabIndex = 381; + this.label3.Text = "店铺名称:"; + // + // chkSearchTime + // + this.chkSearchTime.AutoSize = true; + this.chkSearchTime.Checked = true; + this.chkSearchTime.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkSearchTime.Location = new System.Drawing.Point(794, 88); + this.chkSearchTime.Name = "chkSearchTime"; + this.chkSearchTime.Size = new System.Drawing.Size(63, 21); + this.chkSearchTime.TabIndex = 1002; + this.chkSearchTime.Text = "日期:"; + this.chkSearchTime.UseVisualStyleBackColor = true; + // + // splitContainer3 + // + this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer3.Location = new System.Drawing.Point(0, 0); + this.splitContainer3.Name = "splitContainer3"; + this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer3.Panel1 + // + this.splitContainer3.Panel1.Controls.Add(this.splitContainer2); + // + // splitContainer3.Panel2 + // + this.splitContainer3.Panel2.Controls.Add(this.splitContainer4); + this.splitContainer3.Size = new System.Drawing.Size(1469, 467); + this.splitContainer3.SplitterDistance = 437; + this.splitContainer3.TabIndex = 1; + // + // splitContainer2 + // + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.pbShopLoading); + this.splitContainer2.Panel1.Controls.Add(this.chkSearchAllShop); + this.splitContainer2.Panel1.Controls.Add(this.dgvShop); + this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.btnRestoreSizeAndNumber); + this.splitContainer2.Panel2.Controls.Add(this.numJudgeWeight); + this.splitContainer2.Panel2.Controls.Add(this.numJudgeLen); + this.splitContainer2.Panel2.Controls.Add(this.lblJudgeLen); + this.splitContainer2.Panel2.Controls.Add(this.lblJudgeWeight); + this.splitContainer2.Panel2.Controls.Add(this.chkFilterSize); + this.splitContainer2.Panel2.Controls.Add(this.pnlRestoreSizeAndNumber); + this.splitContainer2.Panel2.Controls.Add(this.pbLoading); + this.splitContainer2.Panel2.Controls.Add(this.dgvStock); + this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0); + this.splitContainer2.Size = new System.Drawing.Size(1469, 437); + this.splitContainer2.SplitterDistance = 325; + this.splitContainer2.TabIndex = 0; + // + // pbShopLoading + // + this.pbShopLoading.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pbShopLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; + this.pbShopLoading.Location = new System.Drawing.Point(137, 193); + this.pbShopLoading.Name = "pbShopLoading"; + this.pbShopLoading.Size = new System.Drawing.Size(50, 50); + this.pbShopLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbShopLoading.TabIndex = 676; + this.pbShopLoading.TabStop = false; + this.pbShopLoading.Visible = false; + // + // chkSearchAllShop + // + this.chkSearchAllShop.AutoSize = true; + this.chkSearchAllShop.Location = new System.Drawing.Point(22, 43); + this.chkSearchAllShop.Name = "chkSearchAllShop"; + this.chkSearchAllShop.Size = new System.Drawing.Size(147, 21); + this.chkSearchAllShop.TabIndex = 710; + this.chkSearchAllShop.Text = "二级超管查询所有店铺"; + this.chkSearchAllShop.UseVisualStyleBackColor = true; + this.chkSearchAllShop.Visible = false; + // + // dgvShop + // + this.dgvShop.AllowUserToAddRows = false; + this.dgvShop.AllowUserToDeleteRows = false; + dataGridViewCellStyle34.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle34; + 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))))); + dataGridViewCellStyle35.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle35.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle35.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle35.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle35.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle35.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle35.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle35; + this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colSelect, + this.colUser, + this.colLoginName, + this.colShopId, + this.colShopName, + this.colShopNotes, + this.colLoginStatus, + this.colJitStatus, + this.colCanUse, + this.colMessage}); + this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvShop.Location = new System.Drawing.Point(4, 0); + this.dgvShop.Name = "dgvShop"; + this.dgvShop.ReadOnly = true; + this.dgvShop.RowHeadersWidth = 25; + this.dgvShop.RowTemplate.Height = 23; + this.dgvShop.Size = new System.Drawing.Size(321, 437); + this.dgvShop.TabIndex = 6; + this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); + // + // colSelect + // + this.colSelect.HeaderText = "全选"; + this.colSelect.Name = "colSelect"; + this.colSelect.ReadOnly = true; + this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSelect.Width = 28; + // + // colUser + // + this.colUser.HeaderText = "店铺账户"; + this.colUser.Name = "colUser"; + this.colUser.ReadOnly = true; + this.colUser.Visible = false; + // + // colLoginName + // + this.colLoginName.HeaderText = "店铺登录名"; + this.colLoginName.Name = "colLoginName"; + this.colLoginName.ReadOnly = true; + this.colLoginName.Visible = false; + // + // colShopId + // + this.colShopId.HeaderText = "店铺Id"; + this.colShopId.Name = "colShopId"; + this.colShopId.ReadOnly = true; + this.colShopId.Visible = false; + this.colShopId.Width = 55; + // + // colShopName + // + this.colShopName.HeaderText = "店铺名称"; + this.colShopName.Name = "colShopName"; + this.colShopName.ReadOnly = true; + this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colShopName.Width = 70; + // + // colShopNotes + // + this.colShopNotes.HeaderText = "分组"; + this.colShopNotes.Name = "colShopNotes"; + this.colShopNotes.ReadOnly = true; + this.colShopNotes.Width = 70; + // + // colLoginStatus + // + this.colLoginStatus.HeaderText = "状态"; + this.colLoginStatus.Name = "colLoginStatus"; + this.colLoginStatus.ReadOnly = true; + this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colLoginStatus.Width = 38; + // + // colJitStatus + // + this.colJitStatus.HeaderText = "JIT"; + this.colJitStatus.Name = "colJitStatus"; + this.colJitStatus.ReadOnly = true; + this.colJitStatus.Width = 38; + // + // colCanUse + // + this.colCanUse.HeaderText = "可用"; + this.colCanUse.Name = "colCanUse"; + this.colCanUse.ReadOnly = true; + this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colCanUse.Visible = false; + this.colCanUse.Width = 28; + // + // colMessage + // + this.colMessage.HeaderText = "消息"; + this.colMessage.Name = "colMessage"; + this.colMessage.ReadOnly = true; + // + // pbLoading + // + this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; + this.pbLoading.Location = new System.Drawing.Point(529, 193); + this.pbLoading.Name = "pbLoading"; + this.pbLoading.Size = new System.Drawing.Size(50, 50); + this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbLoading.TabIndex = 675; + this.pbLoading.TabStop = false; + this.pbLoading.Visible = false; + // + // dgvStock + // + this.dgvStock.AllowUserToAddRows = false; + this.dgvStock.AllowUserToDeleteRows = false; + dataGridViewCellStyle36.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvStock.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle36; + this.dgvStock.AutoRowNumber = true; + this.dgvStock.BackgroundColor = System.Drawing.Color.White; + this.dgvStock.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + dataGridViewCellStyle37.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle37.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle37.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle37.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle37.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle37.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle37.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvStock.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle37; + this.dgvStock.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvStock.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colCheck, + this.colIndexId, + this.colSupplierId, + this.colSupplierName, + this.colSupplierInfo, + this.colSubOrderSn, + this.colSubOrderSnInfo, + this.colImgUrl, + this.colProductSkcPic, + this.colParentStockId, + this.colProductId, + this.colUpProuctId, + this.colProdSkc, + this.colProdName, + this.colProductSn, + this.colProdInfo, + this.colSkuImgUrl, + this.colSkuImg, + this.colSkuInfo, + this.colCost, + this.colPrcie, + this.colStockUpNum, + this.colCreateTime, + this.colUploadCode, + this.colUploadOrder, + this.colMsg}); + this.dgvStock.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvStock.Location = new System.Drawing.Point(0, 0); + this.dgvStock.Name = "dgvStock"; + this.dgvStock.ReadOnly = true; + this.dgvStock.RowTemplate.Height = 23; + this.dgvStock.Size = new System.Drawing.Size(1136, 437); + this.dgvStock.TabIndex = 676; + // + // colCheck + // + this.colCheck.HeaderText = "选择"; + this.colCheck.Name = "colCheck"; + this.colCheck.ReadOnly = true; + this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCheck.Width = 30; + // + // colIndexId + // + this.colIndexId.HeaderText = "编号"; + this.colIndexId.Name = "colIndexId"; + this.colIndexId.ReadOnly = true; + this.colIndexId.Visible = false; + // + // colSupplierId + // + this.colSupplierId.HeaderText = "店铺Id"; + this.colSupplierId.Name = "colSupplierId"; + this.colSupplierId.ReadOnly = true; + this.colSupplierId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.colSupplierId.Visible = false; + // + // colSupplierName + // + this.colSupplierName.HeaderText = "店铺名称"; + this.colSupplierName.Name = "colSupplierName"; + this.colSupplierName.ReadOnly = true; + this.colSupplierName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.colSupplierName.Visible = false; + // + // colSupplierInfo + // + dataGridViewCellStyle38.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colSupplierInfo.DefaultCellStyle = dataGridViewCellStyle38; + this.colSupplierInfo.HeaderText = "店铺信息"; + this.colSupplierInfo.Name = "colSupplierInfo"; + this.colSupplierInfo.ReadOnly = true; + this.colSupplierInfo.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.colSupplierInfo.Width = 120; + // + // colSubOrderSn + // + this.colSubOrderSn.HeaderText = "备货单号"; + this.colSubOrderSn.Name = "colSubOrderSn"; + this.colSubOrderSn.ReadOnly = true; + this.colSubOrderSn.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSubOrderSn.Visible = false; + this.colSubOrderSn.Width = 120; + // + // colSubOrderSnInfo + // + dataGridViewCellStyle39.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colSubOrderSnInfo.DefaultCellStyle = dataGridViewCellStyle39; + this.colSubOrderSnInfo.HeaderText = "备货单号信息"; + this.colSubOrderSnInfo.Name = "colSubOrderSnInfo"; + this.colSubOrderSnInfo.ReadOnly = true; + this.colSubOrderSnInfo.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.colSubOrderSnInfo.Width = 150; + // + // colImgUrl + // + this.colImgUrl.HeaderText = "SKC图片路径"; + this.colImgUrl.Name = "colImgUrl"; + this.colImgUrl.ReadOnly = true; + this.colImgUrl.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.colImgUrl.Visible = false; + // + // colProductSkcPic + // + this.colProductSkcPic.HeaderText = "SKC图"; + this.colProductSkcPic.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; + this.colProductSkcPic.Name = "colProductSkcPic"; + this.colProductSkcPic.ReadOnly = true; + this.colProductSkcPic.Width = 60; + // + // colParentStockId + // + this.colParentStockId.HeaderText = "备货母单号"; + this.colParentStockId.Name = "colParentStockId"; + this.colParentStockId.ReadOnly = true; + this.colParentStockId.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colParentStockId.Visible = false; + this.colParentStockId.Width = 200; + // + // colProductId + // + this.colProductId.HeaderText = "商品ID"; + this.colProductId.Name = "colProductId"; + this.colProductId.ReadOnly = true; + this.colProductId.Visible = false; + this.colProductId.Width = 90; + // + // colUpProuctId + // + this.colUpProuctId.HeaderText = "上家商品ID"; + this.colUpProuctId.Name = "colUpProuctId"; + this.colUpProuctId.ReadOnly = true; + this.colUpProuctId.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colUpProuctId.Visible = false; + // + // colProdSkc + // + this.colProdSkc.FillWeight = 150F; + this.colProdSkc.HeaderText = "商品SKC"; + this.colProdSkc.Name = "colProdSkc"; + this.colProdSkc.ReadOnly = true; + this.colProdSkc.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colProdSkc.Visible = false; + this.colProdSkc.Width = 90; + // + // colProdName + // + dataGridViewCellStyle40.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProdName.DefaultCellStyle = dataGridViewCellStyle40; + this.colProdName.HeaderText = "标题"; + this.colProdName.Name = "colProdName"; + this.colProdName.ReadOnly = true; + this.colProdName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.colProdName.Visible = false; + this.colProdName.Width = 150; + // + // colProductSn + // + this.colProductSn.HeaderText = "货号"; + this.colProductSn.Name = "colProductSn"; + this.colProductSn.ReadOnly = true; + this.colProductSn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.colProductSn.Visible = false; + // + // colProdInfo + // + dataGridViewCellStyle41.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProdInfo.DefaultCellStyle = dataGridViewCellStyle41; + this.colProdInfo.HeaderText = "商品信息"; + this.colProdInfo.Name = "colProdInfo"; + this.colProdInfo.ReadOnly = true; + this.colProdInfo.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.colProdInfo.Width = 200; + // + // colSkuImgUrl + // + this.colSkuImgUrl.HeaderText = "SKU图片路径"; + this.colSkuImgUrl.Name = "colSkuImgUrl"; + this.colSkuImgUrl.ReadOnly = true; + this.colSkuImgUrl.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.colSkuImgUrl.Visible = false; + this.colSkuImgUrl.Width = 60; + // + // colSkuImg + // + this.colSkuImg.HeaderText = "SKU图"; + this.colSkuImg.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; + this.colSkuImg.Name = "colSkuImg"; + this.colSkuImg.ReadOnly = true; + this.colSkuImg.Width = 60; + // + // colSkuInfo + // + dataGridViewCellStyle42.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colSkuInfo.DefaultCellStyle = dataGridViewCellStyle42; + this.colSkuInfo.HeaderText = "SKU信息"; + this.colSkuInfo.Name = "colSkuInfo"; + this.colSkuInfo.ReadOnly = true; + this.colSkuInfo.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.colSkuInfo.Width = 120; + // + // colCost + // + dataGridViewCellStyle43.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colCost.DefaultCellStyle = dataGridViewCellStyle43; + this.colCost.HeaderText = "成本"; + this.colCost.Name = "colCost"; + this.colCost.ReadOnly = true; + this.colCost.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.colCost.Width = 80; + // + // colPrcie + // + this.colPrcie.HeaderText = "申报价格"; + this.colPrcie.Name = "colPrcie"; + this.colPrcie.ReadOnly = true; + this.colPrcie.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.colPrcie.Width = 65; + // + // colStockUpNum + // + this.colStockUpNum.HeaderText = "备货件数"; + this.colStockUpNum.Name = "colStockUpNum"; + this.colStockUpNum.ReadOnly = true; + this.colStockUpNum.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.colStockUpNum.Width = 65; + // + // colCreateTime + // + dataGridViewCellStyle44.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colCreateTime.DefaultCellStyle = dataGridViewCellStyle44; + this.colCreateTime.HeaderText = "备货单创建时间"; + this.colCreateTime.Name = "colCreateTime"; + this.colCreateTime.ReadOnly = true; + this.colCreateTime.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + // + // colUploadCode + // + this.colUploadCode.HeaderText = "上传条码/箱唛"; + this.colUploadCode.Name = "colUploadCode"; + this.colUploadCode.ReadOnly = true; + this.colUploadCode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + // + // colUploadOrder + // + this.colUploadOrder.HeaderText = "上传订单"; + this.colUploadOrder.Name = "colUploadOrder"; + this.colUploadOrder.ReadOnly = true; + this.colUploadOrder.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.colUploadOrder.Width = 80; + // + // colMsg + // + this.colMsg.HeaderText = "操作信息"; + this.colMsg.Name = "colMsg"; + this.colMsg.ReadOnly = true; + this.colMsg.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.colMsg.Width = 300; + // + // splitContainer4 + // + this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer4.Location = new System.Drawing.Point(0, 0); + this.splitContainer4.Name = "splitContainer4"; + // + // splitContainer4.Panel1 + // + this.splitContainer4.Panel1.Controls.Add(this.ucSplitPage1); + // + // splitContainer4.Panel2 + // + this.splitContainer4.Panel2.Controls.Add(this.btnClear); + this.splitContainer4.Panel2.Controls.Add(this.statusBar); + this.splitContainer4.Size = new System.Drawing.Size(1469, 26); + this.splitContainer4.SplitterDistance = 321; + this.splitContainer4.TabIndex = 3; + // + // ucSplitPage1 + // + this.ucSplitPage1.CurrentPage = 1; + this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Left; + this.ucSplitPage1.IsShowPageSize = false; + this.ucSplitPage1.Location = new System.Drawing.Point(0, 0); + this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); + this.ucSplitPage1.Name = "ucSplitPage1"; + this.ucSplitPage1.PageSize = 50; + this.ucSplitPage1.Size = new System.Drawing.Size(321, 26); + this.ucSplitPage1.TabIndex = 5; + this.ucSplitPage1.TotalPage = 1; + // + // btnClear + // + this.btnClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnClear.DisabledBackColor = System.Drawing.Color.Empty; + this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnClear.Location = new System.Drawing.Point(1050, 0); + this.btnClear.Name = "btnClear"; + this.btnClear.Size = new System.Drawing.Size(90, 21); + this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.Style.GradientAngle = 90; + this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.TabIndex = 440; + this.btnClear.Text = "清空结果"; + this.btnClear.Visible = false; + // + // statusBar + // + this.statusBar.BackColor = System.Drawing.Color.White; + this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; + this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.statusBar.Location = new System.Drawing.Point(0, 0); + this.statusBar.Margin = new System.Windows.Forms.Padding(0); + this.statusBar.Name = "statusBar"; + this.statusBar.Size = new System.Drawing.Size(1144, 26); + this.statusBar.TabIndex = 2; + // + // btnRestoreSizeAndNumber + // + this.btnRestoreSizeAndNumber.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnRestoreSizeAndNumber.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnRestoreSizeAndNumber.DisabledBackColor = System.Drawing.Color.Empty; + this.btnRestoreSizeAndNumber.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnRestoreSizeAndNumber.Location = new System.Drawing.Point(194, 37); + this.btnRestoreSizeAndNumber.Name = "btnRestoreSizeAndNumber"; + this.btnRestoreSizeAndNumber.Size = new System.Drawing.Size(99, 23); + this.btnRestoreSizeAndNumber.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnRestoreSizeAndNumber.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRestoreSizeAndNumber.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRestoreSizeAndNumber.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnRestoreSizeAndNumber.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnRestoreSizeAndNumber.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnRestoreSizeAndNumber.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnRestoreSizeAndNumber.Style.GradientAngle = 90; + this.btnRestoreSizeAndNumber.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnRestoreSizeAndNumber.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnRestoreSizeAndNumber.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnRestoreSizeAndNumber.TabIndex = 1161; + this.btnRestoreSizeAndNumber.Text = "还原尺寸/数量"; + this.btnRestoreSizeAndNumber.Visible = false; + this.btnRestoreSizeAndNumber.Click += new System.EventHandler(this.btnRestoreSizeAndNumber_Click); + // + // numJudgeWeight + // + this.numJudgeWeight.Location = new System.Drawing.Point(140, 37); + this.numJudgeWeight.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numJudgeWeight.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.numJudgeWeight.Name = "numJudgeWeight"; + this.numJudgeWeight.Size = new System.Drawing.Size(50, 23); + this.numJudgeWeight.TabIndex = 1165; + this.numJudgeWeight.Value = new decimal(new int[] { + 150, + 0, + 0, + 0}); + this.numJudgeWeight.Visible = false; + // + // numJudgeLen + // + this.numJudgeLen.Location = new System.Drawing.Point(66, 37); + this.numJudgeLen.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numJudgeLen.Maximum = new decimal(new int[] { + 299, + 0, + 0, + 0}); + this.numJudgeLen.Name = "numJudgeLen"; + this.numJudgeLen.Size = new System.Drawing.Size(40, 23); + this.numJudgeLen.TabIndex = 1163; + this.numJudgeLen.Value = new decimal(new int[] { + 10, + 0, + 0, + 0}); + this.numJudgeLen.Visible = false; + // + // lblJudgeLen + // + this.lblJudgeLen.AutoSize = true; + this.lblJudgeLen.Location = new System.Drawing.Point(42, 40); + this.lblJudgeLen.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblJudgeLen.Name = "lblJudgeLen"; + this.lblJudgeLen.Size = new System.Drawing.Size(32, 17); + this.lblJudgeLen.TabIndex = 1162; + this.lblJudgeLen.Text = "长<"; + this.lblJudgeLen.Visible = false; + // + // lblJudgeWeight + // + this.lblJudgeWeight.AutoSize = true; + this.lblJudgeWeight.Location = new System.Drawing.Point(104, 40); + this.lblJudgeWeight.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblJudgeWeight.Name = "lblJudgeWeight"; + this.lblJudgeWeight.Size = new System.Drawing.Size(44, 17); + this.lblJudgeWeight.TabIndex = 1164; + this.lblJudgeWeight.Text = "且重<"; + this.lblJudgeWeight.Visible = false; + // + // chkFilterSize + // + this.chkFilterSize.AutoSize = true; + this.chkFilterSize.Location = new System.Drawing.Point(29, 41); + this.chkFilterSize.Name = "chkFilterSize"; + this.chkFilterSize.Size = new System.Drawing.Size(15, 14); + this.chkFilterSize.TabIndex = 1166; + this.chkFilterSize.UseVisualStyleBackColor = true; + this.chkFilterSize.Visible = false; + // + // pnlRestoreSizeAndNumber + // + this.pnlRestoreSizeAndNumber.Controls.Add(this.numPieces); + this.pnlRestoreSizeAndNumber.Controls.Add(this.label11); + this.pnlRestoreSizeAndNumber.Controls.Add(this.label17); + this.pnlRestoreSizeAndNumber.Controls.Add(this.numHeight2); + this.pnlRestoreSizeAndNumber.Controls.Add(this.numHeight1); + this.pnlRestoreSizeAndNumber.Controls.Add(this.numWidth1); + this.pnlRestoreSizeAndNumber.Controls.Add(this.numWidth2); + this.pnlRestoreSizeAndNumber.Controls.Add(this.numLen1); + this.pnlRestoreSizeAndNumber.Controls.Add(this.numWeight2); + this.pnlRestoreSizeAndNumber.Controls.Add(this.numWeight1); + this.pnlRestoreSizeAndNumber.Controls.Add(this.numLen2); + this.pnlRestoreSizeAndNumber.Controls.Add(this.label15); + this.pnlRestoreSizeAndNumber.Controls.Add(this.label18); + this.pnlRestoreSizeAndNumber.Controls.Add(this.label19); + this.pnlRestoreSizeAndNumber.Controls.Add(this.label20); + this.pnlRestoreSizeAndNumber.Location = new System.Drawing.Point(22, 62); + this.pnlRestoreSizeAndNumber.Name = "pnlRestoreSizeAndNumber"; + this.pnlRestoreSizeAndNumber.Size = new System.Drawing.Size(278, 58); + this.pnlRestoreSizeAndNumber.TabIndex = 1167; + this.pnlRestoreSizeAndNumber.Visible = false; + // + // numPieces + // + this.numPieces.Enabled = false; + this.numPieces.Location = new System.Drawing.Point(108, 3); + this.numPieces.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numPieces.Maximum = new decimal(new int[] { + 99999, + 0, + 0, + 0}); + this.numPieces.Name = "numPieces"; + this.numPieces.ReadOnly = true; + this.numPieces.Size = new System.Drawing.Size(41, 23); + this.numPieces.TabIndex = 1158; + this.numPieces.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(3, 6); + this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(80, 17); + this.label11.TabIndex = 1118; + this.label11.Text = "还原参数值:"; + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(80, 6); + this.label17.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(32, 17); + this.label17.TabIndex = 1159; + this.label17.Text = "数量"; + // + // numHeight2 + // + this.numHeight2.Location = new System.Drawing.Point(231, 31); + this.numHeight2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numHeight2.Maximum = new decimal(new int[] { + 299, + 0, + 0, + 0}); + this.numHeight2.Name = "numHeight2"; + this.numHeight2.Size = new System.Drawing.Size(40, 23); + this.numHeight2.TabIndex = 908; + this.numHeight2.Value = new decimal(new int[] { + 10, + 0, + 0, + 0}); + // + // numHeight1 + // + this.numHeight1.Location = new System.Drawing.Point(197, 31); + this.numHeight1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numHeight1.Maximum = new decimal(new int[] { + 299, + 0, + 0, + 0}); + this.numHeight1.Name = "numHeight1"; + this.numHeight1.Size = new System.Drawing.Size(35, 23); + this.numHeight1.TabIndex = 907; + this.numHeight1.Value = new decimal(new int[] { + 10, + 0, + 0, + 0}); + // + // numWidth1 + // + this.numWidth1.Location = new System.Drawing.Point(108, 31); + this.numWidth1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numWidth1.Maximum = new decimal(new int[] { + 299, + 0, + 0, + 0}); + this.numWidth1.Name = "numWidth1"; + this.numWidth1.Size = new System.Drawing.Size(35, 23); + this.numWidth1.TabIndex = 904; + this.numWidth1.Value = new decimal(new int[] { + 15, + 0, + 0, + 0}); + // + // numWidth2 + // + this.numWidth2.Location = new System.Drawing.Point(142, 31); + this.numWidth2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numWidth2.Maximum = new decimal(new int[] { + 299, + 0, + 0, + 0}); + this.numWidth2.Name = "numWidth2"; + this.numWidth2.Size = new System.Drawing.Size(40, 23); + this.numWidth2.TabIndex = 905; + this.numWidth2.Value = new decimal(new int[] { + 15, + 0, + 0, + 0}); + // + // numLen1 + // + this.numLen1.Location = new System.Drawing.Point(19, 31); + this.numLen1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numLen1.Maximum = new decimal(new int[] { + 299, + 0, + 0, + 0}); + this.numLen1.Name = "numLen1"; + this.numLen1.Size = new System.Drawing.Size(35, 23); + this.numLen1.TabIndex = 902; + this.numLen1.Value = new decimal(new int[] { + 25, + 0, + 0, + 0}); + // + // numWeight2 + // + this.numWeight2.Location = new System.Drawing.Point(221, 3); + this.numWeight2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numWeight2.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.numWeight2.Name = "numWeight2"; + this.numWeight2.Size = new System.Drawing.Size(50, 23); + this.numWeight2.TabIndex = 683; + this.numWeight2.Value = new decimal(new int[] { + 200, + 0, + 0, + 0}); + // + // numWeight1 + // + this.numWeight1.Location = new System.Drawing.Point(172, 3); + this.numWeight1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numWeight1.Maximum = new decimal(new int[] { + 99999, + 0, + 0, + 0}); + this.numWeight1.Name = "numWeight1"; + this.numWeight1.Size = new System.Drawing.Size(50, 23); + this.numWeight1.TabIndex = 682; + this.numWeight1.Value = new decimal(new int[] { + 200, + 0, + 0, + 0}); + // + // numLen2 + // + this.numLen2.Location = new System.Drawing.Point(53, 31); + this.numLen2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numLen2.Maximum = new decimal(new int[] { + 299, + 0, + 0, + 0}); + this.numLen2.Name = "numLen2"; + this.numLen2.Size = new System.Drawing.Size(40, 23); + this.numLen2.TabIndex = 903; + this.numLen2.Value = new decimal(new int[] { + 25, + 0, + 0, + 0}); + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(3, 34); + this.label15.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(20, 17); + this.label15.TabIndex = 901; + this.label15.Text = "长"; + // + // label18 + // + this.label18.AutoSize = true; + this.label18.Location = new System.Drawing.Point(92, 34); + this.label18.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(20, 17); + this.label18.TabIndex = 906; + this.label18.Text = "宽"; + // + // label19 + // + this.label19.AutoSize = true; + this.label19.Location = new System.Drawing.Point(181, 34); + this.label19.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(20, 17); + this.label19.TabIndex = 909; + this.label19.Text = "高"; + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Location = new System.Drawing.Point(155, 6); + this.label20.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(20, 17); + this.label20.TabIndex = 684; + this.label20.Text = "重"; + // + // JitPushOrder + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(1469, 611); + this.Controls.Add(this.splitContainer1); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Name = "JitPushOrder"; + this.Text = "JitPushOrder"; + this.Load += new System.EventHandler(this.JitPushOrder_Load); + this.VisibleChanged += new System.EventHandler(this.JitPushOrder_VisibleChanged); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.ucGroupBoxEx1.ResumeLayout(false); + this.ucGroupBoxEx1.PerformLayout(); + this.splitContainer3.Panel1.ResumeLayout(false); + this.splitContainer3.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit(); + this.splitContainer3.ResumeLayout(false); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel1.PerformLayout(); + this.splitContainer2.Panel2.ResumeLayout(false); + this.splitContainer2.Panel2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvStock)).EndInit(); + this.splitContainer4.Panel1.ResumeLayout(false); + this.splitContainer4.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit(); + this.splitContainer4.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.numJudgeWeight)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numJudgeLen)).EndInit(); + this.pnlRestoreSizeAndNumber.ResumeLayout(false); + this.pnlRestoreSizeAndNumber.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numPieces)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numHeight2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numHeight1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numWidth1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numWidth2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numLen1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numWeight2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numWeight1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numLen2)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private UserComponent.UcGroupBoxEx ucGroupBoxEx1; + private DevComponents.DotNetBar.Controls.Line line3; + private DevComponents.DotNetBar.Controls.Line line1; + private DevComponents.DotNetBar.PanelEx btnStop; + private DevComponents.DotNetBar.PanelEx btnResetExtCode; + private System.Windows.Forms.TextBox txtExtCode; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.DateTimePicker dtpEndTime; + private System.Windows.Forms.DateTimePicker dtpStartTime; + private DevComponents.DotNetBar.PanelEx btnSearchOrder; + private System.Windows.Forms.TextBox txtSpuId; + private System.Windows.Forms.Label label7; + private DevComponents.DotNetBar.PanelEx btnEmpty; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox txtNotes; + private System.Windows.Forms.Label label4; + private DevComponents.DotNetBar.PanelEx btnRefreshShop; + private System.Windows.Forms.TextBox txtShopName; + private System.Windows.Forms.TextBox txtShopId; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private UserComponent.UcCheckBox chkSearchTime; + private System.Windows.Forms.SplitContainer splitContainer3; + private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.PictureBox pbShopLoading; + private UserComponent.UcCheckBox chkSearchAllShop; + private UserComponent.DataGridViewEx dgvShop; + private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; + private System.Windows.Forms.DataGridViewTextBoxColumn colUser; + private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopName; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes; + private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus; + private System.Windows.Forms.DataGridViewTextBoxColumn colJitStatus; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse; + private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; + private System.Windows.Forms.PictureBox pbLoading; + private System.Windows.Forms.SplitContainer splitContainer4; + private UserControls.UcSplitPage ucSplitPage1; + private DevComponents.DotNetBar.PanelEx btnClear; + private UserControls.StatusBarUserControl statusBar; + private UserComponent.DataGridViewEx dgvStock; + private DevComponents.DotNetBar.PanelEx btnFilter; + private System.Windows.Forms.TextBox txtSkcId; + private System.Windows.Forms.Label label1; + private DevComponents.DotNetBar.Controls.Line line2; + private System.Windows.Forms.Label lblNextGetTime; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck; + private System.Windows.Forms.DataGridViewTextBoxColumn colIndexId; + private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId; + private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierName; + private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierInfo; + private System.Windows.Forms.DataGridViewLinkColumn colSubOrderSn; + private System.Windows.Forms.DataGridViewTextBoxColumn colSubOrderSnInfo; + private System.Windows.Forms.DataGridViewTextBoxColumn colImgUrl; + private System.Windows.Forms.DataGridViewImageColumn colProductSkcPic; + private System.Windows.Forms.DataGridViewLinkColumn colParentStockId; + private System.Windows.Forms.DataGridViewLinkColumn colProductId; + private System.Windows.Forms.DataGridViewLinkColumn colUpProuctId; + private System.Windows.Forms.DataGridViewLinkColumn colProdSkc; + private System.Windows.Forms.DataGridViewTextBoxColumn colProdName; + private System.Windows.Forms.DataGridViewTextBoxColumn colProductSn; + private System.Windows.Forms.DataGridViewTextBoxColumn colProdInfo; + private System.Windows.Forms.DataGridViewTextBoxColumn colSkuImgUrl; + private System.Windows.Forms.DataGridViewImageColumn colSkuImg; + private System.Windows.Forms.DataGridViewTextBoxColumn colSkuInfo; + private System.Windows.Forms.DataGridViewTextBoxColumn colCost; + private System.Windows.Forms.DataGridViewTextBoxColumn colPrcie; + private System.Windows.Forms.DataGridViewTextBoxColumn colStockUpNum; + private System.Windows.Forms.DataGridViewTextBoxColumn colCreateTime; + private System.Windows.Forms.DataGridViewTextBoxColumn colUploadCode; + private System.Windows.Forms.DataGridViewTextBoxColumn colUploadOrder; + private System.Windows.Forms.DataGridViewTextBoxColumn colMsg; + private DevComponents.DotNetBar.PanelEx btnRestoreSizeAndNumber; + private System.Windows.Forms.NumericUpDown numJudgeWeight; + private System.Windows.Forms.NumericUpDown numJudgeLen; + private System.Windows.Forms.Label lblJudgeLen; + private System.Windows.Forms.Label lblJudgeWeight; + private UserComponent.UcCheckBox chkFilterSize; + private System.Windows.Forms.Panel pnlRestoreSizeAndNumber; + private System.Windows.Forms.NumericUpDown numPieces; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.NumericUpDown numHeight2; + private System.Windows.Forms.NumericUpDown numHeight1; + private System.Windows.Forms.NumericUpDown numWidth1; + private System.Windows.Forms.NumericUpDown numWidth2; + private System.Windows.Forms.NumericUpDown numLen1; + private System.Windows.Forms.NumericUpDown numWeight2; + private System.Windows.Forms.NumericUpDown numWeight1; + private System.Windows.Forms.NumericUpDown numLen2; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label18; + private System.Windows.Forms.Label label19; + private System.Windows.Forms.Label label20; + } +} \ No newline at end of file diff --git a/TEMUKJD/KJDForms/JITForms/JitPushOrder.cs b/TEMUKJD/KJDForms/JITForms/JitPushOrder.cs new file mode 100644 index 0000000..8476740 --- /dev/null +++ b/TEMUKJD/KJDForms/JITForms/JitPushOrder.cs @@ -0,0 +1,1379 @@ +using AllBase; +using AllBase.Helper; +using AllBase.Model.Result; +using NaiBa.Util; +using NaiBa.Util.Extension; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using TemuKJD.BaseForms; +using TemuKJD.BLL; +using TemuKJD.Extension; +using TemuKJD.KJDForms.AdminForms; +using TemuKJD.KJDForms.ProductForms; +using TemuKJD.KJDForms.ShopForms; +using Work; + +namespace TemuKJD.KJDForms.JITForms +{ + public partial class JitPushOrder : BaseForm + { + public bool IsClientJit { get; set; } = false; + public CancellationTokenSource cancellationTokenSource { get; set; } = null; + public ConcurrentList lstAdminShopInfo { get; set; } = new ConcurrentList(); + public ConcurrentList lstTemuDBOrderInfo { get; set; } = new ConcurrentList(); + public ConcurrentList lstOrderForSupplierInfo = new ConcurrentList(); + public ConcurrentList lstCateSizeWeightConfig = new ConcurrentList(); + + public Bitmap defaultBitmap = new Bitmap(1, 1); + int indexId = 0; + string indexOrderSn = ""; + + /// + /// 界面参数配置 + /// + SetJitConfig jitPushOrderConfig = null; + + CheckBox chkSelectAll; + + public JitPushOrder() + { + InitializeComponent(); + } + + private void JitPushOrder_Load(object sender, EventArgs e) + { + if (BaseClass.Mobile == "15288888888") + { + btnRestoreSizeAndNumber.Visible = true; + } + + if (!IsClientJit) + { + ucSplitPage1.Visible = true; + } + else + { + ucSplitPage1.Visible = false; + } + + lblNextGetTime.Text = ""; + + chkSelectAll = dgvShop.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false, null, true); + chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged; + + dgvStock.AddImgColumn("colProductSkcPic", "colImgUrl"); + dgvStock.AddImgColumn("colSkuImg", "colSkuImgUrl"); + + this.dtpEndTime.Value = DateTime.Now.Date.AddDays(1).AddMilliseconds(-1); + this.dtpStartTime.Value = DateTime.Now.Date.AddDays(-7); + + if (!IsClientJit) + jitPushOrderConfig = NaiBa.Util.Helper.ConfigHelper.LoadConfig("admin_jit_push_order_config"); + else + jitPushOrderConfig = NaiBa.Util.Helper.ConfigHelper.LoadConfig("jit_push_order_config"); + + if (jitPushOrderConfig == null) + jitPushOrderConfig = new SetJitConfig(); + this.txtNotes.Text = jitPushOrderConfig.SearchNotes; + this.txtShopId.Text = jitPushOrderConfig.SearchShopId; + this.txtShopName.Text = jitPushOrderConfig.SearchShopName; + this.chkSearchAllShop.Checked = jitPushOrderConfig.SearchAllShop; + + this.txtSpuId.Text = jitPushOrderConfig.SearchSpuId; + this.txtSkcId.Text = jitPushOrderConfig.SearchSkcId; + this.txtExtCode.Text = jitPushOrderConfig.SearchExtCode; + this.chkSearchTime.Checked = jitPushOrderConfig.SearchDuration; + + this.txtNotes.TextChanged += Txt_TextChanged; + this.txtShopId.TextChanged += Txt_TextChanged; + this.txtShopName.TextChanged += Txt_TextChanged; + this.chkSearchAllShop.CheckedChanged += Txt_TextChanged; + + this.txtSpuId.TextChanged += Txt_TextChanged; + this.txtExtCode.TextChanged += Txt_TextChanged; + this.chkSearchTime.CheckedChanged += Txt_TextChanged; + + loadServerDbOrder(); + } + private void chkSelectAll_CheckedChanged(object sender, EventArgs e) + { + if (!chkSelectAll.Checked) + { + foreach (DataGridViewRow row in dgvShop.Rows) + { + row.Cells["colSelect"].Value = false; + } + } + else + { + var list = lstAdminShopInfo.Where(s => s.LoginStatus2 == "国际版在线").ToList(); + if (IsClientJit) + list = list.Where(s => s.LoginStatus2 == "国际版在线" && s.jit_expire_time >= DateTime.Now.Date).ToList(); + foreach (DataGridViewRow row in dgvShop.Rows) + { + if (list.Any(l => l.ShopId == row.Cells["colShopId"]?.Value?.ToString())) + row.Cells["colSelect"].Value = true; + } + } + } + private void Txt_TextChanged(object sender, EventArgs e) + { + jitPushOrderConfig.SearchNotes = this.txtNotes.Text.Trim(); + jitPushOrderConfig.SearchShopId = this.txtShopId.Text.Trim(); + jitPushOrderConfig.SearchShopName = this.txtShopName.Text.Trim(); + jitPushOrderConfig.SearchAllShop = this.chkSearchAllShop.Checked; + + jitPushOrderConfig.SearchSpuId = this.txtSpuId.Text.Trim(); + jitPushOrderConfig.SearchSkcId = this.txtSkcId.Text.Trim(); + jitPushOrderConfig.SearchExtCode = this.txtExtCode.Text.Trim(); + jitPushOrderConfig.SearchDuration = this.chkSearchTime.Checked; + + if (!IsClientJit) + NaiBa.Util.Helper.ConfigHelper.SaveConfig("admin_jit_push_order_config", jitPushOrderConfig); + else + NaiBa.Util.Helper.ConfigHelper.SaveConfig("jit_push_order_config", jitPushOrderConfig); + } + + private void JitPushOrder_VisibleChanged(object sender, EventArgs e) + { + if (this.Visible) + { + if (!IsClientJit) + { + //this.pbShopLoading.Visible = true; + //SearchShop(this.ucSplitPage1.CurrentPage); + } + else + { + RefreshShop(); + } + } + } + + private void btnRefreshShop_Click(object sender, EventArgs e) + { + if (!IsClientJit) + { + //if (this.ucSplitPage1.CurrentPage != 1) + // this.ucSplitPage1.CurrentPage = 1; + //else + // SearchShop(1); + } + else + { + RefreshShop(); + } + } + + private void RefreshShop() + { + // 店铺Id + var selectIds = dgvShop.Rows.Cast().Where(row + => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); + + var shopLst = GlobalConfig.ShopLoginList.ToList(); + if (!string.IsNullOrWhiteSpace(txtShopId.Text.Trim())) + { + shopLst = shopLst.Where(s => ("," + txtShopId.Text.Trim() + ",").Contains("," + s.ShopId + ",") || s.ShopId.Contains(txtShopId.Text.Trim())).ToList(); + } + if (!string.IsNullOrWhiteSpace(txtShopName.Text.Trim())) + { + shopLst = shopLst.Where(s => ("," + txtShopName.Text.Trim() + ",").Contains("," + s.ShopAccount + ",") || s.ShopAccount.ToLower().Contains(txtShopName.Text.Trim().ToLower())).ToList(); + } + if (!string.IsNullOrWhiteSpace(txtNotes.Text.Trim())) + { + shopLst = shopLst.Where(s => ("," + txtNotes.Text.Trim() + ",").Contains("," + s.Notes + ",") || s.Notes.ToLower().Contains(txtNotes.Text.Trim().ToLower())).ToList(); + } + + // 获取被删除的店铺 + List dgvRowList = dgvShop.Rows.Cast().Where(row + => !shopLst.Any(s => s.ShopId == row.Cells["colShopId"]?.Value?.ToString())).ToList(); + // 更新被删除的店铺列表 + foreach (var row in dgvRowList) + { + dgvShop.Rows.Remove(row); + } + // 绑定其他店铺(含新导入的店铺) + foreach (ShopLoginInfo shopEntity in shopLst) + { + if (!string.IsNullOrEmpty(shopEntity.ShopId)) + BindShop(shopEntity, selectIds); + } + } + + private void BindShop(ShopLoginInfo shopEntity, List selectShopId = null) + { + if (shopEntity == null) + return; + if (selectShopId == null) + selectShopId = new List(); + + bool canUse = shopEntity.LoginStatus2 == "国际版在线"; + var row = dgvShop.Rows.Cast().FirstOrDefault(p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == shopEntity.ShopId); + if (row == null) + { + int id = this.dgvShop.Rows.Add( + selectShopId.Contains(shopEntity.ShopId) && canUse, + shopEntity.UserName, + shopEntity.LoginName, + shopEntity.ShopId, + shopEntity.ShopAccount, + shopEntity.Notes, + canUse ? "在线" : "掉线", + shopEntity.jit_expire_time >= DateTime.Now.Date ? "可用" : "失效", + canUse, + string.Empty + ); + displayShopStatus(shopEntity); + } + else + { + row.Cells["colSelect"].Value = selectShopId.Contains(shopEntity.ShopId) && canUse; + row.Cells["colLoginName"].Value = shopEntity.LoginName; + row.Cells["colShopName"].Value = shopEntity.ShopAccount; + row.Cells["colShopNotes"].Value = shopEntity.Notes; + row.Cells["colLoginStatus"].Value = canUse ? "在线" : "掉线"; + displayShopStatus(shopEntity); + } + } + + private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + string headerText = dgvShop.Columns[e.ColumnIndex].HeaderText; + string loginName = dgvShop.Rows[e.RowIndex].Cells["colLoginName"].Value.ParseToString(); + string accountId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToString(); + ShopLoginInfo shop = null; + if (!IsClientJit) + shop = lstAdminShopInfo.FirstOrDefault(v => v.LoginName == loginName && v.ShopId == accountId); + else + shop = GlobalConfig.ShopLoginList.FirstOrDefault(v => v.LoginName == loginName && v.ShopId == accountId); + + + switch (headerText) + { + case "登录": + case "状态": + { + if (!IsClientJit) + { + AdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + if (shop.LoginStatus2 == "国际版在线") + { + AdminShopLoginForm adminLoginForm = new AdminShopLoginForm(shop); + adminLoginForm.openType = EnumOpenType.manage; + adminLoginForm.WindowState = FormWindowState.Maximized; + adminLoginForm.InitUrl = "https://agentseller.temu.com"; + adminLoginForm.Show(); + } + else + { + AdminShopLoginForm shopLoginForm = new AdminShopLoginForm(shop); + shopLoginForm.openType = EnumOpenType.login; + shopLoginForm.SaveComplete += shopLoginForm_SaveComplete; + shopLoginForm.ShowDialog(); + } + } + else + { + ShopListForm.Instance.CheckShopLogin(new string[] { shop.ShopAccount }, false); + if (shop.LoginStatus2 == "国际版在线") + { + ShopLoginForm adminLoginForm = new ShopLoginForm(shop); + adminLoginForm.openType = EnumOpenType.manage; + adminLoginForm.WindowState = FormWindowState.Maximized; + adminLoginForm.InitUrl = "https://agentseller.temu.com"; + adminLoginForm.Show(); + } + else + { + ShopLoginForm shopLoginForm = new ShopLoginForm(shop); + shopLoginForm.openType = EnumOpenType.login; + shopLoginForm.SaveComplete += shopLoginForm_SaveComplete; + shopLoginForm.ShowDialog(); + } + } + } + break; + case "": + if (IsClientJit) + { + if (shop != null && shop.jit_expire_time > DateTime.Now.Date) + { + if (shop.LoginStatus2 != "国际版在线") + { + dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value = false; + BaseMsgForm.ShowError("店铺未登录", "JIT-操作失败"); + return; + } + } + else + { + dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value = false; + BaseMsgForm.ShowError("JIT卡密过期或未开通", "JIT-操作失败"); + return; + } + } + dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value; + break; + default: + break; + } + } + private void shopLoginForm_SaveComplete(object obj) + { + var shop = obj as ShopLoginInfo; + if (shop == null) + return; + + displayShopStatus(shop); + } + + private void btnEmpty_Click(object sender, EventArgs e) + { + txtNotes.Text = txtShopId.Text = txtShopName.Text = ""; + } + + void displayShopStatus(ShopLoginInfo shop) + { + bool canUse = shop.LoginStatus2 == "国际版在线"; + var rows = this.dgvShop.Rows.Cast().Where(r => r.Cells["colLoginName"].Value.ParseToString() == shop?.LoginName); + foreach (var row in rows) + { + row.Cells["colCanUse"].Value = canUse; + row.Cells["colLoginStatus"].Value = canUse ? "在线" : "掉线"; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightGreen : Color.OrangeRed; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkGreen : Color.DarkRed; + } + if (IsClientJit) + { + var jitRow = this.dgvShop.Rows.Cast().FirstOrDefault(r => r.Cells["colShopId"].Value.ParseToString() == shop?.ShopId); + jitRow.Cells["colJitStatus"].Style.ForeColor = JitShopActiveForm.GetJitStatusStyleColor(shop); + } + } + + + + /// + /// 读待发货订单 + /// + /// + /// + /// + private string GetShopStockList2(ShopLoginInfo shop, int page = 1, int pageSize = 20) + { + page = Math.Max(page, 1); + string url = "https://agentseller.temu.com/mms/venom/api/supplier/purchase/manager/querySubOrderList"; + string body; + body = @"{""pageNo"":" + page + @",""pageSize"":" + pageSize + @",""urgencyType"":1,""isCustomGoods"":false,""statusList"":[1]," + + @"""oneDimensionSort"":{""firstOrderByParam"":""expectLatestDeliverTime"",""firstOrderByDesc"":0}}"; + string refere = "https://agentseller.temu.com/stock/fully-mgt/order-manage-urgency"; + + return HttpResponseBLL.PostResponse2(shop, url, body, refere); + } + + private string SearchForChainSupplier(ShopLoginInfo shop, int page, string prodSkcIds = null, string type = "待卖家确认", long startTime = 0, long endTime = 0) + { + string url = "https://agentseller.temu.com/api/kiana/mms/robin/searchForChainSupplier"; + string body = ""; + body = "{\"pageSize\":100,\"pageNum\":" + page + ","; + if (!string.IsNullOrEmpty(txtExtCode.Text.Trim())) + body += "\"skcExtCodeKeyword\":\"" + txtExtCode.Text.Trim() + "\","; + if (startTime != 0 && endTime != 0) // 查询创建时间 + body += "\"timeType\":1,\"timeBegin\":" + startTime + ",\"timeEnd\":" + endTime + ","; + if (type == "待卖家确认") + body += "\"priceReviewStatusList\":[1],\"secondarySelectStatusList\":[7],"; + else if (type == "待创建首单") + body += "\"secondarySelectStatusList\":[10],"; + else if (type == "已发布到站点") + body += "\"secondarySelectStatusList\":[12],\"supplierTodoTypeList\":[],"; + body += "\"supplierTodoTypeList\":[],"; + if (!string.IsNullOrEmpty(prodSkcIds)) + body += "\"productSkcIdList\":[" + prodSkcIds + "],"; + body = body.TrimEnd(','); + body += "}"; + string referer = "https://agentseller.temu.com/newon/product-select"; + return HttpResponseBLL.PostResponse2(shop, url, body, referer); + } + + private void btnSearchOrder_Click(object sender, EventArgs e) + { + var lstShopId = dgvShop.Rows.Cast().Where(row + => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); + if (lstShopId.Count == 0) + { + BaseMsgForm.ShowInfo("请选择店铺!"); + return; + } + + lstOrderForSupplierInfo.Clear(); + //dgvStock.Rows.Clear(); + + var dgvRows = this.dgvShop.Rows.Cast();//.Where(r => lstShopId.Contains(r.Cells["colShopId"].Value.ParseToString())); + foreach (var row in dgvRows) + { + row.Cells["colMessage"].Value = ""; + } + + cancellationTokenSource = new CancellationTokenSource(); + Task.Run(() => + { + var lstShopIdTemp = new List(); + lstShopIdTemp.AddRange(lstShopId); + int i = 0; + foreach (var shopId in lstShopIdTemp) + { + this.Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "正在查询..."; + this.statusBar.pgbTaskProgress.Maximum = lstShopIdTemp.Count; + this.statusBar.UpdateProgressBar(i + 1); + i++; + })); + + if (cancellationTokenSource.IsCancellationRequested) + break; + + ShopLoginInfo shop = null; + if (!IsClientJit) + { + shop = this.lstAdminShopInfo.FirstOrDefault(s => s.ShopId == shopId); + } + else + { + shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId); + } + if (shop == null) + continue; + + #region 检测登录 + if (shop.LoginStatus2 != "国际版在线") + { + continue; + } + if (!IsClientJit) + { + AdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + } + else + { + ShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + } + if (shop.LoginStatus2 != "国际版在线") + { + Invoke(new Action(() => + { + var rows = this.dgvShop.Rows.Cast().Where(r => r.Cells["colLoginName"].Value.ToString() == shop.LoginName); + foreach (var row in rows) + { + row.Cells["colMessage"].Value = "店铺掉线"; + row.Cells["colLoginStatus"].Value = "未登录"; + row.Cells["colCanUse"].Value = false; + } + })); + continue; + } + #endregion + + Invoke(new Action(() => + { + var rows = this.dgvShop.Rows.Cast().Where(r => r.Cells["colShopId"].Value.ToString() == shop.ShopId); + foreach (var row in rows) + { + row.Cells["colMessage"].Value = "正在查询"; + } + })); + + int page = 1; + int totalPage = 1; + int pageSize = 20; + bool isError = false; + string errorMsg = ""; + while (page <= totalPage) + { + if (cancellationTokenSource.IsCancellationRequested) + break; + + Thread.Sleep(100 + Randomx.GetId(200)); + string jsonStr = GetShopStockList2(shop, page, pageSize); + if (!jsonStr.Contains("\"success\":true")) + { + isError = true; + var errMsg = BaseRegex.GetStringJson(ref jsonStr, "error_msg"); + if (string.IsNullOrEmpty(errMsg)) + errMsg = BaseRegex.GetStringJson(ref jsonStr, "errorMsg"); + if (string.IsNullOrEmpty(errMsg)) + errMsg = jsonStr; + if (!errorMsg.Contains(errMsg)) + { + errorMsg += " " + errMsg; + } + } + + ConcurrentList subOrderInfoLst = new ConcurrentList(); + if (jsonStr.Contains("\"success\":true")) + { + var jArr = new JArray(); + try + { + var jObj = JObject.Parse(jsonStr); + jArr = jObj["result"]?["subOrderForSupplierList"] as JArray; + if (jArr == null) + jArr = new JArray(); + + var list = JsonHelper.DeserializeJsonToList(jArr.ToString()); + list = list.Where(s => !lstTemuDBOrderInfo.Any(o => o.subPurchaseOrderSn == s.subPurchaseOrderSn)).ToList(); + subOrderInfoLst.AddRange(list); + } + catch (Exception ex) { BaseMsgForm.ShowError(ex.Message); } + + List upProdList = new List(); + if (subOrderInfoLst.Count > 0) + { + var spuIdLst = subOrderInfoLst.Select(o => o.productId.ParseToString()).Distinct().ToList(); + // 获取产品数据库中的成本价格 + upProdList = AdminProductPriceCheckForm.GetUpSpuIdLst(spuIdLst); + } + + foreach (var subOrderInfo in subOrderInfoLst) + { + var upProd = upProdList.FirstOrDefault(p => p.draft_id == subOrderInfo.productId.ParseToLong()); + TemuDBOrderInfo dbOrderInfo = new TemuDBOrderInfo() + { + add_time = DateTime.Now, + availableSaleDays = subOrderInfo.skuQuantityDetailList.FirstOrDefault().availableSaleDays, + barCodeMd5 = null, + category = subOrderInfo.category, + className = subOrderInfo.skuQuantityDetailList.FirstOrDefault().className, + costPrice = (upProd?.cost_price * 100m)?.ParseToInt(), + currencyType = subOrderInfo.skuQuantityDetailList.FirstOrDefault().currencyType, + deliverQuantity = subOrderInfo.skuQuantityDetailList.FirstOrDefault().deliverQuantity.ParseToInt(), + deliverTime = subOrderInfo.deliverInfo.deliverTime, + deliveryFee = (upProd?.delivery_fee * 100m)?.ParseToInt(), + deliveryOrderSn = subOrderInfo.deliverInfo.deliveryOrderSn, + expectLatestArrivalTimeOrDefault = subOrderInfo.deliverInfo.expectLatestArrivalTimeOrDefault.ParseToLong(), + expectLatestDeliverTimeOrDefault = subOrderInfo.deliverInfo.expectLatestDeliverTimeOrDefault.ParseToLong(), + extCode = subOrderInfo.skuQuantityDetailList.FirstOrDefault().extCode, + id = null, + jiaTongCode = null, + markFee = (upProd?.mark_fee * 100m)?.ParseToInt(), + mdy_time = DateTime.Now, + notes = null, + originalPurchaseOrderSn = subOrderInfo.originalPurchaseOrderSn, + productId = subOrderInfo.productId.ParseToString(), + productName = subOrderInfo.productName, + productSkcId = subOrderInfo.productSkcId.ParseToString(), + productSkcPicture = subOrderInfo.productSkcPicture, + productSkuId = subOrderInfo.skuQuantityDetailList.FirstOrDefault().productSkuId.ParseToString(), + productSn = subOrderInfo.productSn, + purchaseQuantity = subOrderInfo.skuQuantityDetailList.FirstOrDefault().purchaseQuantity.ParseToInt(), + purchaseTime = subOrderInfo.purchaseTime.ParseToLong(), + qcResult = subOrderInfo.skuQuantityDetailList.FirstOrDefault().qcResult, + realReceiveAuthenticQuantity = subOrderInfo.skuQuantityDetailList.FirstOrDefault().realReceiveAuthenticQuantity.ParseToInt(), + receiveTime = subOrderInfo.deliverInfo.receiveTime, + receiveWarehouseId = subOrderInfo.deliverInfo.receiveWarehouseId.ParseToString(), + receiveWarehouseName = subOrderInfo.deliverInfo.receiveWarehouseName, + shippingMarkMd5 = null, + status = subOrderInfo.status.ParseToInt(), + subPurchaseOrderSn = subOrderInfo.subPurchaseOrderSn, + supplierId = subOrderInfo.supplierId.ParseToString(), + supplierName = subOrderInfo.supplierName, + supplierPrice = subOrderInfo.skuQuantityDetailList.FirstOrDefault().supplierPrice.ParseToInt(), + thumbUrlList = subOrderInfo.skuQuantityDetailList.FirstOrDefault().thumbUrlList.FirstOrDefault(), + upLoadStatus = 0, + upProductId = upProd?.draft_id.ParseToString(), + warehouseGroupId = subOrderInfo.warehouseGroupId.ParseToString(), + }; + lstOrderForSupplierInfo.Add(subOrderInfo); + lstTemuDBOrderInfo.Add(dbOrderInfo); + + + var url = BaseClass.BuildObjString("order/add_order"); + var data = UserLogin.GetSignaturex() + + //"&page=" + page + + //"&page_size=" + pageSize + + "&shop_id=" + dbOrderInfo.supplierId + + "&order_data=" + HttpUtility.UrlEncode(JsonHelper.SerializeObject(dbOrderInfo), Encoding.UTF8); + //if (BaseClass.SaLevel > 1 && !chkSearchAllShop.Checked) + // data += "&operate_sub_sa_name=" + BaseClass.UserName; + var html = GetHtml.PostUtf8(url, data); + //if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + // html = GetHtml.PostUtf8(url, data); + //if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + // html = GetHtml.PostUtf8(url, data); + if(!string.IsNullOrEmpty(html) && html.Contains("\"code\":200")) + { + + } + + + Invoke(new Action(() => + { + int rowId = 0; + var rows = this.dgvStock.Rows.Cast(); + foreach (var r in rows) + { + if (r.Cells["colSupplierId"].Value.ParseToString() == shop.ShopId && r.Cells["colCreateTime"].Value.ParseToLong() <= dbOrderInfo.purchaseTime) + { + rowId = r.Index; + break; + } + } + this.dgvStock.Rows.Insert(rowId, + false, + "", + dbOrderInfo.supplierId, + dbOrderInfo.supplierName, + dbOrderInfo.supplierId + "\r\n" + dbOrderInfo.supplierName, + + dbOrderInfo.subPurchaseOrderSn, + dbOrderInfo.subPurchaseOrderSn + + "\r\n需 " + BaseClass.StampToDateTime((dbOrderInfo.expectLatestDeliverTimeOrDefault / 1000).ParseToInt()).ToString("MM-dd HH:mm:ss") + " 前发货" + + "\r\n需 " + BaseClass.StampToDateTime((dbOrderInfo.expectLatestArrivalTimeOrDefault / 1000).ParseToInt()).ToString("MM-dd HH:mm:ss") + " 前到货", + + dbOrderInfo.productSkcPicture.Replace("https", "http").Replace("img.kwcdn.com", "img.cdnfe.com") + "?imageMogr2/thumbnail/54x54"", + DataGridViewExtension.defaultBitmap, + + dbOrderInfo.originalPurchaseOrderSn, + dbOrderInfo.productId, + dbOrderInfo.upProductId, + dbOrderInfo.productSkcId, + dbOrderInfo.productName, + dbOrderInfo.productSn, + "备货母单号: " + dbOrderInfo.originalPurchaseOrderSn + "\r\n" + + "SKC: " + dbOrderInfo.productSkcId + "\r\n" + + "货号: " + dbOrderInfo.productSn + "\r\n" + + getLength2312Str(dbOrderInfo.productName, 50), + + + dbOrderInfo.productSkcPicture.Replace("https", "http").Replace("img.kwcdn.com", "img.cdnfe.com") + "?imageMogr2/thumbnail/54x54"", + DataGridViewExtension.defaultBitmap, + dbOrderInfo.className + "\r\nSKU ID: " + dbOrderInfo.productSkuId, + + "成本价:" + (dbOrderInfo.costPrice / 100m) + "\r\n车队费:" + (dbOrderInfo.deliveryFee / 100m) + "\r\n贴单费:" + (dbOrderInfo.markFee / 100m), + + dbOrderInfo.supplierPrice / 100m, + dbOrderInfo.purchaseQuantity, + BaseClass.StampToDateTime((dbOrderInfo.purchaseTime / 1000).ParseToInt()).ToString("yyyy-MM-dd HH:mm:ss") + ); + + var row = dgvStock.Rows[rowId]; + row.Height = 120; + + if (dbOrderInfo.originalPurchaseOrderSn != indexOrderSn) + { + indexId++; + indexOrderSn = dbOrderInfo.originalPurchaseOrderSn; + } + else + { + row.Cells["colProdInfo"].Value = ""; + row.Cells["colProductSkcPic"].Value = this.defaultBitmap; + } + if (indexId % 2 == 1) + row.DefaultCellStyle.BackColor = Color.White; + else + row.DefaultCellStyle.BackColor = Color.FromArgb(235, 235, 235); + })); + } + + int total = BaseRegex.GetStringJson(ref jsonStr, "total").ParseToInt(); + totalPage = Math.Ceiling(1.0m * total / pageSize).ParseToInt(); + } + page++; + } + + Invoke(new Action(() => + { + var rows = this.dgvShop.Rows.Cast().Where(r => r.Cells["colShopId"].Value.ToString() == shop.ShopId); + + if (!isError) + { + foreach (var row in rows) + { + row.Cells["colMessage"].Value = "已查询"; + } + } + else + { + foreach (var row in rows) + { + row.Cells["colMessage"].Value = "查询失败" + errorMsg; + } + } + })); + } + Invoke(new Action(() => + { + string sRst = "查询结束!"; + if (cancellationTokenSource.IsCancellationRequested) + sRst = "已取消查询!"; + + BaseMsgForm.ShowInfo(sRst); + this.statusBar.lblTaskStatus.Text = sRst; + })); + }, cancellationTokenSource.Token); + } + + void loadServerDbOrder() + { + Task.Run(() => { + + foreach(var shop in GlobalConfig.ShopLoginList) + { + if(shop.jit_expire_time >= DateTime.Now.Date) + { + int page = 0; + int totalPage = 1; + int pageSize = 50; + while(page < totalPage) + { + page++; + var url = BaseClass.BuildObjString("order/get_order_list"); + var data = UserLogin.GetSignaturex() + + //"&page=" + page + + //"&page_size=" + pageSize + + "&shop_id=" + shop.ShopId + + "&page=" + page; + //if (BaseClass.SaLevel > 1 && !chkSearchAllShop.Checked) + // data += "&operate_sub_sa_name=" + BaseClass.UserName; + var html = GetHtml.PostUtf8(url, data); + //if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + // html = GetHtml.PostUtf8(url, data); + //if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + // html = GetHtml.PostUtf8(url, data); + if (!string.IsNullOrEmpty(html) && html.Contains("\"code\":200")) + { + //lstTemuDBOrderInfo.AddRange() + + var jObj = JObject.Parse(html); + var list = JsonHelper.DeserializeJsonToList(jObj["data"].ToString()); + list = list.Where(s => !lstTemuDBOrderInfo.Any(o => o.subPurchaseOrderSn == s.subPurchaseOrderSn)).ToList(); + lstTemuDBOrderInfo.AddRange(list); + foreach (var dbOrderInfo in list) + { + Invoke(new Action(() => + { + int rowId = 0; + this.dgvStock.Rows.Insert(rowId, + false, + "", + dbOrderInfo.supplierId, + dbOrderInfo.supplierName, + dbOrderInfo.supplierId + "\r\n" + dbOrderInfo.supplierName, + + dbOrderInfo.subPurchaseOrderSn, + dbOrderInfo.subPurchaseOrderSn + + "\r\n需 " + BaseClass.StampToDateTime((dbOrderInfo.expectLatestDeliverTimeOrDefault / 1000).ParseToInt()).ToString("MM-dd HH:mm:ss") + " 前发货" + + "\r\n需 " + BaseClass.StampToDateTime((dbOrderInfo.expectLatestArrivalTimeOrDefault / 1000).ParseToInt()).ToString("MM-dd HH:mm:ss") + " 前到货", + + dbOrderInfo.productSkcPicture.Replace("https", "http").Replace("img.kwcdn.com", "img.cdnfe.com") + "?imageMogr2/thumbnail/54x54"", + DataGridViewExtension.defaultBitmap, + + dbOrderInfo.originalPurchaseOrderSn, + dbOrderInfo.productId, + dbOrderInfo.upProductId, + dbOrderInfo.productSkcId, + dbOrderInfo.productName, + dbOrderInfo.productSn, + "备货母单号: " + dbOrderInfo.originalPurchaseOrderSn + "\r\n" + + "SKC: " + dbOrderInfo.productSkcId + "\r\n" + + "货号: " + dbOrderInfo.productSn + "\r\n" + + getLength2312Str(dbOrderInfo.productName, 50), + + + dbOrderInfo.productSkcPicture.Replace("https", "http").Replace("img.kwcdn.com", "img.cdnfe.com") + "?imageMogr2/thumbnail/54x54"", + DataGridViewExtension.defaultBitmap, + dbOrderInfo.className + "\r\nSKU ID: " + dbOrderInfo.productSkuId, + + "成本价:" + (dbOrderInfo.costPrice / 100m) + "\r\n车队费:" + (dbOrderInfo.deliveryFee / 100m) + "\r\n贴单费:" + (dbOrderInfo.markFee / 100m), + + dbOrderInfo.supplierPrice / 100m, + dbOrderInfo.purchaseQuantity, + BaseClass.StampToDateTime((dbOrderInfo.purchaseTime / 1000).ParseToInt()).ToString("yyyy-MM-dd HH:mm:ss") + ); + + var row = dgvStock.Rows[rowId]; + row.Height = 120; + + if (dbOrderInfo.originalPurchaseOrderSn != indexOrderSn) + { + indexId++; + indexOrderSn = dbOrderInfo.originalPurchaseOrderSn; + } + else if (dgvStock.Rows.Count > rowId + 1) + { + dgvStock.Rows[rowId + 1].Cells["colProdInfo"].Value = ""; + dgvStock.Rows[rowId + 1].Cells["colProductSkcPic"].Value = this.defaultBitmap; + } + if (indexId % 2 == 1) + row.DefaultCellStyle.BackColor = Color.White; + else + row.DefaultCellStyle.BackColor = Color.FromArgb(235, 235, 235); + })); + } + + int total = BaseRegex.GetStringJson(ref html, "count").ParseToInt(); + totalPage = Math.Ceiling(1.0m * total / pageSize).ParseToInt(); + } + } + } + } + }); + } + + string getLength2312Str(string text, int length = 30) + { + var newTxt = text; + while (Encoding.GetEncoding("gb2312").GetBytes(newTxt).Length > length) + { + newTxt = newTxt.Substring(0, newTxt.Length - 1); + } + return newTxt == text ? newTxt : newTxt + "…"; + } + + private void btnStop_Click(object sender, EventArgs e) + { + if (cancellationTokenSource != null) + cancellationTokenSource.Cancel(); + } + + private void btnRestoreSizeAndNumber_Click(object sender, EventArgs e) + { + RestoreSizeAndNumber(); + } + + void RestoreSizeAndNumber() + { + + //this.statusBar.lblTaskStatus.Text = "正在批量还原包装规格尺寸与SKU分类数量"; + //this.pbLoading.Visible = true; + Task.Run(() => + { + // 获取未还原的商品列表 + var orderLst = this.lstTemuDBOrderInfo.Where(o => o.upLoadStatus == 0).ToList(); + List prodIdLst = new List(); + foreach (var order in orderLst) + { + if (prodIdLst.Contains(order.productId) || order.status > 0) + continue; + var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == order.supplierId); + if (shop == null || shop.LoginStatus2 != "国际版在线") + continue; + + var searchRst = SearchForChainSupplier(shop, 1, order.productSkcId, ""); + if (!searchRst.Contains("\"success\":true") && !searchRst.Contains("登录过期") && !searchRst.Contains("Invalid Login State")) + searchRst = SearchForChainSupplier(shop, 1, order.productSkcId, ""); + if (!searchRst.Contains("\"success\":true")) + { + this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + Invoke(new Action(() => + { + displayShopStatus(shop); + })); + continue; + } + + try + { + var jObj = JObject.Parse(searchRst); + var jArr = jObj["result"]["dataList"] as JArray; + if (jArr == null) + jArr = new JArray(); + + List extCodeTmpLst = new List(); + List spuIdLst = new List(); + var item = jArr.FirstOrDefault(); + var jStr = JsonHelper.SerializeObject(item); + TemuForChainProductInfo priceInfo = JsonHelper.DeserializeJsonToObject(jStr); + if (priceInfo != null) + { + if (!checkNeedRestoreSizeAndNumber(priceInfo)) + { + // todo 更改不用再修商品并改参数提交到数据库; + var url = BaseClass.BuildObjString("order/update_order_status1"); + var data = UserLogin.GetSignaturex() + + "&shop_id=" + shop.ShopId + + "&product_id=" + priceInfo.productId; + var html = GetHtml.PostUtf8(url, data); + //if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + // html = GetHtml.PostUtf8(url, data); + //if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + // html = GetHtml.PostUtf8(url, data); + if (!string.IsNullOrEmpty(html) && html.Contains("\"code\":200")) + { + foreach(var o in lstTemuDBOrderInfo) + { + if (o.upLoadStatus < 1) + o.upLoadStatus = 1; + } + } + continue; + } + + var t = Task.Run(() => { return RestoreSizeAndNumber(priceInfo, shop); }); +#if DEBUG + t.Wait(250000); +#endif + t.Wait(25000); + + var rRst = t.Result; + if (string.IsNullOrEmpty(rRst)) + { + prodIdLst.Add(priceInfo.productId.ParseToString()); + } + } + } + catch + { + + } + } + }); + } + + string RestoreSizeAndNumber(TemuForChainProductInfo price, ShopLoginInfo shop) + { + //---------------------------------------------------------------------------------------- + // 查询是否有修改记录,如果没有申请新的修改,获取taskId + var rows = this.dgvStock.Rows.Cast().Where(r => r.Cells["colProductId"].Value.ParseToString() == price.productId.ParseToString()).ToList(); + if (IsClientJit) + shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == price.supplierId.ParseToString()); + if (shop == null) + return "店铺不存在"; // continue; + if (shop.LoginStatus2 != "国际版在线") + { + Invoke(new Action(() => + { + foreach (var row in rows) + row.Cells["colMsg"].Value = "店铺掉线"; + })); + return "店铺掉线"; //continue; + } + + //var pName = price.productName; + if (checkNeedRestoreSizeAndNumber(price)) + { + } + else + { + Invoke(new Action(() => + { + foreach (var row in rows) + row.Cells["colMsg"].Value = "无需处理订单参数"; // "无需还原包装规格尺寸与SKU分类数量"; + })); + return "无需处理订单参数"; //continue; + } + + var taskUid = ""; + var html = AdminProductPriceCheckForm.editPriceProductSizeAndNumberBatchAdd(shop, price.productId.ParseToString()); + //{"success":true,"errorCode":1000000,"errorMsg":null,"result":{"handleFailedList":[{"failedBizId":4432690492,"failedReason":"This product has pending or in-progress modification tasks, cannot initiate again"}],"addFailedList":[{"failedBizId":4432690492,"failedReason":"This product has pending or in-progress modification tasks, cannot initiate again","failedReasonType":8}],"successBizId2TaskUidMap":{}}} + if (html.Contains("This product has pending or in-progress modification tasks")) + { + var taskHtml = AdminProductPriceCheckForm.editPriceProductSizeAndNumberTaskQuery(shop, price.productId.ParseToString()); + taskUid = BaseRegex.GetStringJson(ref taskHtml, "taskUid"); + if (string.IsNullOrEmpty(taskUid) || !taskHtml.Contains("\"productEditTaskItems\":[{\"editItem\":4,\"editAdvice\":\"优化\"},{\"editItem\":8,\"editAdvice\":\"优化\"}]")) + { + Invoke(new Action(() => + { + foreach (var row in rows) + row.Cells["colMsg"].Value = "有正在处理的订单参数"; + })); + return "有正在处理的订单参数"; //continue; + } + } + if (!html.Contains("\"success\":true")) + { + if (html.Contains("登录过期") || html.Contains("Invalid Login State")) + { + this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + Invoke(new Action(() => + { + displayShopStatus(shop); + })); + } + string sErrMsg = BaseRegex.GetStringJson(ref html, "errorMsg").ParseToString(); + if (string.IsNullOrEmpty(sErrMsg)) + { + sErrMsg = BaseRegex.GetStringJson(ref html, "error_msg").ParseToString(); + } + Invoke(new Action(() => + { + foreach (var row in rows) + row.Cells["colMsg"].Value = "修改订单请求失败 " + sErrMsg; + })); + return "修改订单请求失败" + sErrMsg;//continue; + } + try + { + if (string.IsNullOrEmpty(taskUid)) + { + JObject jObj = JObject.Parse(html); + taskUid = jObj["result"]["successBizId2TaskUidMap"].LastOrDefault().LastOrDefault().ParseToString(); + } + } + catch (Exception ex) + { + Invoke(new Action(() => + { + foreach (var row in rows) + row.Cells["colMsg"].Value = "序列化修改订单请求结果失败 " + ex.Message; + })); + return "序列化修改订单请求结果失败 " + ex.Message; // continue; + } + + html = AdminProductPriceCheckForm.editPriceProductQuery(shop, price.productId.ParseToString(), taskUid).ParseToString(); + if (html.Contains("This product has pending or in-progress modification tasks")) + { + Invoke(new Action(() => + { + foreach (var row in rows) + row.Cells["colMsg"].Value = "已提交过修改任务"; + })); + return "已提交过修改任务"; // continue; + } + if (!html.Contains("\"success\":true")) + { + if (html.Contains("登录过期") || html.Contains("Invalid Login State")) + { + this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + Invoke(new Action(() => + { + displayShopStatus(shop); + })); + } + string sErrMsg = BaseRegex.GetStringJson(ref html, "errorMsg").ParseToString(); + if (string.IsNullOrEmpty(sErrMsg)) + { + sErrMsg = BaseRegex.GetStringJson(ref html, "error_msg").ParseToString(); + } + Invoke(new Action(() => + { + foreach (var row in rows) + row.Cells["colMsg"].Value = "查询已提交修改任务失败 " + sErrMsg; + })); + return "查询已提交修改任务失败 " + sErrMsg; // continue; + } + + try + { + //int len = Randomx.GetId(15, 31); //300 + //int width = Randomx.GetId(10, 15); //200 + //int height = Randomx.GetId(5, 10); //100 + //int weight = Randomx.GetId(100, 200); //500000 + //int numberOfPieces = Randomx.GetId(450, 601);// 单品数量 + int len = Randomx.GetId(numLen1.Value.ParseToInt(), numLen2.Value.ParseToInt() + 1) * 10; + int width = Randomx.GetId(numWidth1.Value.ParseToInt(), Math.Min(len, numWidth2.Value.ParseToInt() + 1)) * 10; + int height = Randomx.GetId(numHeight1.Value.ParseToInt(), Math.Min(width, numHeight2.Value.ParseToInt() + 1)) * 10; + int weight = Randomx.GetId(numWeight1.Value.ParseToInt(), numWeight2.Value.ParseToInt() + 1) * 1000; + int numberOfPieces = Math.Max(1, numPieces.Value.ParseToInt()); + + JObject obj = JObject.Parse(html); + var result = JsonHelper.SerializeObject(obj["result"]); + TemuDetailProductInfo prodInfo = JsonHelper.DeserializeJsonToObject(result); + var catId = Math.Max(0, prodInfo.categories.cat1.catId.ParseToInt()); + catId = Math.Max(catId, prodInfo.categories.cat2.catId.ParseToInt()); + catId = Math.Max(catId, prodInfo.categories.cat3.catId.ParseToInt()); + catId = Math.Max(catId, prodInfo.categories.cat4.catId.ParseToInt()); + catId = Math.Max(catId, prodInfo.categories.cat5.catId.ParseToInt()); + catId = Math.Max(catId, prodInfo.categories.cat6.catId.ParseToInt()); + catId = Math.Max(catId, prodInfo.categories.cat7.catId.ParseToInt()); + catId = Math.Max(catId, prodInfo.categories.cat8.catId.ParseToInt()); + catId = Math.Max(catId, prodInfo.categories.cat9.catId.ParseToInt()); + catId = Math.Max(catId, prodInfo.categories.cat10.catId.ParseToInt()); + + var cateSizeWeightConfig = lstCateSizeWeightConfig.FirstOrDefault(c => c.catId == catId.ToString()); + + if (cateSizeWeightConfig == null) + { + var url = BaseClass.BuildObjString("product/get_cate_size_weight_config_v2"); + var data = UserLogin.GetSignaturex() + + "&cat_id=" + catId; + html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + if (!string.IsNullOrEmpty(html) && html.Contains("\"code\":200")) + { + try + { + var jArr = JObject.Parse(html)["data"]; + cateSizeWeightConfig = JsonHelper.DeserializeJsonToObject(jArr.ToString()); + if (cateSizeWeightConfig != null) + lstCateSizeWeightConfig.Add(cateSizeWeightConfig); + } + catch { } + } + } + + if (cateSizeWeightConfig == null) + { + //查询接口尺寸重量限制 + html = AdminProductPriceCheckForm.queryProductSizeAndWeightConfig(shop, taskUid.ParseToString(), price.productId.ParseToString(), catId.ParseToString()); + var html1 = AdminProductPriceCheckForm.queryCatSizeAndWeightConfig(shop, taskUid.ParseToString(), price.productId.ParseToString(), catId.ParseToString()); + if (!string.IsNullOrEmpty(html1) && html1.Contains("length")) + html = html1; + //{"success":true,"errorCode":1000000,"errorMsg":null,"result":{"common":{"operatorId":null,"operatorName":null,"operatorType":null,"checkSideRelation":false,"noticeSideEquation":false,"length":{"min":10,"max":2999},"width":{"min":5,"max":2999},"height":{"min":2,"max":2999},"weight":{"min":2000,"max":99999000}}}} + Thread.Sleep(Randomx.GetId(25, 75)); + commonSleep(); + if (html.Contains("\"success\":true")) + { + try + { + JObject jObj = JObject.Parse(html); + cateSizeWeightConfig = new CateSizeWeightConfig() { catId = catId.ToString() }; + if (html.Contains("common")) + { + cateSizeWeightConfig.minLen = jObj["result"]["common"]["length"]["min"].ParseToInt(); + cateSizeWeightConfig.maxLen = jObj["result"]["common"]["length"]["max"].ParseToInt(); + cateSizeWeightConfig.minWidth = jObj["result"]["common"]["width"]["min"].ParseToInt(); + cateSizeWeightConfig.maxWidth = jObj["result"]["common"]["width"]["max"].ParseToInt(); + cateSizeWeightConfig.minHeight = jObj["result"]["common"]["height"]["min"].ParseToInt(); + cateSizeWeightConfig.maxHeight = jObj["result"]["common"]["height"]["max"].ParseToInt(); + cateSizeWeightConfig.minWeight = jObj["result"]["common"]["weight"]["min"].ParseToInt(); + cateSizeWeightConfig.maxWeight = jObj["result"]["common"]["weight"]["max"].ParseToInt(); + } + else + { + cateSizeWeightConfig.minLen = jObj["result"]["length"]["min"].ParseToInt(); + cateSizeWeightConfig.maxLen = jObj["result"]["length"]["max"].ParseToInt(); + cateSizeWeightConfig.minWidth = jObj["result"]["width"]["min"].ParseToInt(); + cateSizeWeightConfig.maxWidth = jObj["result"]["width"]["max"].ParseToInt(); + cateSizeWeightConfig.minHeight = jObj["result"]["height"]["min"].ParseToInt(); + cateSizeWeightConfig.maxHeight = jObj["result"]["height"]["max"].ParseToInt(); + cateSizeWeightConfig.minWeight = jObj["result"]["weight"]["min"].ParseToInt(); + cateSizeWeightConfig.maxWeight = jObj["result"]["weight"]["max"].ParseToInt(); + } + lstCateSizeWeightConfig.Add(cateSizeWeightConfig); + + var url = BaseClass.BuildObjString("product/add_cate_size_weight_config_v2"); + var data = UserLogin.GetSignaturex(); + data += "&cat_id=" + catId; + data += "&minLen=" + cateSizeWeightConfig.minLen; + data += "&maxLen=" + cateSizeWeightConfig.maxLen; + data += "&minWidth=" + cateSizeWeightConfig.minWidth; + data += "&maxWidth=" + cateSizeWeightConfig.maxWidth; + data += "&minHeight=" + cateSizeWeightConfig.minHeight; + data += "&maxHeight=" + cateSizeWeightConfig.maxHeight; + data += "&minWeight=" + cateSizeWeightConfig.minWeight; + data += "&maxWeight=" + cateSizeWeightConfig.maxWeight; + html = GetHtml.PostUtf8(url, data); + } + catch { } + } + else + { + if (html.Contains("登录过期") || html.Contains("Invalid Login State")) + { + this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + Invoke(new Action(() => + { + displayShopStatus(shop); + })); + } + string sErrMsg = BaseRegex.GetStringJson(ref html, "errorMsg").ParseToString(); + if (string.IsNullOrEmpty(sErrMsg)) + sErrMsg = BaseRegex.GetStringJson(ref html, "error_msg").ParseToString(); + if (string.IsNullOrEmpty(sErrMsg)) + sErrMsg = html; + Invoke(new Action(() => + { + foreach (var row in rows) + row.Cells["colMsg"].Value = "修改请求失败 " + sErrMsg; + })); + return "修改请求失败 " + sErrMsg; //continue; + } + } + + if (cateSizeWeightConfig != null) + { + // 设置长宽高 + if (len < cateSizeWeightConfig.minLen) len = cateSizeWeightConfig.minLen; + if (len > cateSizeWeightConfig.maxLen) len = cateSizeWeightConfig.maxLen; + if (width < cateSizeWeightConfig.minWidth) width = cateSizeWeightConfig.minWidth; + if (width > cateSizeWeightConfig.maxWidth) width = cateSizeWeightConfig.maxWidth; + if (height < cateSizeWeightConfig.minHeight) height = cateSizeWeightConfig.minHeight; + if (height > cateSizeWeightConfig.maxHeight) height = cateSizeWeightConfig.maxHeight; + if (weight < cateSizeWeightConfig.minWeight) weight = cateSizeWeightConfig.minWeight; + if (weight > cateSizeWeightConfig.maxWeight) weight = cateSizeWeightConfig.maxWeight; + } + + //JObject jPost = new JObject(); + //jPost.Add("productId", price.productId); + //jPost.Add("taskUid", taskUid.ParseToString()); + //jPost.Add("taskVersion", 0); + //jPost.Add("refuseEdit", false); + //var jProductSkcMainReqs = new JArray(); + //jPost.Add("productSkcReqs", jProductSkcMainReqs); + //JObject jProductSkcMainReq = new JObject(); + //jProductSkcMainReqs.Add(jProductSkcMainReq); + //var jMainProductSkuSpecReqs = new JArray(); + //jProductSkcMainReq.Add("mainProductSkuSpecReqs", jMainProductSkuSpecReqs); + //jMainProductSkuSpecReqs.Add(new JObject() { + // new JProperty("parentSpecId",0), + // new JProperty("parentSpecName",""), + // new JProperty("specId",0), + // new JProperty("specName",""), + //}); + + var jStr = "{"; + jStr += "\r\n\"productId\":" + price.productId + ","; + jStr += "\r\n\"taskUid\":\"" + taskUid.ParseToString() + "\","; + jStr += "\r\n\"taskVersion\":" + 0 + ","; + jStr += "\r\n\"refuseEdit\":false,"; + jStr += "\r\n\"productSkcReqs\":[{"; + jStr += " \r\n\"mainProductSkuSpecReqs\":[{".Trim(); + jStr += " \r\n\"parentSpecId\":0,".Trim(); + jStr += " \r\n\"parentSpecName\":\"\",".Trim(); + jStr += " \r\n\"specId\":0,".Trim(); + jStr += " \r\n\"specName\":\"\"".Trim(); + jStr += " \r\n}],".Trim(); + + + jStr += " \r\n\"productSkuReqs\":[".Trim(); + + foreach (var sku in prodInfo.productSkcList.FirstOrDefault().productSkuList) + { + jStr += " \r\n{".Trim(); + + //productSkuSpecReqs + jStr += " \r\n\"productSkuSpecReqs\":[".Trim(); + foreach (var spec in sku.productSkuSpecList) + { + jStr += "{"; + jStr += "\"parentSpecId\":" + spec.parentSpecId + ","; + jStr += "\"parentSpecName\":\"" + spec.parentSpecName + "\","; + jStr += "\"specId\":" + spec.specId + ","; + jStr += "\"specName\":\"" + spec.specName + "\","; + var specProp = prodInfo.productSpecPropertyVOS.FirstOrDefault(p => p.parentSpecId == spec.parentSpecId); + if (!string.IsNullOrEmpty(specProp?.valueGroupId.ParseToString())) + jStr += "\"groupId\":" + specProp?.valueGroupId.ParseToString() + ","; + if (!string.IsNullOrEmpty(specProp?.vid.ParseToString())) + jStr += "\"vid\":" + specProp?.vid.ParseToString() + ","; + jStr = jStr.TrimEnd(','); + jStr += "},"; + } + jStr = jStr.TrimEnd(','); + jStr += " \r\n],".Trim(); + + //productSkuWhExtAttrReq + jStr += "\"productSkuWhExtAttrReq\":{"; + jStr += " \"productSkuWeightReq\":{\"value\":" + weight + "},"; + jStr += " \"productSkuVolumeReq\":{"; + jStr += " \"len\":" + len + ","; + jStr += " \"width\":" + width + ","; + jStr += " \"height\":" + height; + jStr += " }"; + jStr += "},"; + + //productSkuMultiPackReq + jStr += "\"productSkuMultiPackReq\":{"; + jStr += " \"skuClassification\":1,"; + jStr += " \"numberOfPieces\":" + numberOfPieces + ","; + jStr += " \"pieceUnitCode\":" + Math.Max(1, sku.productSkuMultiPack.pieceUnitCode.ParseToInt()) + ","; + jStr += " \"productSkuNetContentReq\":{"; + jStr += " },"; + jStr += " \"individuallyPacked\":-1"; + jStr += "},"; + + //productSkuAccessoriesReq + jStr += "\"productSkuAccessoriesReq\":{"; + jStr += "\"productSkuAccessories\":["; + jStr += "]"; + jStr += "}"; + + jStr += " \r\n},".Trim(); + } + jStr = jStr.TrimEnd(','); + jStr += " \r\n]".Trim(); + + jStr += "\r\n}]"; + jStr += "\r\n}"; + + var jStrObj = JObject.Parse(jStr); + jStr = JsonHelper.SerializeObject(jStrObj); + + html = AdminProductPriceCheckForm.editPriceProductSizeAndNumber(shop, taskUid.ParseToString(), price.productId.ParseToString(), jStr); + Thread.Sleep(Randomx.GetId(25, 75)); + commonSleep(); + if (html.Contains("\"success\":true")) + { + Invoke(new Action(() => + { + foreach (var row in rows) + row.Cells["colMsg"].Value = "调整订单成功"; + })); + return "修改成功"; + } + else + { + if (html.Contains("登录过期") || html.Contains("Invalid Login State")) + { + this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + Invoke(new Action(() => + { + displayShopStatus(shop); + })); + } + string sErrMsg = BaseRegex.GetStringJson(ref html, "errorMsg").ParseToString(); + if (string.IsNullOrEmpty(sErrMsg)) + sErrMsg = BaseRegex.GetStringJson(ref html, "error_msg").ParseToString(); + if (string.IsNullOrEmpty(sErrMsg)) + sErrMsg = html; + Invoke(new Action(() => + { + foreach (var row in rows) + row.Cells["colMsg"].Value = "修改请求失败 " + sErrMsg; + })); + return "修改请求失败 " + sErrMsg;//continue; + } + } + catch (Exception ex) + { + Invoke(new Action(() => + { + foreach (var row in rows) + row.Cells["colMsg"].Value = "修改请求失败 " + ex.Message; + })); + return "修改请求失败 " + ex.Message; //continue; + } + //return ""; + } + + bool checkNeedRestoreSizeAndNumber(TemuForChainProductInfo info) + { + //最长边:60 - 100 cm//生成时需转换为mm + //次长边:60 - 90 cm//生成时需转换为mm + //最短边:50 - 80 cm//生成时需转换为mm + //重量:80000 - 99999g //生成时需转换为mg + var skc = info.skcList.FirstOrDefault(); + //长宽高少于15且重量小于1000克认为是有意改大了参数需要还原 + if (skc.skuList.Any(s => (s.len < numJudgeLen.Value * 10 || s.width < numJudgeLen.Value * 10 || s.height < numJudgeLen.Value * 10) && s.weight < numJudgeWeight.Value * 1000)) + return true; + return false; + } + void CheckShopLogin(ShopLoginInfo[] shops, bool isShowProgress) + { + if (!IsClientJit) + AdminShopListForm.Instance.CheckShopLogin(shops, isShowProgress); + else + ShopListForm.Instance.CheckShopLogin(shops, isShowProgress); + } + public static int sleepTime = 300; + void commonSleep() + { + Thread.Sleep(sleepTime); + } + } +} diff --git a/TEMUKJD/KJDForms/JITForms/JitPushOrder.resx b/TEMUKJD/KJDForms/JITForms/JitPushOrder.resx new file mode 100644 index 0000000..53ac99b --- /dev/null +++ b/TEMUKJD/KJDForms/JITForms/JitPushOrder.resx @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ProductForms/JoinDeliveryForm.cs b/TEMUKJD/KJDForms/ProductForms/JoinDeliveryForm.cs index e14fc60..6180dda 100644 --- a/TEMUKJD/KJDForms/ProductForms/JoinDeliveryForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/JoinDeliveryForm.cs @@ -1,6 +1,7 @@ using AllBase; using AllBase.Helper; using AllBase.Model.Result; +using NaiBa.Util; using NaiBa.Util.Extension; using Newtonsoft.Json.Linq; using System; @@ -28,11 +29,11 @@ namespace TemuKJD.KJDForms.ProductForms JoinDeliveryConfig joinDeliveryConfig = null; public bool IsAdmin = false; public CancellationTokenSource cancellationTokenSource { get; set; } = null; - public List lstAdminShopInfo { get; set; } = new List(); + public ConcurrentList lstAdminShopInfo { get; set; } = new ConcurrentList(); /// /// 备货单列表 /// - List lstStockInfo = new List(); + ConcurrentList lstStockInfo = new ConcurrentList(); public JoinDeliveryForm() { diff --git a/TEMUKJD/KJDForms/ProductForms/ProductChangePriceForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/ProductChangePriceForm.Designer.cs index 06f348f..29fa27e 100644 --- a/TEMUKJD/KJDForms/ProductForms/ProductChangePriceForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/ProductChangePriceForm.Designer.cs @@ -121,10 +121,10 @@ namespace TemuKJD.KJDForms.ProductForms this.splitContainer1.TabIndex = 37; this.splitContainer1.TabStop = false; // - // txtNotes + // txtReason // this.txtReason.Location = new System.Drawing.Point(69, 42); - this.txtReason.Name = "txtNotes"; + this.txtReason.Name = "txtReason"; this.txtReason.Size = new System.Drawing.Size(347, 23); this.txtReason.TabIndex = 472; // @@ -325,6 +325,7 @@ namespace TemuKJD.KJDForms.ProductForms this.dgvOrder.AllowUserToDeleteRows = false; dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; this.dgvOrder.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvOrder.AutoRowNumber = true; this.dgvOrder.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dgvOrder.BackgroundColor = System.Drawing.Color.White; this.dgvOrder.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -434,6 +435,7 @@ namespace TemuKJD.KJDForms.ProductForms // this.colType.HeaderText = "申报价格类型"; this.colType.Name = "colType"; + this.colType.ReadOnly = true; // // colSkuPrice // @@ -455,6 +457,7 @@ namespace TemuKJD.KJDForms.ProductForms // this.colUseArea.HeaderText = "调整后申报价格适用范围"; this.colUseArea.Name = "colUseArea"; + this.colUseArea.ReadOnly = true; // // colAvailableBalance // diff --git a/TEMUKJD/KJDForms/ProductForms/ProductChangePriceForm.cs b/TEMUKJD/KJDForms/ProductForms/ProductChangePriceForm.cs index f0848e0..2042362 100644 --- a/TEMUKJD/KJDForms/ProductForms/ProductChangePriceForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/ProductChangePriceForm.cs @@ -92,8 +92,11 @@ namespace TemuKJD.KJDForms.ProductForms { pbLoading.Visible = false; })); + if (IsAuto) { + if (!string.IsNullOrEmpty(ErrMsg)) + return; SaveNewPrice(); } }); @@ -156,7 +159,7 @@ namespace TemuKJD.KJDForms.ProductForms try { var jObj = JObject.Parse(adjustRst); - var objStr = JsonHelper.SerializeObject( jObj["result"]); + var objStr = JsonHelper.SerializeObject(jObj["result"]); var adjustPriceInfo = JsonHelper.DeserializeJsonToObject(objStr); foreach (var item in adjustPriceInfo.spuAdjustResult[productId].skcItems[0].items) @@ -325,12 +328,18 @@ namespace TemuKJD.KJDForms.ProductForms if (shop == null || productId.IsNullOrEmpty() || skcId.IsNullOrEmpty() || productName.IsNullOrEmpty()) { - BaseMsgForm.ShowError("店铺商品信息为空!"); + if (IsAuto) + ErrMsg = "店铺商品信息为空!"; + else + BaseMsgForm.ShowError("店铺商品信息为空!"); return; } if (!dgvOrder.Rows.Cast().Any(r => r.Cells["colSelect"].Value.ParseToBool() == true)) { - BaseMsgForm.ShowError("请至少勾选一项!"); // todo + if (IsAuto) + ErrMsg = "请至少勾选一项!" + dgvOrder.Rows.Cast().Count(); + else + BaseMsgForm.ShowError("请至少勾选一项!"); // todo,查找自动设置出现次错误原因 return; } foreach (DataGridViewRow r in dgvOrder.Rows) @@ -339,7 +348,10 @@ namespace TemuKJD.KJDForms.ProductForms { if (r.Cells["colSkuNewPrice"].Value.ParseToDecimal() == 0) { - BaseMsgForm.ShowError("请输入合理的新申报价格!"); + if (IsAuto) + ErrMsg = "请输入合理的新申报价格!"; + else + BaseMsgForm.ShowError("请输入合理的新申报价格!"); return; } } diff --git a/TEMUKJD/KJDForms/ProductForms/TemuJitForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/TemuJitForm.Designer.cs index 03ebdc4..903d000 100644 --- a/TEMUKJD/KJDForms/ProductForms/TemuJitForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/TemuJitForm.Designer.cs @@ -114,10 +114,6 @@ namespace TemuKJD.KJDForms.ProductForms this.btnClose = new DevComponents.DotNetBar.PanelEx(); this.pbLoading = new System.Windows.Forms.PictureBox(); this.dgvOpenJit = new TemuKJD.UserComponent.DataGridViewEx(); - this.splitContainer4 = new System.Windows.Forms.SplitContainer(); - this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); - this.btnClear = new DevComponents.DotNetBar.PanelEx(); - this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colProdIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colOrderId = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -140,6 +136,10 @@ namespace TemuKJD.KJDForms.ProductForms this.colStock = new System.Windows.Forms.DataGridViewLinkColumn(); this.colRecevieArea = new System.Windows.Forms.DataGridViewLinkColumn(); this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.splitContainer4 = new System.Windows.Forms.SplitContainer(); + this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); + this.btnClear = new DevComponents.DotNetBar.PanelEx(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -1198,76 +1198,6 @@ namespace TemuKJD.KJDForms.ProductForms this.dgvOpenJit.TabIndex = 187; this.dgvOpenJit.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvOpenJit_CellContentClick); // - // splitContainer4 - // - this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; - this.splitContainer4.Location = new System.Drawing.Point(0, 0); - this.splitContainer4.Name = "splitContainer4"; - // - // splitContainer4.Panel1 - // - this.splitContainer4.Panel1.Controls.Add(this.ucSplitPage1); - // - // splitContainer4.Panel2 - // - this.splitContainer4.Panel2.Controls.Add(this.btnClear); - this.splitContainer4.Panel2.Controls.Add(this.statusBar); - this.splitContainer4.Size = new System.Drawing.Size(1584, 26); - this.splitContainer4.SplitterDistance = 282; - this.splitContainer4.TabIndex = 3; - // - // ucSplitPage1 - // - this.ucSplitPage1.CurrentPage = 1; - this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Left; - this.ucSplitPage1.IsShowPageSize = false; - this.ucSplitPage1.Location = new System.Drawing.Point(0, 0); - this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); - this.ucSplitPage1.Name = "ucSplitPage1"; - this.ucSplitPage1.PageSize = 50; - this.ucSplitPage1.Size = new System.Drawing.Size(282, 26); - this.ucSplitPage1.TabIndex = 5; - this.ucSplitPage1.TotalPage = 1; - this.ucSplitPage1.PageChange += new System.Action(this.ucSplitPage1_PageChange); - // - // btnClear - // - this.btnClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnClear.DisabledBackColor = System.Drawing.Color.Empty; - this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnClear.Location = new System.Drawing.Point(1204, 0); - this.btnClear.Name = "btnClear"; - this.btnClear.Size = new System.Drawing.Size(90, 21); - this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnClear.Style.GradientAngle = 90; - this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.btnClear.TabIndex = 440; - this.btnClear.Text = "清空结果"; - this.btnClear.Visible = false; - // - // statusBar - // - this.statusBar.BackColor = System.Drawing.Color.White; - this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; - this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.statusBar.Location = new System.Drawing.Point(0, 0); - this.statusBar.Margin = new System.Windows.Forms.Padding(0); - this.statusBar.Name = "statusBar"; - this.statusBar.Size = new System.Drawing.Size(1298, 26); - this.statusBar.TabIndex = 2; - // // colCheck // this.colCheck.HeaderText = "选择"; @@ -1448,6 +1378,76 @@ namespace TemuKJD.KJDForms.ProductForms this.colMsg.ReadOnly = true; this.colMsg.Width = 180; // + // splitContainer4 + // + this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer4.Location = new System.Drawing.Point(0, 0); + this.splitContainer4.Name = "splitContainer4"; + // + // splitContainer4.Panel1 + // + this.splitContainer4.Panel1.Controls.Add(this.ucSplitPage1); + // + // splitContainer4.Panel2 + // + this.splitContainer4.Panel2.Controls.Add(this.btnClear); + this.splitContainer4.Panel2.Controls.Add(this.statusBar); + this.splitContainer4.Size = new System.Drawing.Size(1584, 26); + this.splitContainer4.SplitterDistance = 321; + this.splitContainer4.TabIndex = 3; + // + // ucSplitPage1 + // + this.ucSplitPage1.CurrentPage = 1; + this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Left; + this.ucSplitPage1.IsShowPageSize = false; + this.ucSplitPage1.Location = new System.Drawing.Point(0, 0); + this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); + this.ucSplitPage1.Name = "ucSplitPage1"; + this.ucSplitPage1.PageSize = 50; + this.ucSplitPage1.Size = new System.Drawing.Size(321, 26); + this.ucSplitPage1.TabIndex = 5; + this.ucSplitPage1.TotalPage = 1; + this.ucSplitPage1.PageChange += new System.Action(this.ucSplitPage1_PageChange); + // + // btnClear + // + this.btnClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnClear.DisabledBackColor = System.Drawing.Color.Empty; + this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnClear.Location = new System.Drawing.Point(1165, 0); + this.btnClear.Name = "btnClear"; + this.btnClear.Size = new System.Drawing.Size(90, 21); + this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.Style.GradientAngle = 90; + this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.TabIndex = 440; + this.btnClear.Text = "清空结果"; + this.btnClear.Visible = false; + // + // statusBar + // + this.statusBar.BackColor = System.Drawing.Color.White; + this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; + this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.statusBar.Location = new System.Drawing.Point(0, 0); + this.statusBar.Margin = new System.Windows.Forms.Padding(0); + this.statusBar.Name = "statusBar"; + this.statusBar.Size = new System.Drawing.Size(1259, 26); + this.statusBar.TabIndex = 2; + // // TemuJitForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; diff --git a/TEMUKJD/KJDForms/ProductForms/TemuJitForm.cs b/TEMUKJD/KJDForms/ProductForms/TemuJitForm.cs index ff81800..74cabd1 100644 --- a/TEMUKJD/KJDForms/ProductForms/TemuJitForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/TemuJitForm.cs @@ -1,6 +1,7 @@ using AllBase; using AllBase.Helper; using AllBase.Model.Result; +using NaiBa.Util; using NaiBa.Util.Extension; using Newtonsoft.Json.Linq; using System; @@ -30,27 +31,27 @@ namespace TemuKJD.KJDForms.ProductForms { public bool IsClientJit { get; set; } = false; public CancellationTokenSource cancellationTokenSource { get; set; } = null; - public List lstAdminShopInfo { get; set; } = new List(); + public ConcurrentList lstAdminShopInfo { get; set; } = new ConcurrentList(); /// /// 生命周期商品列表 /// - public List lstChainProdInfo = new List(); + public ConcurrentList lstChainProdInfo = new ConcurrentList(); /// /// 商品合规信息列表 /// - public List lstComplianceInfo = new List(); + public ConcurrentList lstComplianceInfo = new ConcurrentList(); /// /// 实拍图 /// - public List lstRealPictureInfo = new List(); + public ConcurrentList lstRealPictureInfo = new ConcurrentList(); /// /// 商品信息(含虚拟库存)列表 /// - public List lstProductInfo = new List(); + public ConcurrentList lstProductInfo = new ConcurrentList(); /// /// 期望到货区域列表 /// - public List lstReceiveArea = new List(); + public ConcurrentList lstReceiveArea = new ConcurrentList(); /// /// 界面参数配置 @@ -2468,6 +2469,7 @@ Content-Disposition: form-data; name=""upload_sign"" public string SearchNotes { get; set; } = ""; public bool SearchAllShop { get; set; } = true; public string SearchSpuId { get; set; } = ""; + public string SearchSkcId { get; set; } = ""; public string SearchExtCode { get; set; } = ""; public bool SearchDuration { get; set; } = true; } diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs index 331d9f7..77dce97 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs @@ -28,6 +28,7 @@ using TemuKJD.BLL; using TemuKJD.ToolForms; using AllBase.Model.Result.TemuResult.TemuSizeConfigResult; using AllBase.Model.Result.TemuResult; +using NaiBa.Util; namespace TemuKJD.KJDForms.ProductSelectForms { @@ -39,8 +40,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms List skuRandomLetterArr = new List { "~", "#", "¥", "%", "&", "*", "(", ")", "(", ")", "+", "-", "_", "=", "【", "】", "·", "|", "《", "》" }; NaiBa.Util.ConcurrentList lstAdminTemuDBProductSelect = new NaiBa.Util.ConcurrentList(); - List shopLst = new List(); - List lstDbPrice = new List(); + public ConcurrentList lstCateSizeWeightConfig = new ConcurrentList(); + ConcurrentList shopLst = new ConcurrentList(); + ConcurrentList lstDbPrice = new ConcurrentList(); List lstCustomImg = new List(); Dictionary dicCustomImg = new Dictionary(); List lstExtCodeFleeceInShoes = new List() { @@ -148,8 +150,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms else { ucSplitPage1.cmbPageSize.Items.Remove("5000"); - ucSplitPage1.cmbPageSize.Items.Remove("2000"); - ucSplitPage1.cmbPageSize.Items.Remove("1000"); + //ucSplitPage1.cmbPageSize.Items.Remove("2000"); + //ucSplitPage1.cmbPageSize.Items.Remove("1000"); } if (BaseClass.SaLevel == 1 && !IsClientJit) @@ -282,7 +284,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.ucSplitPage1.TotalPage = pageCount; var shopIdLst = list.Select(p => p.shop_id).Distinct().ToList(); - shopLst = ShopBLL.AdminGetServerShopLstByIds(shopIdLst); + shopLst.Clear(); + shopLst.AddRange(ShopBLL.AdminGetServerShopLstByIds(shopIdLst)); //if (defaultBitmap == null) // defaultBitmap = new Bitmap(80, 80); @@ -509,9 +512,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms break; case "进店": { + var shop = GetShop(shopId); if (!IsClientJit) { - var shop = GetShop(shopId); AdminShopLoginForm adminLoginForm = new AdminShopLoginForm(shop); //adminLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product/draft"; adminLoginForm.InitUrl = "https://agentseller.temu.com/goods/draft"; @@ -519,25 +522,41 @@ namespace TemuKJD.KJDForms.ProductSelectForms adminLoginForm.WindowState = FormWindowState.Maximized; adminLoginForm.ShowDialog(); } + else + { + ShopLoginForm adminLoginForm = new ShopLoginForm(shop); + //adminLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product/draft"; + adminLoginForm.InitUrl = "https://agentseller.temu.com/goods/draft"; + adminLoginForm.openType = EnumOpenType.manage; + adminLoginForm.WindowState = FormWindowState.Maximized; + adminLoginForm.ShowDialog(); + } } break; case "登录": { + var shop = GetShop(shopId); + // 登录店铺 if (!IsClientJit) { - var shop = GetShop(shopId); - // 登录店铺 AdminShopLoginForm shopLoginForm = new AdminShopLoginForm(shop); shopLoginForm.openType = EnumOpenType.login; shopLoginForm.SaveComplete += ShopLoginForm_SaveComplete; shopLoginForm.ShowDialog(); - foreach (DataGridViewRow row in this.dgvSelectProduct.Rows) + } + else + { + ShopLoginForm shopLoginForm = new ShopLoginForm(shop); + shopLoginForm.openType = EnumOpenType.login; + shopLoginForm.SaveComplete += ShopLoginForm_SaveComplete; + shopLoginForm.ShowDialog(); + } + foreach (DataGridViewRow row in this.dgvSelectProduct.Rows) + { + if (row.Cells["colSupplierId"].Value.ParseToString() == shop.ShopId) { - if (row.Cells["colSupplierId"].Value.ParseToString() == shop.ShopId) - { - row.Cells["colLogin"].Value = shop.LoginStatus2 == "国际版在线" ? "在线" : "登录"; - displayLoginStatusColor(row.Cells["colLogin"], row.Cells["colLogin"].Value.ParseToString()); - } + row.Cells["colLogin"].Value = shop.LoginStatus2 == "国际版在线" ? "在线" : "登录"; + displayLoginStatusColor(row.Cells["colLogin"], row.Cells["colLogin"].Value.ParseToString()); } } } @@ -639,17 +658,25 @@ namespace TemuKJD.KJDForms.ProductSelectForms ShopLoginInfo GetShop(string shopId) { - var shop = shopLst.FirstOrDefault(s => s.ShopId == shopId); - if (shop == null) + ShopLoginInfo shop; + if (IsClientJit) { - shop = AdminGetServerShop(shopId); + shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId); + } + else + { + shop = shopLst.FirstOrDefault(s => s.ShopId == shopId); if (shop == null) { - shop = new ShopLoginInfo() { ShopId = shopId }; - shop.LoginStatus = "不存在"; + shop = AdminGetServerShop(shopId); } - shopLst.Add(shop); } + if (shop == null) + { + shop = new ShopLoginInfo() { ShopId = shopId }; + shop.LoginStatus = "不存在"; + } + shopLst.Add(shop); return shop; } @@ -762,18 +789,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms continue; } - var shop = shopLst.FirstOrDefault(s => s.ShopId == prod.shop_id); - if (shop == null) - { - shop = AdminGetServerShop(prod.shop_id); - if (shop == null) - { - shop = new ShopLoginInfo() { ShopId = prod.shop_id }; - shop.LoginStatus = "不存在"; - } - shopLst.Add(shop); - } - + var shop = GetShop(prod.shop_id); if (shop.LoginStatus != "登录成功") { Invoke(new Action(() => @@ -837,7 +853,10 @@ namespace TemuKJD.KJDForms.ProductSelectForms if (result.Contains("登录过期") || result.Contains("Invalid Login State")) { - AdminShopListForm.Instance.CheckShopLogin(shopLst.Where(s => s.LoginName == shop.LoginName).ToArray(), false); + if (!IsClientJit) + AdminShopListForm.Instance.CheckShopLogin(shopLst.Where(s => s.LoginName == shop.LoginName).ToArray(), false); + else + ShopListForm.Instance.CheckShopLogin(shopLst.Where(s => s.LoginName == shop.LoginName).ToArray(), false); } } catch (Exception ex) @@ -1627,13 +1646,132 @@ namespace TemuKJD.KJDForms.ProductSelectForms int numberOfPieces = 1; // 单品数量 if (chkChangeSizeAndNumber.Checked) // 修改包装尺寸和单品数量 { - len = Randomx.GetId(numLen1.Value.ParseToInt(), numLen2.Value.ParseToInt()+1); + len = Randomx.GetId(numLen1.Value.ParseToInt(), numLen2.Value.ParseToInt() + 1); width = Randomx.GetId(numWidth1.Value.ParseToInt(), Math.Min(len, numWidth2.Value.ParseToInt() + 1)); height = Randomx.GetId(numHeight1.Value.ParseToInt(), Math.Min(width, numHeight2.Value.ParseToInt() + 1)); weight = Randomx.GetId(numWeight1.Value.ParseToInt(), numWeight2.Value.ParseToInt() + 1); + len *= 10; + width *= 10; + height *= 10; + weight *= 1000; numberOfPieces = Randomx.GetId(numUnitNum1.Value.ParseToInt(), numUnitNum2.Value.ParseToInt()); + + var cateSizeWeightConfig = lstCateSizeWeightConfig.FirstOrDefault(c => c.catId == catId.ToString()); + if (cateSizeWeightConfig == null) + { + var url = BaseClass.BuildObjString("product/get_cate_size_weight_config_v2"); + var data = UserLogin.GetSignaturex() + + "&cat_id=" + catId; + html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + if (!string.IsNullOrEmpty(html) && html.Contains("\"code\":200")) + { + try + { + var jArr = JObject.Parse(html)["data"]; + cateSizeWeightConfig = JsonHelper.DeserializeJsonToObject(jArr.ToString()); + if (cateSizeWeightConfig != null) + lstCateSizeWeightConfig.Add(cateSizeWeightConfig); + } + catch { } + } + } + + if (cateSizeWeightConfig == null) + { + //查询接口尺寸重量限制 + html = ""; + html = queryProductSizeAndWeightConfig(shop, prodParam.productDraftId.ParseToString(), catId.ParseToString()); + var html1 = queryCatSizeAndWeightConfig(shop, prodParam.productDraftId.ParseToString(), catId.ParseToString()); + if (!string.IsNullOrEmpty(html1) && html1.Contains("length")) + html = html1; + //{"success":true,"errorCode":1000000,"errorMsg":null,"result":{"common":{"operatorId":null,"operatorName":null,"operatorType":null,"checkSideRelation":false,"noticeSideEquation":false,"length":{"min":10,"max":2999},"width":{"min":5,"max":2999},"height":{"min":2,"max":2999},"weight":{"min":2000,"max":99999000}}}} + Thread.Sleep(Randomx.GetId(50, 100)); + if (html.Contains("\"success\":true")) + { + try + { + JObject jObj = JObject.Parse(html); + cateSizeWeightConfig = new CateSizeWeightConfig() { catId = catId.ToString() }; + if (html.Contains("common")) + { + cateSizeWeightConfig.minLen = jObj["result"]["common"]["length"]["min"].ParseToInt(); + cateSizeWeightConfig.maxLen = jObj["result"]["common"]["length"]["max"].ParseToInt(); + cateSizeWeightConfig.minWidth = jObj["result"]["common"]["width"]["min"].ParseToInt(); + cateSizeWeightConfig.maxWidth = jObj["result"]["common"]["width"]["max"].ParseToInt(); + cateSizeWeightConfig.minHeight = jObj["result"]["common"]["height"]["min"].ParseToInt(); + cateSizeWeightConfig.maxHeight = jObj["result"]["common"]["height"]["max"].ParseToInt(); + cateSizeWeightConfig.minWeight = jObj["result"]["common"]["weight"]["min"].ParseToInt(); + cateSizeWeightConfig.maxWeight = jObj["result"]["common"]["weight"]["max"].ParseToInt(); + } + else + { + cateSizeWeightConfig.minLen = jObj["result"]["length"]["min"].ParseToInt(); + cateSizeWeightConfig.maxLen = jObj["result"]["length"]["max"].ParseToInt(); + cateSizeWeightConfig.minWidth = jObj["result"]["width"]["min"].ParseToInt(); + cateSizeWeightConfig.maxWidth = jObj["result"]["width"]["max"].ParseToInt(); + cateSizeWeightConfig.minHeight = jObj["result"]["height"]["min"].ParseToInt(); + cateSizeWeightConfig.maxHeight = jObj["result"]["height"]["max"].ParseToInt(); + cateSizeWeightConfig.minWeight = jObj["result"]["weight"]["min"].ParseToInt(); + cateSizeWeightConfig.maxWeight = jObj["result"]["weight"]["max"].ParseToInt(); + } + lstCateSizeWeightConfig.Add(cateSizeWeightConfig); + + var url = BaseClass.BuildObjString("product/add_cate_size_weight_config_v2"); + var data = UserLogin.GetSignaturex(); + data += "&cat_id=" + catId; + data += "&minLen=" + cateSizeWeightConfig.minLen; + data += "&maxLen=" + cateSizeWeightConfig.maxLen; + data += "&minWidth=" + cateSizeWeightConfig.minWidth; + data += "&maxWidth=" + cateSizeWeightConfig.maxWidth; + data += "&minHeight=" + cateSizeWeightConfig.minHeight; + data += "&maxHeight=" + cateSizeWeightConfig.maxHeight; + data += "&minWeight=" + cateSizeWeightConfig.minWeight; + data += "&maxWeight=" + cateSizeWeightConfig.maxWeight; + html = GetHtml.PostUtf8(url, data); + } + catch { } + } + else + { + //if (html.Contains("登录过期") || html.Contains("Invalid Login State")) + //{ + // this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + // //Invoke(new Action(() => + // //{ + // // displayShopStatus(shop); + // //})); + //} + //string sErrMsg = BaseRegex.GetStringJson(ref html, "errorMsg").ParseToString(); + //if (string.IsNullOrEmpty(sErrMsg)) + // sErrMsg = BaseRegex.GetStringJson(ref html, "error_msg").ParseToString(); + //if (string.IsNullOrEmpty(sErrMsg)) + // sErrMsg = html; + //Invoke(new Action(() => + //{ + // foreach (var row in rows) + // row.Cells["colMsg"].Value = "修改请求失败 " + sErrMsg; + //})); + //return; //continue; + } + } + + if (cateSizeWeightConfig != null) + { + // 设置长宽高 + if (len < cateSizeWeightConfig.minLen) len = cateSizeWeightConfig.minLen; + if (len > cateSizeWeightConfig.maxLen) len = cateSizeWeightConfig.maxLen; + if (width < cateSizeWeightConfig.minWidth) width = cateSizeWeightConfig.minWidth; + if (width > cateSizeWeightConfig.maxWidth) width = cateSizeWeightConfig.maxWidth; + if (height < cateSizeWeightConfig.minHeight) height = cateSizeWeightConfig.minHeight; + if (height > cateSizeWeightConfig.maxHeight) height = cateSizeWeightConfig.maxHeight; + if (weight < cateSizeWeightConfig.minWeight) weight = cateSizeWeightConfig.minWeight; + if (weight > cateSizeWeightConfig.maxWeight) weight = cateSizeWeightConfig.maxWeight; + } } + int skuCount = 0; //foreach (var skuInfo in skcInfo.productSkuList) NaiBa.Util.ConcurrentList skuListTmp = new NaiBa.Util.ConcurrentList(); @@ -1829,10 +1967,10 @@ namespace TemuKJD.KJDForms.ProductSelectForms if (chkChangeSizeAndNumber.Checked) // 修改包装尺寸和单品数量 { - skuItem.productSkuWhExtAttrReq.productSkuVolumeReq.len = len * 10; - skuItem.productSkuWhExtAttrReq.productSkuVolumeReq.width = width * 10; - skuItem.productSkuWhExtAttrReq.productSkuVolumeReq.height = height * 10; - skuItem.productSkuWhExtAttrReq.productSkuWeightReq.value = weight * 1000; + skuItem.productSkuWhExtAttrReq.productSkuVolumeReq.len = len; + skuItem.productSkuWhExtAttrReq.productSkuVolumeReq.width = width; + skuItem.productSkuWhExtAttrReq.productSkuVolumeReq.height = height; + skuItem.productSkuWhExtAttrReq.productSkuWeightReq.value = weight; } skuItem.supplierPrice = skuInfo.supplierPrice; // 按照批号原价取商品原价和加价规则并修改商品上传价格 @@ -2831,6 +2969,22 @@ namespace TemuKJD.KJDForms.ProductSelectForms return HttpResponseBLL.PostResponse2(shop, url, body, refere); } + private string queryProductSizeAndWeightConfig(ShopLoginInfo shop, string productId, string catId) + { + string url = "https://agentseller.temu.com/anniston-agent-seller/product/check/common/queryConfig"; + string body = "{}"; + string referer = "https://agentseller.temu.com/goods/edit?productDraftId=" + productId + "&from=productDraftList"; + return HttpResponseBLL.PostResponse2(shop, url, body, referer); + } + private string queryCatSizeAndWeightConfig(ShopLoginInfo shop, string productId, string catId) + { + string url = "https://agentseller.temu.com/anniston-agent-seller/product/check/common/queryConfig"; + url = "https://agentseller.temu.com/anniston-agent-seller/product/check/cat/queryConfig"; + string body = @"{""catId"":" + catId + "}"; + string referer = "https://agentseller.temu.com/goods/edit?productDraftId=" + productId + "&from=productDraftList"; + return HttpResponseBLL.PostResponse2(shop, url, body, referer); + } + private string GetCatPathList(ShopLoginInfo shop, string draftId, string catId) { string url = "https://agentseller.temu.com/anniston-agent-seller/category/path/list";