上货增加用户上货 一部分配置 统一下发到用户
This commit is contained in:
1 parent
ca37be31c6
commit
65cbb347e1
9 files changed
+4124
-3364
No files matched your search
@@ -32,6 +32,7 @@ using System.Windows.Forms;
|
||||
using TemuKJD.BaseForms;
|
||||
using TemuKJD.BLL;
|
||||
using TemuKJD.Extension;
|
||||
using TemuKJD.KJDForms.SystemForms;
|
||||
using TemuKJD.PDDForms.ProductSelectForms;
|
||||
using TemuKJD.ToolForms;
|
||||
using TemuKJD.UserControls;
|
||||
@@ -86,9 +87,55 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
DataContext<WaitingProductConfig> _bs;
|
||||
|
||||
WaitingProductConfig waiting_product_config = new WaitingProductConfig();
|
||||
private UserConfig UserConfig { get; set; } = new();
|
||||
void InitUserConfig()
|
||||
{
|
||||
Task.Run(async () =>
|
||||
{
|
||||
UserConfig = await SystemUploadConfigForm.LoadConfigAsync();
|
||||
|
||||
if (UserConfig != null)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
if (UserConfig.TryGetConfig(UserConfig.UseOrderReturnWarehouseAddressKey, out UserConfig.ConfigItem addItem))
|
||||
{
|
||||
chkUseShanghaiReturnOrderAddress.Enabled = addItem.Policy != UserConfig.InheritPolicy.Locked;
|
||||
chkUseShanghaiReturnOrderAddress.Checked = addItem.Value.ParseToBool(false);
|
||||
}
|
||||
|
||||
if (UserConfig.TryGetConfig(UserConfig.SensitiveWordsKey, out UserConfig.ConfigItem filterItem))
|
||||
{
|
||||
txtReplaceText.Enabled = filterItem.Policy != UserConfig.InheritPolicy.Locked;
|
||||
|
||||
if (filterItem.Policy == UserConfig.InheritPolicy.Locked)
|
||||
{
|
||||
txtReplaceText.Enabled = false;
|
||||
txtReplaceText.Text = filterItem.Value;
|
||||
}
|
||||
else if (filterItem.Policy == UserConfig.InheritPolicy.AppendOnly)
|
||||
{
|
||||
txtReplaceText.Enabled = false;
|
||||
txtReplaceText.Text += filterItem.Value;
|
||||
}
|
||||
else if (filterItem.Policy == UserConfig.InheritPolicy.Free)
|
||||
{
|
||||
if (string.IsNullOrEmpty(txtReplaceText.Text))
|
||||
{
|
||||
txtReplaceText.Text = filterItem.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}));
|
||||
}
|
||||
});
|
||||
}
|
||||
void InitWaitingProductConfigBinding()
|
||||
{
|
||||
InitUserConfig();
|
||||
|
||||
|
||||
Debug.WriteLine($"初始化配置");
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
@@ -125,7 +172,6 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
numFilterSaleCountNum.Bind(_bs, a => a.Value, a => a.FilterSaleCountNum);
|
||||
}));
|
||||
Debug.WriteLine($"初始化配置END");
|
||||
|
||||
}
|
||||
private void UserSelectDbProductForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -1693,9 +1739,9 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
|
||||
string UploadProduct(ShopLoginInfo shop, KJDDBProduct dbProd, TemuDBProductSelect selectProd, DataGridViewCell cell, DateTime startTime)
|
||||
{
|
||||
PlatformType Platform = (dbProd.product_get_type_text.Contains("多多")
|
||||
PlatformType Platform = (dbProd.product_get_type_text.Contains("多多")
|
||||
? PlatformType.PDD :
|
||||
dbProd.product_get_type_text.Contains("微信")
|
||||
dbProd.product_get_type_text.Contains("微信")
|
||||
? PlatformType.WX :
|
||||
PlatformType.None);
|
||||
|
||||
@@ -7688,6 +7734,15 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
{
|
||||
RejectSevenDayReturn = chkRejectSevenDayReturn.Checked;
|
||||
}
|
||||
/// <summary>
|
||||
/// 刷新服务端配置
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnLoadConfig_Click(object sender, EventArgs e)
|
||||
{
|
||||
InitUserConfig();
|
||||
}
|
||||
}
|
||||
|
||||
public class WXUpload
|
||||
|
||||
Reference in new issue
Block a user