后台增加OEM 审核。

Oem 管理增加 申请提现
This commit is contained in:
chfei committed 2026-08-27 14:47:23 +08:00
1 parent 8874820269
commit cdeedd7246
27 files changed
+4150 -761

No files matched your search

+9 -5
View File
@@ -1,4 +1,4 @@
namespace TemuKJD.WXForms.ShopForms
namespace TemuKJD.WXForms.ShopForms
{
partial class WXShopForm
{
@@ -38,12 +38,14 @@
System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("评分考核");
System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("税务申报");
System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("积分充值");
System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("店铺管理", new System.Windows.Forms.TreeNode[] {
System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("OEM提现管理");
System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("店铺管理", new System.Windows.Forms.TreeNode[] {
treeNode1,
treeNode2,
treeNode3,
treeNode4,
treeNode5,
treeNode11,
treeNode6,
treeNode7,
treeNode8,
@@ -160,10 +162,12 @@
treeNode9.Text = "税务申报";
treeNode10.Name = "积分充值";
treeNode10.Text = "积分充值";
treeNode11.Name = "店铺管理";
treeNode11.Text = "店铺管理";
treeNode11.Name = "OEM提现管理";
treeNode11.Text = "OEM提现管理";
treeNode12.Name = "店铺管理";
treeNode12.Text = "店铺管理";
this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
treeNode11});
treeNode12});
this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.tv.Size = new System.Drawing.Size(140, 461);
this.tv.TabIndex = 1;
+7 -2
View File
@@ -1,4 +1,4 @@
using AllBase;
using AllBase;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -33,6 +33,7 @@ namespace TemuKJD.WXForms.ShopForms
public Lazy<WXOemAccountForm> oemAccountForm = new Lazy<WXOemAccountForm>();
public Lazy<WXOemAccountBalanceForm> oemAccountBalanceForm = new Lazy<WXOemAccountBalanceForm>();
public Lazy<WXOemPointsTopUpListForm> oemAccountPointsForm = new Lazy<WXOemPointsTopUpListForm>();
public Lazy<WXShopOemWithdrawalForm> oemWithdrawalForm = new Lazy<WXShopOemWithdrawalForm>();
public WXShopForm()
@@ -60,7 +61,7 @@ namespace TemuKJD.WXForms.ShopForms
public List<string> getHideTreeNodes()
{
List<string> hideNames = new List<string>() { "积分充值", "OEM账号管理", "OEM返现明细", "OEM积分明细", "店铺地址管理", "评分考核", "子账号管理", "高级运费模板", "运费模板", "素材库管理", "订单金额统计", "工作明细统计", "店铺经营统计1" };
List<string> hideNames = new List<string>() { "积分充值", "OEM账号管理", "OEM返现明细", "OEM积分明细", "OEM提现管理", "店铺地址管理", "评分考核", "子账号管理", "高级运费模板", "运费模板", "素材库管理", "订单金额统计", "工作明细统计", "店铺经营统计1" };
if (BaseClass.SaLevel == 1)
{
@@ -85,6 +86,7 @@ namespace TemuKJD.WXForms.ShopForms
hideNames.Remove("OEM账号管理");
hideNames.Remove("OEM返现明细");
hideNames.Remove("OEM积分明细");
hideNames.Remove("OEM提现管理");
}
foreach (var forbiddenPage in BaseClass.ForbiddenPage.Split(','))
@@ -145,6 +147,9 @@ namespace TemuKJD.WXForms.ShopForms
case "OEM积分明细":
SetForm(oemAccountPointsForm.Value);
break;
case "OEM提现管理":
SetForm(oemWithdrawalForm.Value);
break;
}
}));
}).Start();
@@ -0,0 +1,615 @@
namespace TemuKJD.WXForms.ShopForms
{
partial class WXShopOemWithdrawalForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WXShopOemWithdrawalForm));
this.panel1 = new System.Windows.Forms.Panel();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.ucGroupBox1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnRefreshBalance = new DevComponents.DotNetBar.PanelEx();
this.lblWithdrawnLabel = new System.Windows.Forms.Label();
this.lblTotalWithdrawn = new System.Windows.Forms.Label();
this.lblRebateLabel = new System.Windows.Forms.Label();
this.lblTotalRebate = new System.Windows.Forms.Label();
this.lblWithdrawableLabel = new System.Windows.Forms.Label();
this.lblWithdrawable = new System.Windows.Forms.Label();
this.ucGroupBox2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnSubmit = new DevComponents.DotNetBar.PanelEx();
this.btnSelectImage = new DevComponents.DotNetBar.PanelEx();
this.pictureBoxQr = new System.Windows.Forms.PictureBox();
this.lblQrLabel = new System.Windows.Forms.Label();
this.lblAmountLabel = new System.Windows.Forms.Label();
this.numAmount = new System.Windows.Forms.NumericUpDown();
this.lblTypeLabel = new System.Windows.Forms.Label();
this.cmbType = new System.Windows.Forms.ComboBox();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.dgvWithdrawal = new TemuKJD.UserComponent.DataGridViewEx();
this.colNo = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colAmount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colApplyTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colAuditRemark = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colAuditTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colPayTradeNo = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.ucGroupBox1.SuspendLayout();
this.ucGroupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxQr)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numAmount)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvWithdrawal)).BeginInit();
this.SuspendLayout();
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Controls.Add(this.splitContainer1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(1, 33);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1222, 586);
this.panel1.TabIndex = 0;
//
// 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.tableLayoutPanel1);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Panel2.Padding = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.splitContainer1.Size = new System.Drawing.Size(1222, 586);
this.splitContainer1.SplitterDistance = 196;
this.splitContainer1.SplitterWidth = 3;
this.splitContainer1.TabIndex = 0;
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.ucGroupBox1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.ucGroupBox2, 0, 1);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 45F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 55F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(1222, 196);
this.tableLayoutPanel1.TabIndex = 0;
//
// ucGroupBox1
//
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.btnRefreshBalance);
this.ucGroupBox1.Controls.Add(this.lblWithdrawnLabel);
this.ucGroupBox1.Controls.Add(this.lblTotalWithdrawn);
this.ucGroupBox1.Controls.Add(this.lblRebateLabel);
this.ucGroupBox1.Controls.Add(this.lblTotalRebate);
this.ucGroupBox1.Controls.Add(this.lblWithdrawableLabel);
this.ucGroupBox1.Controls.Add(this.lblWithdrawable);
this.ucGroupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.ucGroupBox1.Location = new System.Drawing.Point(0, 2);
this.ucGroupBox1.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.ucGroupBox1.Name = "ucGroupBox1";
this.ucGroupBox1.Size = new System.Drawing.Size(1222, 84);
this.ucGroupBox1.TabIndex = 0;
this.ucGroupBox1.TabStop = false;
this.ucGroupBox1.Text = "账户统计";
//
// btnRefreshBalance
//
this.btnRefreshBalance.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
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.Name = "btnRefreshBalance";
this.btnRefreshBalance.Size = new System.Drawing.Size(60, 23);
this.btnRefreshBalance.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnRefreshBalance.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRefreshBalance.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRefreshBalance.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnRefreshBalance.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnRefreshBalance.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnRefreshBalance.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnRefreshBalance.Style.GradientAngle = 90;
this.btnRefreshBalance.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnRefreshBalance.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
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.Click += new System.EventHandler(this.btnRefreshBalance_Click);
//
// lblWithdrawnLabel
//
this.lblWithdrawnLabel.AutoSize = true;
this.lblWithdrawnLabel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWithdrawnLabel.Location = new System.Drawing.Point(476, 47);
this.lblWithdrawnLabel.Name = "lblWithdrawnLabel";
this.lblWithdrawnLabel.Size = new System.Drawing.Size(112, 17);
this.lblWithdrawnLabel.TabIndex = 5;
this.lblWithdrawnLabel.Text = "历史累计提现(元):";
//
// lblTotalWithdrawn
//
this.lblTotalWithdrawn.AutoSize = true;
this.lblTotalWithdrawn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblTotalWithdrawn.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(233)))), ((int)(((byte)(72)))), ((int)(((byte)(66)))));
this.lblTotalWithdrawn.Location = new System.Drawing.Point(596, 42);
this.lblTotalWithdrawn.Name = "lblTotalWithdrawn";
this.lblTotalWithdrawn.Size = new System.Drawing.Size(45, 22);
this.lblTotalWithdrawn.TabIndex = 4;
this.lblTotalWithdrawn.Text = "0.00";
//
// lblRebateLabel
//
this.lblRebateLabel.AutoSize = true;
this.lblRebateLabel.Location = new System.Drawing.Point(239, 47);
this.lblRebateLabel.Name = "lblRebateLabel";
this.lblRebateLabel.Size = new System.Drawing.Size(112, 17);
this.lblRebateLabel.TabIndex = 3;
this.lblRebateLabel.Text = "历史累计返利(元):";
//
// lblTotalRebate
//
this.lblTotalRebate.AutoSize = true;
this.lblTotalRebate.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblTotalRebate.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(140)))), ((int)(((byte)(0)))));
this.lblTotalRebate.Location = new System.Drawing.Point(359, 42);
this.lblTotalRebate.Name = "lblTotalRebate";
this.lblTotalRebate.Size = new System.Drawing.Size(45, 22);
this.lblTotalRebate.TabIndex = 2;
this.lblTotalRebate.Text = "0.00";
//
// lblWithdrawableLabel
//
this.lblWithdrawableLabel.AutoSize = true;
this.lblWithdrawableLabel.Location = new System.Drawing.Point(20, 47);
this.lblWithdrawableLabel.Name = "lblWithdrawableLabel";
this.lblWithdrawableLabel.Size = new System.Drawing.Size(100, 17);
this.lblWithdrawableLabel.TabIndex = 1;
this.lblWithdrawableLabel.Text = "可提现总额(元):";
//
// lblWithdrawable
//
this.lblWithdrawable.AutoSize = true;
this.lblWithdrawable.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWithdrawable.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.lblWithdrawable.Location = new System.Drawing.Point(140, 42);
this.lblWithdrawable.Name = "lblWithdrawable";
this.lblWithdrawable.Size = new System.Drawing.Size(45, 22);
this.lblWithdrawable.TabIndex = 0;
this.lblWithdrawable.Text = "0.00";
//
// ucGroupBox2
//
this.ucGroupBox2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBox2.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBox2.Controls.Add(this.btnSubmit);
this.ucGroupBox2.Controls.Add(this.btnSelectImage);
this.ucGroupBox2.Controls.Add(this.pictureBoxQr);
this.ucGroupBox2.Controls.Add(this.lblQrLabel);
this.ucGroupBox2.Controls.Add(this.lblAmountLabel);
this.ucGroupBox2.Controls.Add(this.numAmount);
this.ucGroupBox2.Controls.Add(this.lblTypeLabel);
this.ucGroupBox2.Controls.Add(this.cmbType);
this.ucGroupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.ucGroupBox2.Location = new System.Drawing.Point(0, 90);
this.ucGroupBox2.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.ucGroupBox2.Name = "ucGroupBox2";
this.ucGroupBox2.Size = new System.Drawing.Size(1222, 104);
this.ucGroupBox2.TabIndex = 1;
this.ucGroupBox2.TabStop = false;
this.ucGroupBox2.Text = "申请提现";
//
// btnSubmit
//
this.btnSubmit.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSubmit.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSubmit.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSubmit.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSubmit.Location = new System.Drawing.Point(850, 58);
this.btnSubmit.Name = "btnSubmit";
this.btnSubmit.Size = new System.Drawing.Size(86, 27);
this.btnSubmit.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSubmit.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSubmit.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSubmit.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSubmit.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSubmit.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSubmit.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSubmit.Style.GradientAngle = 90;
this.btnSubmit.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSubmit.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSubmit.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSubmit.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnSubmit.TabIndex = 7;
this.btnSubmit.Text = "提交申请";
this.btnSubmit.Click += new System.EventHandler(this.btnSubmit_Click);
//
// btnSelectImage
//
this.btnSelectImage.CanvasColor = System.Drawing.SystemColors.Control;
this.btnSelectImage.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSelectImage.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSelectImage.Location = new System.Drawing.Point(742, 58);
this.btnSelectImage.Name = "btnSelectImage";
this.btnSelectImage.Size = new System.Drawing.Size(86, 27);
this.btnSelectImage.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSelectImage.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnSelectImage.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnSelectImage.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.btnSelectImage.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSelectImage.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.btnSelectImage.Style.GradientAngle = 90;
this.btnSelectImage.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.btnSelectImage.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSelectImage.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSelectImage.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSelectImage.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnSelectImage.TabIndex = 6;
this.btnSelectImage.Text = "选择图片";
this.btnSelectImage.Click += new System.EventHandler(this.btnSelectImage_Click);
//
// pictureBoxQr
//
this.pictureBoxQr.BackColor = System.Drawing.Color.White;
this.pictureBoxQr.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pictureBoxQr.Image = global::TemuKJD.Properties.Resources.nopic;
this.pictureBoxQr.Location = new System.Drawing.Point(660, 32);
this.pictureBoxQr.Name = "pictureBoxQr";
this.pictureBoxQr.Size = new System.Drawing.Size(76, 56);
this.pictureBoxQr.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBoxQr.TabIndex = 5;
this.pictureBoxQr.TabStop = false;
//
// lblQrLabel
//
this.lblQrLabel.AutoSize = true;
this.lblQrLabel.Location = new System.Drawing.Point(570, 52);
this.lblQrLabel.Name = "lblQrLabel";
this.lblQrLabel.Size = new System.Drawing.Size(80, 17);
this.lblQrLabel.TabIndex = 4;
this.lblQrLabel.Text = "收款二维码:";
//
// lblAmountLabel
//
this.lblAmountLabel.AutoSize = true;
this.lblAmountLabel.Location = new System.Drawing.Point(250, 52);
this.lblAmountLabel.Name = "lblAmountLabel";
this.lblAmountLabel.Size = new System.Drawing.Size(88, 17);
this.lblAmountLabel.TabIndex = 3;
this.lblAmountLabel.Text = "提现金额(元):";
//
// numAmount
//
this.numAmount.DecimalPlaces = 2;
this.numAmount.Location = new System.Drawing.Point(365, 48);
this.numAmount.Maximum = new decimal(new int[] {
100000000,
0,
0,
0});
this.numAmount.Name = "numAmount";
this.numAmount.Size = new System.Drawing.Size(140, 23);
this.numAmount.TabIndex = 2;
this.numAmount.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.numAmount.ThousandsSeparator = true;
this.numAmount.Value = new decimal(new int[] {
10,
0,
0,
0});
//
// lblTypeLabel
//
this.lblTypeLabel.AutoSize = true;
this.lblTypeLabel.Location = new System.Drawing.Point(20, 52);
this.lblTypeLabel.Name = "lblTypeLabel";
this.lblTypeLabel.Size = new System.Drawing.Size(68, 17);
this.lblTypeLabel.TabIndex = 1;
this.lblTypeLabel.Text = "提现方式:";
//
// cmbType
//
this.cmbType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbType.FormattingEnabled = true;
this.cmbType.Items.AddRange(new object[] {
"支付宝"});
this.cmbType.Location = new System.Drawing.Point(100, 48);
this.cmbType.Name = "cmbType";
this.cmbType.Size = new System.Drawing.Size(120, 25);
this.cmbType.TabIndex = 0;
//
// splitContainer2
//
this.splitContainer2.BackColor = System.Drawing.Color.White;
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(2, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.pbLoading);
this.splitContainer2.Panel1.Controls.Add(this.dgvWithdrawal);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1);
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(1218, 387);
this.splitContainer2.SplitterDistance = 358;
this.splitContainer2.TabIndex = 0;
//
// 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(584, 154);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbLoading.TabIndex = 6;
this.pbLoading.TabStop = false;
this.pbLoading.Visible = false;
//
// dgvWithdrawal
//
this.dgvWithdrawal.AllowUserToAddRows = false;
this.dgvWithdrawal.AllowUserToDeleteRows = false;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvWithdrawal.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
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;
this.dgvWithdrawal.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvWithdrawal.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colNo,
this.colAmount,
this.colType,
this.colAccount,
this.colStatus,
this.colApplyTime,
this.colAuditRemark,
this.colAuditTime,
this.colPayTradeNo});
this.dgvWithdrawal.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvWithdrawal.Location = new System.Drawing.Point(4, 0);
this.dgvWithdrawal.MultiSelectCheckBox = false;
this.dgvWithdrawal.Name = "dgvWithdrawal";
this.dgvWithdrawal.ReadOnly = true;
this.dgvWithdrawal.RowTemplate.Height = 23;
this.dgvWithdrawal.ShowCellErrors = false;
this.dgvWithdrawal.Size = new System.Drawing.Size(1210, 358);
this.dgvWithdrawal.TabIndex = 5;
//
// colNo
//
this.colNo.FillWeight = 38F;
this.colNo.HeaderText = "提现单号";
this.colNo.Name = "colNo";
this.colNo.ReadOnly = true;
//
// colAmount
//
this.colAmount.FillWeight = 22F;
this.colAmount.HeaderText = "提现金额";
this.colAmount.Name = "colAmount";
this.colAmount.ReadOnly = true;
//
// colType
//
this.colType.FillWeight = 20F;
this.colType.HeaderText = "提现方式";
this.colType.Name = "colType";
this.colType.ReadOnly = true;
//
// colAccount
//
this.colAccount.FillWeight = 26F;
this.colAccount.HeaderText = "收款账号";
this.colAccount.Name = "colAccount";
this.colAccount.ReadOnly = true;
//
// colStatus
//
this.colStatus.FillWeight = 20F;
this.colStatus.HeaderText = "审核状态";
this.colStatus.Name = "colStatus";
this.colStatus.ReadOnly = true;
//
// colApplyTime
//
this.colApplyTime.FillWeight = 30F;
this.colApplyTime.HeaderText = "申请时间";
this.colApplyTime.Name = "colApplyTime";
this.colApplyTime.ReadOnly = true;
//
// colAuditRemark
//
this.colAuditRemark.FillWeight = 38F;
this.colAuditRemark.HeaderText = "审核消息";
this.colAuditRemark.Name = "colAuditRemark";
this.colAuditRemark.ReadOnly = true;
//
// colAuditTime
//
this.colAuditTime.FillWeight = 30F;
this.colAuditTime.HeaderText = "审核时间";
this.colAuditTime.Name = "colAuditTime";
this.colAuditTime.ReadOnly = true;
//
// colPayTradeNo
//
this.colPayTradeNo.FillWeight = 30F;
this.colPayTradeNo.HeaderText = "打款订单";
this.colPayTradeNo.Name = "colPayTradeNo";
this.colPayTradeNo.ReadOnly = true;
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
this.ucSplitPage1.IsShowPageSize = true;
this.ucSplitPage1.Location = new System.Drawing.Point(829, 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(389, 25);
this.ucSplitPage1.TabIndex = 4;
this.ucSplitPage1.TotalPage = 1;
this.ucSplitPage1.PageChange += new System.Action<object>(this.ucSplitPage1_PageChange);
//
// 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(1218, 25);
this.statusBar.TabIndex = 1;
//
// WXShopOemWithdrawalForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1224, 620);
this.Controls.Add(this.panel1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.KeyPreview = true;
this.Name = "WXShopOemWithdrawalForm";
this.Text = "OEM提现管理";
this.TitleText = "OEM提现管理";
this.VisibleChanged += new System.EventHandler(this.WXShopOemWithdrawalForm_VisibleChanged);
this.Controls.SetChildIndex(this.panel1, 0);
this.panel1.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.ucGroupBox1.ResumeLayout(false);
this.ucGroupBox1.PerformLayout();
this.ucGroupBox2.ResumeLayout(false);
this.ucGroupBox2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxQr)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numAmount)).EndInit();
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvWithdrawal)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private UserComponent.UcGroupBoxEx ucGroupBox1;
private DevComponents.DotNetBar.PanelEx btnRefreshBalance;
private System.Windows.Forms.Label lblWithdrawnLabel;
private System.Windows.Forms.Label lblTotalWithdrawn;
private System.Windows.Forms.Label lblRebateLabel;
private System.Windows.Forms.Label lblTotalRebate;
private System.Windows.Forms.Label lblWithdrawableLabel;
private System.Windows.Forms.Label lblWithdrawable;
private UserComponent.UcGroupBoxEx ucGroupBox2;
private DevComponents.DotNetBar.PanelEx btnSubmit;
private DevComponents.DotNetBar.PanelEx btnSelectImage;
private System.Windows.Forms.PictureBox pictureBoxQr;
private System.Windows.Forms.Label lblQrLabel;
private System.Windows.Forms.Label lblAmountLabel;
private System.Windows.Forms.NumericUpDown numAmount;
private System.Windows.Forms.Label lblTypeLabel;
private System.Windows.Forms.ComboBox cmbType;
private System.Windows.Forms.SplitContainer splitContainer2;
private System.Windows.Forms.PictureBox pbLoading;
private UserComponent.DataGridViewEx dgvWithdrawal;
private UserControls.UcSplitPage ucSplitPage1;
private UserControls.StatusBarUserControl statusBar;
private System.Windows.Forms.DataGridViewTextBoxColumn colNo;
private System.Windows.Forms.DataGridViewTextBoxColumn colAmount;
private System.Windows.Forms.DataGridViewTextBoxColumn colType;
private System.Windows.Forms.DataGridViewTextBoxColumn colAccount;
private System.Windows.Forms.DataGridViewTextBoxColumn colStatus;
private System.Windows.Forms.DataGridViewTextBoxColumn colApplyTime;
private System.Windows.Forms.DataGridViewTextBoxColumn colAuditRemark;
private System.Windows.Forms.DataGridViewTextBoxColumn colAuditTime;
private System.Windows.Forms.DataGridViewTextBoxColumn colPayTradeNo;
}
}
@@ -0,0 +1,358 @@
using AllBase;
using AllBase.Extension;
using AllBase.Model.Result;
using AllBase.Model.Result.WXResult;
using NaiBa.Util.Extension;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Printing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using TemuKJD.BaseForms;
using TemuKJD.Extension;
using Work;
using Work.Api;
using Work.BLL.Tools;
namespace TemuKJD.WXForms.ShopForms
{
/// <summary>
/// 商户(OEM)提现管理:
/// 上半部分:账户统计(可提现总额 / 历史累计返利 / 历史累计提现) + 申请提现(上传收款二维码图片);
/// 下半部分:已申请的提现记录列表(DataGridView 绑定方式,参考 WXAdminOemWithdrawal)。
/// 接口约定(与后台 user/* 系列一致):
/// user/oem_withdrawal_summary → data: { withdrawable_amount(分), total_rebate(分), total_withdrawn(分) }
/// user/oem_withdrawal_apply → 参数 amount(分) / withdrawal_type / qrcode_base64
/// user/oem_withdrawals → 分页返回提现记录列表
/// </summary>
public partial class WXShopOemWithdrawalForm : BaseForms.BaseGeneralForm
{
private BindingList<WXOemWithdrawalInfo> dataList = new BindingList<WXOemWithdrawalInfo>();
/// <summary>收款二维码图片(base64)</summary>
private string qrCodeBase64 = "";
public WXShopOemWithdrawalForm()
{
InitializeComponent();
InitBindingDataGridView();
this.cmbType.SelectedIndex = 0;
}
#region 提现记录列表(DataGridView 绑定方式)
/// <summary>
/// 初始化 DataGridView 绑定:列与模型字段绑定(参考 WXAdminOemWithdrawal.InitBindingDataGridView)
/// </summary>
private void InitBindingDataGridView()
{
this.dgvWithdrawal.AutoGenerateColumns = false;
this.colNo.DataPropertyName = nameof(WXOemWithdrawalInfo.withdrawal_no);
this.colAmount.DataPropertyName = nameof(WXOemWithdrawalInfo.amount);
this.colType.DataPropertyName = nameof(WXOemWithdrawalInfo.withdrawal_type_string);
this.colAccount.DataPropertyName = nameof(WXOemWithdrawalInfo.account_no);
this.colStatus.DataPropertyName = nameof(WXOemWithdrawalInfo.status_string);
this.colApplyTime.DataPropertyName = nameof(WXOemWithdrawalInfo.created_at);
this.colAuditRemark.DataPropertyName = nameof(WXOemWithdrawalInfo.audit_remark);
this.colAuditTime.DataPropertyName = nameof(WXOemWithdrawalInfo.audit_time);
this.colPayTradeNo.DataPropertyName = nameof(WXOemWithdrawalInfo.pay_trade_no);
// 时间列格式化
this.colApplyTime.DefaultCellStyle.Format = "yyyy-MM-dd HH:mm:ss";
this.colAuditTime.DefaultCellStyle.Format = "yyyy-MM-dd HH:mm:ss";
// 金额列右对齐
this.colAmount.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
// 注册金额格式化事件(分→元)
this.dgvWithdrawal.CellFormatting += DgvWithdrawal_CellFormatting;
this.dgvWithdrawal.DataSource = dataList;
}
private void DgvWithdrawal_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
// 金额列:将分转换为元
if (e.ColumnIndex == this.colAmount.Index && e.Value != null && e.Value != DBNull.Value)
{
if (long.TryParse(e.Value.ToString(), out long amountInFen))
{
e.Value = (amountInFen / 100m).ToString("F2");
e.FormattingApplied = true;
}
}
}
#endregion
#region 数据加载
private void WXShopOemWithdrawalForm_VisibleChanged(object sender, EventArgs e)
{
if (this.Visible && first)
{
first = false;
RefreshAll();
}
}
bool first = true;
/// <summary>
/// 刷新账户统计 + 提现记录
/// </summary>
private void RefreshAll()
{
LoadSummary();
GetWithdrawals(ucSplitPage1.CurrentPage);
}
/// <summary>
/// 加载账户统计:可提现总额 / 历史累计返利 / 历史累计提现
/// </summary>
public void LoadSummary()
{
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));
}
});
}
/// <summary>
/// 加载提现记录(分页)
/// </summary>
public void GetWithdrawals(int page)
{
this.pbLoading.Visible = true;
this.dgvWithdrawal.Rows.Clear();
dataList.Clear();
int pageSize = this.ucSplitPage1.PageSize;
Task.Run(() =>
{
int pageCount;
decimal seconds;
List<WXOemWithdrawalInfo> list = GetOemWithdrawals(out pageCount, out seconds, page, pageSize);
Invoke(new Action(() =>
{
this.ucSplitPage1.TotalPage = pageCount;
list.ForEach(a => dataList.Add(a));
this.pbLoading.Visible = false;
this.statusBar.lblTaskStatus.Text = "提现记录查询完毕";
#if DEBUG
this.statusBar.lblTaskStatus.Text += ",耗时:" + seconds;
#endif
}));
});
}
public List<WXOemWithdrawalInfo> GetOemWithdrawals(out int pageCount, out decimal seconds, int page = 1, int pageSize = 200)
{
List<WXOemWithdrawalInfo> list = new List<WXOemWithdrawalInfo>();
pageCount = 1;
seconds = 0;
var url = BaseClass.BuildObjString("user/oem_withdrawals");
var obj = UserLogin.GetSignPostData(new
{
page = page,
page_size = pageSize
});
string data = JsonHelper.SerializeObject(obj);
var html = GetHtml.PostUtf8(url, data);
var ret = JsonConvert.DeserializeObject<PageResult<WXOemWithdrawalInfo>>(html);
if (ret.Code != 200)
{
Invoke(new Action(() =>
{
BaseMsgForm.ShowError("提现记录获取失败,请重试!" + ret.Msg);
}));
return list;
}
seconds = BaseRegex.GetDecimalJson(ref html, "seconds");
pageCount = Math.Ceiling(1.0 * ret.Total / pageSize).ParseToInt();
pageCount = Math.Max(pageCount, 1);
return ret.Data;
}
#endregion
#region 事件
/// <summary>刷新可提现总额等账户统计</summary>
private void btnRefreshBalance_Click(object sender, EventArgs e)
{
LoadSummary();
}
/// <summary>选择收款二维码图片</summary>
private void btnSelectImage_Click(object sender, EventArgs e)
{
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Multiselect = false;
openFileDialog.Filter = "图片文件 (*.jpeg;*.jpg;*.png;*.bmp)|*.jpeg;*.jpg;*.png;*.bmp|All files (*.*)|*.*";
if (openFileDialog.ShowDialog() != DialogResult.OK)
return;
try
{
using (Image imageSource = Image.FromFile(openFileDialog.FileName))
{
using (MemoryStream memoryStream = new MemoryStream())
{
// 统一转成 jpg 压缩后提交,避免原图过大
Image image = new Bitmap(imageSource);
image.Save(memoryStream, System.Drawing.Imaging.ImageFormat.Jpeg);
image.Dispose();
byte[] imageBytes = memoryStream.ToArray();
qrCodeBase64 = Convert.ToBase64String(imageBytes);
}
this.pictureBoxQr.Image = new Bitmap(imageSource);
}
}
catch (Exception ex)
{
qrCodeBase64 = "";
this.pictureBoxQr.Image = Properties.Resources.nopic;
BaseMsgForm.ShowError("打开二维码图片失败 " + ex.Message);
}
}
/// <summary>提交提现申请</summary>
private void btnSubmit_Click(object sender, EventArgs e)
{
decimal amountYuan = this.numAmount.Value;
if (amountYuan <= 0)
{
BaseMsgForm.ShowError("请输入提现金额!");
return;
}
if (string.IsNullOrEmpty(qrCodeBase64))
{
BaseMsgForm.ShowError("请先上传收款二维码图片!");
return;
}
if (BaseMsgForm.ShowConfirm("确定提交提现申请?提现金额:" + amountYuan.ToString("F2") + " 元", "提示").DialogResult != DialogResult.OK)
return;
this.btnSubmit.Enabled = false;
try
{
// 金额(元) → 分
long amountFen = (long)(amountYuan * 100m);
// 提现方式:1银行卡 2支付宝 3微信 4其他
int withdrawalType = GetWithdrawalType(this.cmbType.Text);
string data = "";
var obj = UserLogin.GetSignPostData(new
{
amount = amountFen,
withdrawal_type = withdrawalType,
account_no = qrCodeBase64,
});
data = JsonHelper.SerializeObject(obj);
//data.Append(UserLogin.GetSignaturex());
//data.Append("&amount=" + amountFen);
//data.Append("&withdrawal_type=" + withdrawalType);
//data.Append("&qrcode_base64=" + GetHtml.UrlEncodeUtf8(qrCodeBase64));
var url = BaseClass.BuildObjString("user/apply_oem_withdrawal");
string html = GetHtml.PostUtf8(url, data.ToString());
var ret = JsonConvert.DeserializeObject<Result>(html);
if (ret.Code != 200)
{
BaseMsgForm.ShowError("提现申请提交失败:" + ret.Msg);
return;
}
BaseMsgForm.ShowInfo("提现申请提交成功!");
// 提交成功后:清空输入、刷新统计与记录
this.numAmount.Value = 0;
this.qrCodeBase64 = "";
this.pictureBoxQr.Image = Properties.Resources.nopic;
RefreshAll();
}
catch (Exception ex)
{
BaseMsgForm.ShowError("提现申请提交异常:" + ex.Message);
}
finally
{
this.btnSubmit.Enabled = true;
}
}
/// <summary>
/// 提现方式名称 → 类型值:1银行卡 2支付宝 3微信 4其他
/// </summary>
private static int GetWithdrawalType(string typeName)
{
switch (typeName)
{
case "支付宝": return 2;
case "银行卡": return 1;
case "其他": return 4;
default: return 3; // 微信收款
}
}
private void ucSplitPage1_PageChange(object obj)
{
GetWithdrawals(ucSplitPage1.CurrentPage);
}
#endregion
}
class oemflowsStatistics
{
/// <summary>
/// 当前可提现
/// </summary>
public long available_balance { get; set; }
/// <summary>
/// 历史累计返利
/// </summary>
public long total_rebate_amount { get; set; }
/// <summary>
/// 历史累计提现
/// </summary>
public long total_withdraw_amount { get; set; }
}
}
@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAQEAQAAAAAABoCgAAFgAAACgAAABAAAAAgAAAAAEABAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AAAAAV3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3UAAAAAAHd3d3d3d3d3d3d3d3d3d3d3d3d3
d3d3d3d3d3cAAABXd3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3UAAHd3d3d3d3d3d3d3d3d3d3d3
d3d3d3d3d3d3d3d3dwAHd3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3cAd3d3d3d4/4d3d3d3d3
d3d3d3d3d3d3d3d4/4d3d3dwV3d3d3d/iI/3d3d3d3d3d3d3d3d3d3d3d4+Ij3d3d3V3d3d3d/h3d/h3
d3d3d3d3d3d3d3d3d3d493d/93d3d3d4iIiH+Hd3f4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