OEM 结算和用户修改OEM归属
This commit is contained in:
1 parent
8c11794884
commit
652e7bc6e1
5 files changed
+155
-73
No files matched your search
@@ -38,6 +38,9 @@
|
||||
<Compile Update="ChangeForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Extension\BindingExtensions.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Update="InitForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -187,7 +190,7 @@
|
||||
</Compile>
|
||||
<Compile Update="WXForms\ShopForms\WXShopOemWithdrawalForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
</Compile>
|
||||
<Compile Update="WXForms\ShopForms\WXShopOemRebateRecordsForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
||||
@@ -109,7 +109,8 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
if (btnOpUser.Text != "添加用户" && !string.IsNullOrEmpty(Uid))
|
||||
{
|
||||
data.Append("&id=" + Uid);
|
||||
url = BaseClass.BuildObjString("user/update_user");
|
||||
data.Append("&uu=true");
|
||||
url = BaseClass.BuildObjString("user/update_user");
|
||||
}
|
||||
string html = GetHtml.PostUtf8(url, data.ToString()).Trim();
|
||||
|
||||
|
||||
+15
-15
@@ -28,8 +28,8 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||
@@ -358,7 +358,7 @@
|
||||
this.cmbGroup.DropDownWidth = 1;
|
||||
this.cmbGroup.FormattingEnabled = true;
|
||||
this.cmbGroup.IntegralHeight = false;
|
||||
this.cmbGroup.Location = new System.Drawing.Point(385, 5);
|
||||
this.cmbGroup.Location = new System.Drawing.Point(385, 8);
|
||||
this.cmbGroup.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
|
||||
this.cmbGroup.Name = "cmbGroup";
|
||||
this.cmbGroup.Size = new System.Drawing.Size(74, 25);
|
||||
@@ -384,7 +384,7 @@
|
||||
this.cmbNotes.DropDownWidth = 1;
|
||||
this.cmbNotes.FormattingEnabled = true;
|
||||
this.cmbNotes.IntegralHeight = false;
|
||||
this.cmbNotes.Location = new System.Drawing.Point(276, 5);
|
||||
this.cmbNotes.Location = new System.Drawing.Point(276, 8);
|
||||
this.cmbNotes.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
|
||||
this.cmbNotes.Name = "cmbNotes";
|
||||
this.cmbNotes.Size = new System.Drawing.Size(74, 25);
|
||||
@@ -517,7 +517,7 @@
|
||||
this.cmbSubAccount.DropDownWidth = 1;
|
||||
this.cmbSubAccount.FormattingEnabled = true;
|
||||
this.cmbSubAccount.IntegralHeight = false;
|
||||
this.cmbSubAccount.Location = new System.Drawing.Point(506, 5);
|
||||
this.cmbSubAccount.Location = new System.Drawing.Point(506, 8);
|
||||
this.cmbSubAccount.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
|
||||
this.cmbSubAccount.Name = "cmbSubAccount";
|
||||
this.cmbSubAccount.Size = new System.Drawing.Size(74, 25);
|
||||
@@ -782,20 +782,20 @@
|
||||
//
|
||||
this.dgvShop.AllowUserToAddRows = false;
|
||||
this.dgvShop.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.dgvShop.AutoRowNumber = true;
|
||||
this.dgvShop.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
|
||||
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;
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.colSelect,
|
||||
|
||||
+46
-15
@@ -30,8 +30,8 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WXShopOemWithdrawalForm));
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
@@ -67,6 +67,7 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
this.colPayTradeNo = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
|
||||
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
|
||||
this.bt_RefreshAmount = new DevComponents.DotNetBar.PanelEx();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
@@ -136,6 +137,7 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
//
|
||||
this.ucGroupBox1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.ucGroupBox1.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
|
||||
this.ucGroupBox1.Controls.Add(this.bt_RefreshAmount);
|
||||
this.ucGroupBox1.Controls.Add(this.btnRefreshBalance);
|
||||
this.ucGroupBox1.Controls.Add(this.lblWithdrawnLabel);
|
||||
this.ucGroupBox1.Controls.Add(this.lblTotalWithdrawn);
|
||||
@@ -158,7 +160,7 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
this.btnRefreshBalance.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnRefreshBalance.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnRefreshBalance.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnRefreshBalance.Location = new System.Drawing.Point(1130, 41);
|
||||
this.btnRefreshBalance.Location = new System.Drawing.Point(1146, 41);
|
||||
this.btnRefreshBalance.Name = "btnRefreshBalance";
|
||||
this.btnRefreshBalance.Size = new System.Drawing.Size(60, 23);
|
||||
this.btnRefreshBalance.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
@@ -174,7 +176,7 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
this.btnRefreshBalance.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnRefreshBalance.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnRefreshBalance.TabIndex = 6;
|
||||
this.btnRefreshBalance.Text = "刷新";
|
||||
this.btnRefreshBalance.Text = "结算";
|
||||
this.btnRefreshBalance.Click += new System.EventHandler(this.btnRefreshBalance_Click);
|
||||
//
|
||||
// lblWithdrawnLabel
|
||||
@@ -417,20 +419,20 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
//
|
||||
this.dgvWithdrawal.AllowUserToAddRows = false;
|
||||
this.dgvWithdrawal.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvWithdrawal.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvWithdrawal.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.dgvWithdrawal.AutoRowNumber = true;
|
||||
this.dgvWithdrawal.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
|
||||
this.dgvWithdrawal.BackgroundColor = System.Drawing.Color.White;
|
||||
this.dgvWithdrawal.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.dgvWithdrawal.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
|
||||
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.dgvWithdrawal.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.dgvWithdrawal.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvWithdrawal.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.colNo,
|
||||
@@ -520,12 +522,15 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
this.ucSplitPage1.CurrentPage = 1;
|
||||
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.ucSplitPage1.IsShowPageSize = true;
|
||||
this.ucSplitPage1.IsShowTotalCount = false;
|
||||
this.ucSplitPage1.Location = new System.Drawing.Point(829, 0);
|
||||
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.ucSplitPage1.MaxPageSizeValue = 5000;
|
||||
this.ucSplitPage1.Name = "ucSplitPage1";
|
||||
this.ucSplitPage1.PageSize = 50;
|
||||
this.ucSplitPage1.Size = new System.Drawing.Size(389, 25);
|
||||
this.ucSplitPage1.TabIndex = 4;
|
||||
this.ucSplitPage1.TotalCount = ((long)(0));
|
||||
this.ucSplitPage1.TotalPage = 1;
|
||||
this.ucSplitPage1.PageChange += new System.Action<object>(this.ucSplitPage1_PageChange);
|
||||
//
|
||||
@@ -540,6 +545,31 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
this.statusBar.Size = new System.Drawing.Size(1218, 25);
|
||||
this.statusBar.TabIndex = 1;
|
||||
//
|
||||
// bt_RefreshAmount
|
||||
//
|
||||
this.bt_RefreshAmount.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.bt_RefreshAmount.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.bt_RefreshAmount.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.bt_RefreshAmount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.bt_RefreshAmount.Location = new System.Drawing.Point(694, 42);
|
||||
this.bt_RefreshAmount.Name = "bt_RefreshAmount";
|
||||
this.bt_RefreshAmount.Size = new System.Drawing.Size(60, 23);
|
||||
this.bt_RefreshAmount.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.bt_RefreshAmount.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.bt_RefreshAmount.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.bt_RefreshAmount.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.bt_RefreshAmount.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.bt_RefreshAmount.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.bt_RefreshAmount.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.bt_RefreshAmount.Style.GradientAngle = 90;
|
||||
this.bt_RefreshAmount.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.bt_RefreshAmount.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.bt_RefreshAmount.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.bt_RefreshAmount.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.bt_RefreshAmount.TabIndex = 13;
|
||||
this.bt_RefreshAmount.Text = "刷新";
|
||||
this.bt_RefreshAmount.Click += new System.EventHandler(this.bt_RefreshAmount_Click);
|
||||
//
|
||||
// WXShopOemWithdrawalForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
@@ -611,5 +641,6 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colAuditRemark;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colAuditTime;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colPayTradeNo;
|
||||
}
|
||||
private DevComponents.DotNetBar.PanelEx bt_RefreshAmount;
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ using System.Drawing;
|
||||
using System.Drawing.Printing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.Remoting.Metadata.W3cXsd2001;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
@@ -39,6 +40,7 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
|
||||
/// <summary>收款二维码图片(base64)</summary>
|
||||
private string qrCodeBase64 = "";
|
||||
private bool isSettlement = false;
|
||||
|
||||
public WXShopOemWithdrawalForm()
|
||||
{
|
||||
@@ -93,7 +95,7 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
#endregion
|
||||
|
||||
#region 数据加载
|
||||
private void WXShopOemWithdrawalForm_VisibleChanged(object sender, EventArgs e)
|
||||
private async void WXShopOemWithdrawalForm_VisibleChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.Visible && first)
|
||||
{
|
||||
@@ -103,49 +105,56 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
}
|
||||
|
||||
bool first = true;
|
||||
/// <summary>
|
||||
/// 刷新账户金额 + 提现记录
|
||||
/// </summary>
|
||||
private async Task RefreshAll()
|
||||
{
|
||||
await RefreshOMEAmount();
|
||||
GetWithdrawals(ucSplitPage1.CurrentPage);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 刷新账户统计 + 提现记录
|
||||
/// 刷新OEM钱
|
||||
/// </summary>
|
||||
private void RefreshAll()
|
||||
/// <returns></returns>
|
||||
/// <exception cref="Exception"></exception>
|
||||
private async Task RefreshOMEAmount()
|
||||
{
|
||||
LoadSummary();
|
||||
GetWithdrawals(ucSplitPage1.CurrentPage);
|
||||
var url = BaseClass.BuildObjString("user/getOemAmount");
|
||||
var data = UserLogin.GetSignPostData(new { });
|
||||
var html = await GetHtml.PostJsonAsync(url, data);
|
||||
var ret = JsonConvert.DeserializeObject<Result<oemflowsStatistics>>(html);
|
||||
if (ret.Code != 200)
|
||||
{
|
||||
throw new Exception(ret.Msg);
|
||||
}
|
||||
this.lblWithdrawable.Text = (ret.Data.AvailableBalance / 100m).ToString("F2");
|
||||
this.lblTotalRebate.Text = (ret.Data.TotalRebateAmount / 100m).ToString("F2");
|
||||
this.lblTotalWithdrawn.Text = (ret.Data.TotalWithdrawAmount / 100m).ToString("F2");
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载账户统计:可提现总额 / 历史累计返利 / 历史累计提现
|
||||
/// </summary>
|
||||
public void LoadSummary()
|
||||
public async Task Settlement()
|
||||
{
|
||||
this.btnRefreshBalance.Enabled = false;
|
||||
Task.Run(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var url = BaseClass.BuildObjString("user/oem_settle_flows");
|
||||
var obj = UserLogin.GetSignPostData(new { });
|
||||
string data = JsonHelper.SerializeObject(obj);
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
var ret = JsonConvert.DeserializeObject<Result<oemflowsStatistics>>(html);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
if (ret.Code != 200)
|
||||
{
|
||||
BaseMsgForm.ShowError("刷新失败:" + ret.Msg);
|
||||
return;
|
||||
}
|
||||
|
||||
this.lblWithdrawable.Text = (ret.Data.available_balance / 100m).ToString("F2");
|
||||
this.lblTotalRebate.Text = (ret.Data.total_rebate_amount / 100m).ToString("F2");
|
||||
this.lblTotalWithdrawn.Text = (ret.Data.total_withdraw_amount / 100m).ToString("F2");
|
||||
}));
|
||||
}
|
||||
finally
|
||||
{
|
||||
Invoke(new Action(() => this.btnRefreshBalance.Enabled = true));
|
||||
}
|
||||
});
|
||||
var url = BaseClass.BuildObjString("user/oem_settle_flows");
|
||||
var data = UserLogin.GetSignPostData(new { });
|
||||
var html = await GetHtml.PostJsonAsync(url, data);
|
||||
var ret = JsonConvert.DeserializeObject<Result<oemflowsStatistics>>(html);
|
||||
if (ret.Code != 200)
|
||||
{
|
||||
throw new Exception("结算失败:" + ret.Msg);
|
||||
}
|
||||
this.lblWithdrawable.Text = (ret.Data.AvailableBalance / 100m).ToString("F2");
|
||||
this.lblTotalRebate.Text = (ret.Data.TotalRebateAmount / 100m).ToString("F2");
|
||||
this.lblTotalWithdrawn.Text = (ret.Data.TotalWithdrawAmount / 100m).ToString("F2");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -213,10 +222,41 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
#endregion
|
||||
|
||||
#region 事件
|
||||
/// <summary>刷新可提现总额等账户统计</summary>
|
||||
private void btnRefreshBalance_Click(object sender, EventArgs e)
|
||||
|
||||
private async void bt_RefreshAmount_Click(object sender, EventArgs e)
|
||||
{
|
||||
LoadSummary();
|
||||
try
|
||||
{
|
||||
bt_RefreshAmount.Enabled = false;
|
||||
await RefreshOMEAmount();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BaseMsgForm.ShowError(ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
bt_RefreshAmount.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>刷新可提现总额等账户统计</summary>
|
||||
private async void btnRefreshBalance_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
btnRefreshBalance.Enabled = false;
|
||||
await Settlement();
|
||||
isSettlement = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BaseMsgForm.ShowError(ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
btnRefreshBalance.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>选择收款二维码图片</summary>
|
||||
@@ -253,8 +293,13 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
}
|
||||
|
||||
/// <summary>提交提现申请</summary>
|
||||
private void btnSubmit_Click(object sender, EventArgs e)
|
||||
private async void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (isSettlement == false)
|
||||
{
|
||||
BaseMsgForm.ShowError("请先结算后再选择提现!");
|
||||
return;
|
||||
}
|
||||
decimal amountYuan = this.numAmount.Value;
|
||||
if (amountYuan <= 0)
|
||||
{
|
||||
@@ -307,7 +352,7 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
this.numAmount.Value = 0;
|
||||
this.qrCodeBase64 = "";
|
||||
this.pictureBoxQr.Image = Properties.Resources.nopic;
|
||||
RefreshAll();
|
||||
Refresh();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -338,6 +383,8 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
GetWithdrawals(ucSplitPage1.CurrentPage);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
|
||||
class oemflowsStatistics
|
||||
@@ -345,14 +392,14 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
/// <summary>
|
||||
/// 当前可提现
|
||||
/// </summary>
|
||||
public long available_balance { get; set; }
|
||||
public long AvailableBalance { get; set; }
|
||||
/// <summary>
|
||||
/// 历史累计返利
|
||||
/// </summary>
|
||||
public long total_rebate_amount { get; set; }
|
||||
public long TotalRebateAmount { get; set; }
|
||||
/// <summary>
|
||||
/// 历史累计提现
|
||||
/// </summary>
|
||||
public long total_withdraw_amount { get; set; }
|
||||
public long TotalWithdrawAmount { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user