1代理改名字 2代理管理功能 3订单流水统计功能(方便报税) 4 商品预售界面-商品改价支持加减乘除四种模式
This commit is contained in:
1 parent
457a8acee6
commit
ba502650ab
69 files changed
+27720
-720
No files matched your search
@@ -187,6 +187,7 @@
|
||||
<Compile Include="Model\Config\WxShopUploadInfo.cs" />
|
||||
<Compile Include="Model\Data\WXBuyUrlNotesInfo.cs" />
|
||||
<Compile Include="Model\Data\WXOrderDecryptAddressInfo.cs" />
|
||||
<Compile Include="Model\DBModel\oem.cs" />
|
||||
<Compile Include="Model\DBModel\oms_wei_external_procurement_log.cs" />
|
||||
<Compile Include="Model\DBModel\oms_wei_order.cs" />
|
||||
<Compile Include="Model\DBModel\user_payment_record.cs" />
|
||||
@@ -316,6 +317,7 @@
|
||||
<Compile Include="Model\Result\WXResult\WxOptimizeOrderWayBillInfo.cs" />
|
||||
<Compile Include="Model\Result\WXResult\WXShopDefaultAddressInfo.cs" />
|
||||
<Compile Include="Model\Result\WXResult\WXShopTokenInfo.cs" />
|
||||
<Compile Include="Model\Result\WXResult\WxTaxMoneyInfo.cs" />
|
||||
<Compile Include="MultiThreadClient.cs" />
|
||||
<Compile Include="OutExcel.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace AllBase
|
||||
@@ -72,5 +73,54 @@ namespace AllBase
|
||||
{
|
||||
return DecodeBase64(Encoding.UTF8, result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 文件转Base64编码
|
||||
/// </summary>
|
||||
/// <param name="fileName">文件全路径</param>
|
||||
/// <returns></returns>
|
||||
public static string DocumentToBase64Str(string fileName)
|
||||
{
|
||||
FileStream filestream = new FileStream(fileName, FileMode.Open);
|
||||
|
||||
byte[] bt = new byte[filestream.Length];
|
||||
//调用read读取方法
|
||||
filestream.Read(bt, 0, bt.Length);
|
||||
string base64Str = Convert.ToBase64String(bt);
|
||||
filestream.Close();
|
||||
return base64Str;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Base64字符串转文件并保存
|
||||
/// </summary>
|
||||
/// <param name="base64String">base64字符串</param>
|
||||
/// /// <param name="fileFullPath">保存的文件路径 </param>
|
||||
/// <param name="fileName">保存的文件名</param>
|
||||
/// <returns>是否转换并保存成功</returns>
|
||||
public static bool Base64StringToFile(string base64String, string fileFullPath, string fileName)
|
||||
{
|
||||
bool opResult = false;
|
||||
try
|
||||
{
|
||||
|
||||
if (!Directory.Exists(fileFullPath))
|
||||
{
|
||||
Directory.CreateDirectory(fileFullPath);
|
||||
}
|
||||
MemoryStream stream = new MemoryStream(Convert.FromBase64String(base64String));
|
||||
FileStream fs = new FileStream(fileFullPath + "\\" + fileName, FileMode.OpenOrCreate, FileAccess.Write);
|
||||
byte[] b = stream.ToArray();
|
||||
fs.Write(b, 0, b.Length);
|
||||
fs.Close();
|
||||
|
||||
opResult = true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
return opResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
+10
-6
@@ -19,6 +19,10 @@ namespace AllBase
|
||||
public static class BaseClass
|
||||
{
|
||||
#region oem贴牌参数
|
||||
public static string OemId { get; set; } = "";
|
||||
public static string OemName { get; set; } = "";
|
||||
public static bool IsOemOwner { get; set; } = false;
|
||||
public static string AgentName { get; set; } = "";
|
||||
public static string AgentCode { get; set; } = "";
|
||||
public static bool IsShowRegister { get; set; } = true;
|
||||
public static bool IsShowOpenAccount { get; set; } = true;
|
||||
@@ -27,7 +31,7 @@ namespace AllBase
|
||||
/// <summary>
|
||||
/// 版本ID
|
||||
/// </summary>
|
||||
public static int VersionCount = 1217;
|
||||
public static int VersionCount = 1228;
|
||||
public static string MainPath = "29wx";
|
||||
//public static string MainPath = "29wx";
|
||||
//public static string MainPath = "29pdd";
|
||||
@@ -40,7 +44,6 @@ namespace AllBase
|
||||
public static string Varsion = (VersionCount / 100.0).ToString("f2");
|
||||
public static string WebbrowerUrl = "";
|
||||
public static string ToolName = "跨境达-管理工具";
|
||||
public static string AgentName = "跨境达";
|
||||
public static string ServiceQQ = "";
|
||||
public static Image LoginImage = null;
|
||||
public static Image LogoImage = null;
|
||||
@@ -107,7 +110,10 @@ namespace AllBase
|
||||
/// </summary>
|
||||
public static int OrderStep = 5;
|
||||
public static int RankPage = 3;
|
||||
public static int Balance = 0;
|
||||
public static int Points { get; set; } = 0;
|
||||
public static int ShopPointsPerMonth { get; set; } = 30;
|
||||
public static decimal Balance { get; set; } = 0;
|
||||
public static decimal PostagePerOrder { get; set; } = 2.2m;
|
||||
/// <summary>
|
||||
/// 采集最低销量
|
||||
/// </summary>
|
||||
@@ -126,7 +132,7 @@ namespace AllBase
|
||||
public static decimal MinPrice = 0;
|
||||
public static decimal MinBackMoney = 0;
|
||||
public static decimal Price = 5;
|
||||
public static int TimeOut = 45;
|
||||
public static int TimeOut = 60;
|
||||
public static int ThreadCount = 3;
|
||||
public static int MainCatId = 0;
|
||||
/// <summary>
|
||||
@@ -318,8 +324,6 @@ namespace AllBase
|
||||
public static string UserAuthority = "";
|
||||
public static string ParentAuthority = "";
|
||||
public static string ForbiddenPage = "";
|
||||
public static int Points = 0;
|
||||
public static int ShopPointsPerMonth = 30;
|
||||
public static decimal? AuthorizedAmount = null;
|
||||
/// <summary>
|
||||
/// 注册昵称
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AllBase.Model.DBModel
|
||||
{
|
||||
public class oem
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string oem_id { get; set; }
|
||||
public string oem_name { get; set; }
|
||||
public string oem_owner { get; set; }
|
||||
public string oem_icon { get; set; }
|
||||
public string oem_img { get; set; }
|
||||
public DateTime add_time { get; set; }
|
||||
public DateTime mdy_time { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -223,6 +223,11 @@ namespace AllBase.Model.Result
|
||||
/// ai客服账户信息
|
||||
/// </summary>
|
||||
public ShopAiTalkInfo shopAiTalkInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 遇到需要终止上货的提示词的重试次数。
|
||||
/// </summary>
|
||||
public int upLimitRetryCount { get; set; } = 0;
|
||||
}
|
||||
|
||||
public class AuthInfo
|
||||
@@ -293,17 +298,27 @@ namespace AllBase.Model.Result
|
||||
/// </summary>
|
||||
public int points { get; set; }
|
||||
/// <summary>
|
||||
/// 用户余额
|
||||
/// </summary>
|
||||
public decimal balance { get; set; }
|
||||
/// <summary>
|
||||
/// 店铺每续费一个月需要的积分
|
||||
/// </summary>
|
||||
public int shop_points_per_month { get; set; }
|
||||
/// <summary>
|
||||
/// 用户余额
|
||||
/// </summary>
|
||||
public decimal balance { get; set; }
|
||||
/// <summary>
|
||||
/// 历史充值总额
|
||||
/// </summary>
|
||||
public decimal recharge_amount_total { get; set; }
|
||||
/// <summary>
|
||||
/// 每一单快递费用
|
||||
/// </summary>
|
||||
public decimal postage_per_order { get; set; } = 2.2m;
|
||||
/// <summary>
|
||||
/// 子账号禁止访问的页面
|
||||
/// </summary>
|
||||
public string forbidden_page { get; set; }
|
||||
public string oem_id { get; set; }
|
||||
public string oem_name { get; set; }
|
||||
}
|
||||
|
||||
public class UserSubAccountInfo : UserAccountInfo
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AllBase.Model.Result.WXResult
|
||||
{
|
||||
public class WxTaxMoneyInfo
|
||||
{
|
||||
public string orderId { get; set; } // "3737681290916949504",
|
||||
public int? orderState { get; set; } // 30,
|
||||
public int? orderSettleState { get; set; } // 1,
|
||||
public string orderCreateTime { get; set; } // "1783732802",
|
||||
public string orderPaidTime { get; set; } // "1783732815",
|
||||
public int? orderPayMethod { get; set; } // 1,
|
||||
public int? orderType { get; set; } // 0,
|
||||
public int? mchReceivedAmount { get; set; } // 2911,
|
||||
public int? expenseAmount { get; set; } // 146,
|
||||
public int? mchSettleAmount { get; set; } // 2765,
|
||||
public int? mchSettleTime { get; set; } // "0",
|
||||
public List<TaxMoneyProductInfo> productList { get; set; }
|
||||
|
||||
public int? productTotalAmount { get; set; } // 2310,
|
||||
public int? freightAmount { get; set; } // 0,
|
||||
public int? changeDownPrice { get; set; } // 0,
|
||||
public int? mchDiscountAmount { get; set; } // 0,
|
||||
public int? scoreDiscountAmount { get; set; } // 0,
|
||||
public int? buyerPaidAmount { get; set; } // 2310,
|
||||
public int? promoterDiscountAmount { get; set; } // 0,
|
||||
public int? platformDiscountAmount { get; set; } // 0,
|
||||
public int? nationalSubsidyDiscountAmount { get; set; } // 0,
|
||||
public int? freightMakeUpAmount { get; set; } // 0,
|
||||
public int? crossShopDiscountAmount { get; set; } // 0,
|
||||
public int? platformActivityMerchantDiscountedPrice { get; set; } // 0,
|
||||
public int? crossShopSubsidyMerchantDiscountedPrice { get; set; } // 0,
|
||||
public int? buyerRefundAmount { get; set; } // 0,
|
||||
public int? platformDiscountRefundAmount { get; set; } // 0,
|
||||
public int? promoterDiscountRefundAmount { get; set; } // 0,
|
||||
public int? originalPlatformCommissionAmount { get; set; } // 46,
|
||||
public int? platformCommissionAmount { get; set; } // 46,
|
||||
public int? supplierCommissionSettleState { get; set; } // 2,
|
||||
public int? promoterCommissionSettleState { get; set; } // 2,
|
||||
public int? freightInsuranceSettleState { get; set; } // 2,
|
||||
public string platformCommissionSettleTime { get; set; } // "0",
|
||||
public int? preFreightRefundAmount { get; set; } // 0,
|
||||
|
||||
public postSettlementExpenseInfo postSettlementExpense { get; set; }
|
||||
public int? refundBeforeSettlement { get; set; } // 0,
|
||||
public int? otherExpenseAmount { get; set; } // 0,
|
||||
public int? platformCommissionSettleState { get; set; } // 1,
|
||||
public int? freightInsuranceMakeUpSettleState { get; set; } // 2,
|
||||
public int? platformDiscountTransferState { get; set; } // 0,
|
||||
public supplierPlatformCommissionInfo supplierPlatformCommission { get; set; }
|
||||
}
|
||||
|
||||
public class supplierPlatformCommissionInfo
|
||||
{
|
||||
public int? settleState { get; set; } // 2
|
||||
|
||||
}
|
||||
|
||||
public class postSettlementExpenseInfo
|
||||
{
|
||||
public int? buyerRefundAmount { get; set; } // 0,
|
||||
public int? platformDiscountRefundAmount { get; set; } // 0,
|
||||
public int? promoterRefundAmount { get; set; } // 0
|
||||
|
||||
}
|
||||
|
||||
public class TaxMoneyProductInfo
|
||||
{
|
||||
public long? productId { get; set; } // 2388347285,
|
||||
public string thumbImg { get; set; } // "https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/69db78f7000306ee1eba301382e11b15000000a100004f50",
|
||||
public List<TaxMoneyProductParamInfo> paramList { get; set; }
|
||||
public int? salePrice { get; set; } // 2310,
|
||||
public int? count { get; set; } // 1,
|
||||
public string productName { get; set; } // "中国古代算术法老版本洪丕谟著命理学研究入门风水学书籍入门居家",
|
||||
public bool? isGift { get; set; } // false
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class TaxMoneyProductParamInfo
|
||||
{
|
||||
public string key { get; set; } // "尺寸",
|
||||
public string value { get; set; } // "默认"
|
||||
}
|
||||
}
|
||||
+92
-8
@@ -1,4 +1,6 @@
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
@@ -9,10 +11,10 @@ namespace AllBase
|
||||
/// <summary>
|
||||
/// 保存数据
|
||||
/// </summary>
|
||||
/// <param name="patch"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="dt"></param>
|
||||
/// <returns></returns>
|
||||
public static bool SaveFile(string patch, DataGridView dt)
|
||||
public static bool SaveFile(string path, DataGridView dt)
|
||||
{
|
||||
string temp = "";
|
||||
for (int i = 0; i < dt.ColumnCount; i++)
|
||||
@@ -24,9 +26,9 @@ namespace AllBase
|
||||
temp += "\r\n";
|
||||
try
|
||||
{
|
||||
if (File.Exists(patch))
|
||||
File.Delete(patch);
|
||||
File.WriteAllText(patch, temp, Encoding.Unicode);
|
||||
if (File.Exists(path))
|
||||
File.Delete(path);
|
||||
File.WriteAllText(path, temp, Encoding.Unicode);
|
||||
temp = "";
|
||||
}
|
||||
catch
|
||||
@@ -45,7 +47,7 @@ namespace AllBase
|
||||
{
|
||||
try
|
||||
{
|
||||
File.AppendAllText(patch, temp, Encoding.Unicode);
|
||||
File.AppendAllText(path, temp, Encoding.Unicode);
|
||||
temp = "";
|
||||
}
|
||||
catch
|
||||
@@ -58,7 +60,7 @@ namespace AllBase
|
||||
return true;
|
||||
try
|
||||
{
|
||||
File.AppendAllText(patch, temp, Encoding.Unicode);
|
||||
File.AppendAllText(path, temp, Encoding.Unicode);
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -127,5 +129,87 @@ namespace AllBase
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool SaveFile(string path, bool isNewFile, bool isShowHideColumn, List<DataGridViewRow> dgvRows, params string[] exceptHeaderText)
|
||||
{
|
||||
if (dgvRows == null || dgvRows.Count == 0) return false;
|
||||
var dt = dgvRows.FirstOrDefault()?.DataGridView;
|
||||
if (dt == null) return false;
|
||||
|
||||
string temp = "";
|
||||
if (isNewFile)
|
||||
{
|
||||
for (int i = 0; i < dt.ColumnCount; i++)
|
||||
{
|
||||
if ((isShowHideColumn || dt.Columns[i].Visible) && !exceptHeaderText.Contains(dt.Columns[i].HeaderText))
|
||||
temp += "\"" + dt.Columns[i].HeaderText + "\"\t";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(temp))
|
||||
temp += "\r\n";
|
||||
try
|
||||
{
|
||||
|
||||
if (File.Exists(path))
|
||||
File.Delete(path);
|
||||
File.WriteAllText(path, temp, Encoding.Unicode);
|
||||
temp = "";
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < dt.RowCount; i++)
|
||||
{
|
||||
if (!dgvRows.Contains(dt.Rows[i]))
|
||||
continue;
|
||||
|
||||
for (int j = 0; j < dt.ColumnCount; j++)
|
||||
{
|
||||
if ((isShowHideColumn || dt.Columns[j].Visible) && !exceptHeaderText.Contains(dt.Columns[j].HeaderText))
|
||||
temp += "\"" + dt.Rows[i].Cells[j].Value + "\"\t";
|
||||
}
|
||||
temp += "\r\n";
|
||||
if (temp.Length > 2000)
|
||||
{
|
||||
try
|
||||
{
|
||||
File.AppendAllText(path, temp, Encoding.Unicode);
|
||||
temp = "";
|
||||
}
|
||||
catch
|
||||
{
|
||||
try
|
||||
{
|
||||
if (File.Exists(path))
|
||||
File.Delete(path);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(temp))
|
||||
return true;
|
||||
try
|
||||
{
|
||||
File.AppendAllText(path, temp, Encoding.Unicode);
|
||||
}
|
||||
catch
|
||||
{
|
||||
try
|
||||
{
|
||||
if (File.Exists(path))
|
||||
File.Delete(path);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user