修复oem无法进行礼物单查询的bug
This commit is contained in:
1 parent
8eab94968e
commit
2dfec55b5f
5 files changed
+161
-129
No files matched your search
+34
-23
@@ -109,15 +109,16 @@ namespace TemuKJD.WXForms.AdminForms
|
|||||||
this.txtSearch = new System.Windows.Forms.TextBox();
|
this.txtSearch = new System.Windows.Forms.TextBox();
|
||||||
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
||||||
this.dgvPayment = new TemuKJD.UserComponent.DataGridViewEx();
|
this.dgvPayment = new TemuKJD.UserComponent.DataGridViewEx();
|
||||||
|
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
|
||||||
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||||
this.colType = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.colType = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.colUserName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.colUserName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.colOrderId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.colOrderId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.colAmount = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.colAmount = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.colOemAmount = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.colBalance = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.colBalance = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.colCreateTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.colCreateTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.colRemark = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.colRemark = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
|
|
||||||
this.panel1.SuspendLayout();
|
this.panel1.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
|
||||||
this.splitContainer2.Panel1.SuspendLayout();
|
this.splitContainer2.Panel1.SuspendLayout();
|
||||||
@@ -454,6 +455,7 @@ namespace TemuKJD.WXForms.AdminForms
|
|||||||
"充值",
|
"充值",
|
||||||
"管理员充值",
|
"管理员充值",
|
||||||
"支付宝充值",
|
"支付宝充值",
|
||||||
|
"礼物单支出",
|
||||||
"拍单扣除/作废返还",
|
"拍单扣除/作废返还",
|
||||||
"超重扣费支出",
|
"超重扣费支出",
|
||||||
"退货包裹扣费支出",
|
"退货包裹扣费支出",
|
||||||
@@ -967,6 +969,7 @@ namespace TemuKJD.WXForms.AdminForms
|
|||||||
this.colUserName,
|
this.colUserName,
|
||||||
this.colOrderId,
|
this.colOrderId,
|
||||||
this.colAmount,
|
this.colAmount,
|
||||||
|
this.colOemAmount,
|
||||||
this.colBalance,
|
this.colBalance,
|
||||||
this.colCreateTime,
|
this.colCreateTime,
|
||||||
this.colRemark});
|
this.colRemark});
|
||||||
@@ -981,6 +984,20 @@ namespace TemuKJD.WXForms.AdminForms
|
|||||||
this.dgvPayment.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvPayment_CellContentClick);
|
this.dgvPayment.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvPayment_CellContentClick);
|
||||||
this.dgvPayment.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvPayment_CellValueChanged);
|
this.dgvPayment.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvPayment_CellValueChanged);
|
||||||
//
|
//
|
||||||
|
// ucSplitPage1
|
||||||
|
//
|
||||||
|
this.ucSplitPage1.CurrentPage = 1;
|
||||||
|
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||||
|
this.ucSplitPage1.IsShowPageSize = true;
|
||||||
|
this.ucSplitPage1.Location = new System.Drawing.Point(903, 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(459, 25);
|
||||||
|
this.ucSplitPage1.TabIndex = 1163;
|
||||||
|
this.ucSplitPage1.TotalPage = 1;
|
||||||
|
this.ucSplitPage1.PageChange += new System.Action<object>(this.ucSplitPage1_PageChange);
|
||||||
|
//
|
||||||
// colCheck
|
// colCheck
|
||||||
//
|
//
|
||||||
this.colCheck.FillWeight = 20F;
|
this.colCheck.FillWeight = 20F;
|
||||||
@@ -1018,6 +1035,13 @@ namespace TemuKJD.WXForms.AdminForms
|
|||||||
this.colAmount.Name = "colAmount";
|
this.colAmount.Name = "colAmount";
|
||||||
this.colAmount.ReadOnly = true;
|
this.colAmount.ReadOnly = true;
|
||||||
//
|
//
|
||||||
|
// colOemAmount
|
||||||
|
//
|
||||||
|
this.colOemAmount.FillWeight = 60F;
|
||||||
|
this.colOemAmount.HeaderText = "归属Oem的金额";
|
||||||
|
this.colOemAmount.Name = "colOemAmount";
|
||||||
|
this.colOemAmount.ReadOnly = true;
|
||||||
|
//
|
||||||
// colBalance
|
// colBalance
|
||||||
//
|
//
|
||||||
this.colBalance.FillWeight = 60F;
|
this.colBalance.FillWeight = 60F;
|
||||||
@@ -1040,20 +1064,6 @@ namespace TemuKJD.WXForms.AdminForms
|
|||||||
this.colRemark.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
this.colRemark.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||||
this.colRemark.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
this.colRemark.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||||
//
|
//
|
||||||
// ucSplitPage1
|
|
||||||
//
|
|
||||||
this.ucSplitPage1.CurrentPage = 1;
|
|
||||||
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
|
|
||||||
this.ucSplitPage1.IsShowPageSize = true;
|
|
||||||
this.ucSplitPage1.Location = new System.Drawing.Point(903, 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(459, 25);
|
|
||||||
this.ucSplitPage1.TabIndex = 1163;
|
|
||||||
this.ucSplitPage1.TotalPage = 1;
|
|
||||||
this.ucSplitPage1.PageChange += new System.Action<object>(this.ucSplitPage1_PageChange);
|
|
||||||
//
|
|
||||||
// WXAdminAccountBalanceForm
|
// WXAdminAccountBalanceForm
|
||||||
//
|
//
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
@@ -1104,14 +1114,6 @@ namespace TemuKJD.WXForms.AdminForms
|
|||||||
private System.Windows.Forms.DateTimePicker dtpTimeEnd;
|
private System.Windows.Forms.DateTimePicker dtpTimeEnd;
|
||||||
private System.Windows.Forms.DateTimePicker dtpTimeBegin;
|
private System.Windows.Forms.DateTimePicker dtpTimeBegin;
|
||||||
private DevComponents.DotNetBar.PanelEx btnSearch;
|
private DevComponents.DotNetBar.PanelEx btnSearch;
|
||||||
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
|
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colType;
|
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colUserName;
|
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colOrderId;
|
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colAmount;
|
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colBalance;
|
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colCreateTime;
|
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn colRemark;
|
|
||||||
private System.Windows.Forms.Label label1;
|
private System.Windows.Forms.Label label1;
|
||||||
private System.Windows.Forms.TextBox txtUserName;
|
private System.Windows.Forms.TextBox txtUserName;
|
||||||
private DevComponents.DotNetBar.PanelEx btnSearchShop;
|
private DevComponents.DotNetBar.PanelEx btnSearchShop;
|
||||||
@@ -1166,5 +1168,14 @@ namespace TemuKJD.WXForms.AdminForms
|
|||||||
private System.Windows.Forms.TextBox txtOutOrderId;
|
private System.Windows.Forms.TextBox txtOutOrderId;
|
||||||
private System.Windows.Forms.TextBox txtShopOrderNo;
|
private System.Windows.Forms.TextBox txtShopOrderNo;
|
||||||
private System.Windows.Forms.Label label9;
|
private System.Windows.Forms.Label label9;
|
||||||
|
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn colType;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn colUserName;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn colOrderId;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn colAmount;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn colOemAmount;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn colBalance;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn colCreateTime;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn colRemark;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -94,18 +94,22 @@ namespace TemuKJD.WXForms.AdminForms
|
|||||||
data3 += "&create_time_end=" + dtpTimeEnd.Value.ToString("yyyy-MM-dd HH:mm:ss");
|
data3 += "&create_time_end=" + dtpTimeEnd.Value.ToString("yyyy-MM-dd HH:mm:ss");
|
||||||
if (cmbType.Text == "充值")
|
if (cmbType.Text == "充值")
|
||||||
data3 += "&type_in=1,30";
|
data3 += "&type_in=1,30";
|
||||||
if (cmbType.Text == "管理员充值")
|
else if (cmbType.Text == "管理员充值")
|
||||||
data3 += "&type_in=1";
|
data3 += "&type_in=1";
|
||||||
if (cmbType.Text == "支付宝充值")
|
else if (cmbType.Text == "支付宝充值")
|
||||||
data3 += "&type_in=30";
|
data3 += "&type_in=30";
|
||||||
if (cmbType.Text == "拍单扣除/作废返还")
|
else if (cmbType.Text == "礼物单支出")
|
||||||
|
data3 += "&type_in=16";
|
||||||
|
else if (cmbType.Text == "拍单扣除/作废返还")
|
||||||
data3 += "&type_in=20,23";
|
data3 += "&type_in=20,23";
|
||||||
if (cmbType.Text == "超重扣费支出")
|
else if (cmbType.Text == "超重扣费支出")
|
||||||
data3 += "&type_in=24";
|
data3 += "&type_in=24";
|
||||||
if (cmbType.Text == "退货包裹扣费支出")
|
else if (cmbType.Text == "退货包裹扣费支出")
|
||||||
data3 += "&type_in=26";
|
data3 += "&type_in=26";
|
||||||
if (cmbType.Text == "云仓退货扣费支出")
|
else if (cmbType.Text == "云仓退货扣费支出")
|
||||||
data3 += "&type_in=31";
|
data3 += "&type_in=31";
|
||||||
|
else if (!string.IsNullOrEmpty(cmbType.Text))
|
||||||
|
data3 += "&type_in=" + cmbType.Text;
|
||||||
if (!string.IsNullOrEmpty(txtOutOrderId.Text.Trim()))
|
if (!string.IsNullOrEmpty(txtOutOrderId.Text.Trim()))
|
||||||
data3 += "&order_id_in=" + txtOutOrderId.Text.Trim();
|
data3 += "&order_id_in=" + txtOutOrderId.Text.Trim();
|
||||||
if (!string.IsNullOrEmpty(txtShopOrderNo.Text.Trim()))
|
if (!string.IsNullOrEmpty(txtShopOrderNo.Text.Trim()))
|
||||||
@@ -135,6 +139,7 @@ namespace TemuKJD.WXForms.AdminForms
|
|||||||
payment.user_name,
|
payment.user_name,
|
||||||
payment.order_id,
|
payment.order_id,
|
||||||
payment.amount,
|
payment.amount,
|
||||||
|
payment.oem_amount,
|
||||||
payment.balance,
|
payment.balance,
|
||||||
payment.create_time.ToString("yyyy-MM-dd HH:mm:ss"),
|
payment.create_time.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||||
payment.remark
|
payment.remark
|
||||||
@@ -176,100 +181,6 @@ namespace TemuKJD.WXForms.AdminForms
|
|||||||
pictureBox2.Visible = false;
|
pictureBox2.Visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task GetAllBalanceList()
|
|
||||||
{
|
|
||||||
Invoke(new Action(() =>
|
|
||||||
{
|
|
||||||
this.dgvPayment.Rows.Clear();
|
|
||||||
dgvPayment.CellValueChanged -= dgvPayment_CellValueChanged;
|
|
||||||
}));
|
|
||||||
|
|
||||||
await Task.Run(() =>
|
|
||||||
{
|
|
||||||
int pageCount = 1;
|
|
||||||
int pageSize = 50;
|
|
||||||
var url3 = BaseClass.BuildWXObjString("user/get_user_balance");
|
|
||||||
var data3 = UserLogin.GetSignaturex();
|
|
||||||
Invoke(new Action(() =>
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(txtUserName.Text.Trim()))
|
|
||||||
data3 += "&user_name_in=" + txtUserName.Text.Trim();
|
|
||||||
data3 += "&create_time_begin=" + dtpTimeBegin.Value.ToString("yyyy-MM-dd HH:mm:ss");
|
|
||||||
data3 += "&create_time_end=" + dtpTimeEnd.Value.ToString("yyyy-MM-dd HH:mm:ss");
|
|
||||||
if (cmbType.Text == "充值")
|
|
||||||
data3 += "&type_in=1,30";
|
|
||||||
if (cmbType.Text == "管理员充值")
|
|
||||||
data3 += "&type_in=1";
|
|
||||||
if (cmbType.Text == "支付宝充值")
|
|
||||||
data3 += "&type_in=30";
|
|
||||||
if (cmbType.Text == "拍单扣除/作废返还")
|
|
||||||
data3 += "&type_in=20,23";
|
|
||||||
if (cmbType.Text == "超重扣费支出")
|
|
||||||
data3 += "&type_in=24";
|
|
||||||
if (cmbType.Text == "退货包裹扣费支出")
|
|
||||||
data3 += "&type_in=26";
|
|
||||||
if (cmbType.Text == "云仓退货扣费支出")
|
|
||||||
data3 += "&type_in=31";
|
|
||||||
if (!string.IsNullOrEmpty(txtOutOrderId.Text.Trim()))
|
|
||||||
data3 += "&order_id_in=" + txtOutOrderId.Text.Trim();
|
|
||||||
if (!string.IsNullOrEmpty(txtShopOrderNo.Text.Trim()))
|
|
||||||
data3 += "&remark_fulltext=" + txtShopOrderNo.Text.Trim();
|
|
||||||
data3 += "&page=" + ucSplitPage1.CurrentPage;
|
|
||||||
data3 += "&page_size=" + ucSplitPage1.PageSize;
|
|
||||||
pageSize = ucSplitPage1.PageSize;
|
|
||||||
}));
|
|
||||||
var html3 = GetHtml.PostUtf8(url3, data3);
|
|
||||||
if (string.IsNullOrEmpty(html3) || !html3.Contains("\"code\":200"))
|
|
||||||
html3 = GetHtml.PostUtf8(url3, data3);
|
|
||||||
if (string.IsNullOrEmpty(html3) || !html3.Contains("\"code\":200"))
|
|
||||||
{
|
|
||||||
BaseMsgForm.ShowError("查询失败:" + BaseRegex.GetStringJsonByRegs(ref html3, html3, "msg"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<user_payment_record> paymentList = new List<user_payment_record>();
|
|
||||||
paymentList = JsonHelper.DeserializeJsonToList<user_payment_record>(JsonHelper.JObjectParse(html3)["data"].ParseToString());
|
|
||||||
foreach (var payment in paymentList)
|
|
||||||
{
|
|
||||||
Invoke(new Action(() =>
|
|
||||||
{
|
|
||||||
var rowIndex = this.dgvPayment.Rows.Add(
|
|
||||||
true,
|
|
||||||
((EnumOrderPaymentType)payment.type.ParseToInt()).ParseToString(),
|
|
||||||
payment.user_name,
|
|
||||||
payment.order_id,
|
|
||||||
payment.amount,
|
|
||||||
payment.balance,
|
|
||||||
payment.create_time.ToString("yyyy-MM-dd HH:mm:ss"),
|
|
||||||
payment.remark
|
|
||||||
);
|
|
||||||
var row = this.dgvPayment.Rows[rowIndex];
|
|
||||||
row.Height = 60;
|
|
||||||
|
|
||||||
var rowExists = dgvPayment.Rows.Cast<DataGridViewRow>()
|
|
||||||
.Where(r => r.Cells["colOrderId"].Value.ParseToString() == payment.order_id && r.Cells["colType"].Value.ParseToString() == "中转仓作废返还收入").ToList();
|
|
||||||
if (rowExists.Count > 1)
|
|
||||||
{
|
|
||||||
var c = Color.FromArgb(Randomx.GetId(127, 200), Randomx.GetId(127, 200), Randomx.GetId(127, 200));
|
|
||||||
foreach (var rowExist in rowExists)
|
|
||||||
{
|
|
||||||
rowExist.Cells["colOrderId"].Style.BackColor = c;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
int count = BaseRegex.GetIntJson(ref html3, "count");
|
|
||||||
pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt();
|
|
||||||
pageCount = Math.Max(pageCount, 1);
|
|
||||||
ucSplitPage1.TotalPage = pageCount;
|
|
||||||
});
|
|
||||||
Invoke(new Action(() =>
|
|
||||||
{
|
|
||||||
GetProfit();
|
|
||||||
dgvPayment.CellValueChanged += dgvPayment_CellValueChanged;
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
private async void ucSplitPage1_PageChange(object obj)
|
private async void ucSplitPage1_PageChange(object obj)
|
||||||
{
|
{
|
||||||
pictureBox2.Visible = true;
|
pictureBox2.Visible = true;
|
||||||
|
|||||||
@@ -204,6 +204,9 @@
|
|||||||
<metadata name="colAmount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="colAmount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="colOemAmount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="colBalance.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="colBalance.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|||||||
@@ -399,6 +399,7 @@ namespace Work._29Tools.Forms.UserForms
|
|||||||
"充值",
|
"充值",
|
||||||
"管理员充值",
|
"管理员充值",
|
||||||
"支付宝充值",
|
"支付宝充值",
|
||||||
|
"礼物单支出",
|
||||||
"拍单扣除/作废返还",
|
"拍单扣除/作废返还",
|
||||||
"超重扣费支出",
|
"超重扣费支出",
|
||||||
"退货包裹扣费支出",
|
"退货包裹扣费支出",
|
||||||
|
|||||||
@@ -137,18 +137,22 @@ namespace Work._29Tools.Forms.UserForms
|
|||||||
data3 += "&create_time_end=" + dtpTimeEnd.Value.ToString("yyyy-MM-dd HH:mm:ss");
|
data3 += "&create_time_end=" + dtpTimeEnd.Value.ToString("yyyy-MM-dd HH:mm:ss");
|
||||||
if (cmbType.Text == "充值")
|
if (cmbType.Text == "充值")
|
||||||
data3 += "&type_in=1,30";
|
data3 += "&type_in=1,30";
|
||||||
if (cmbType.Text == "管理员充值")
|
else if (cmbType.Text == "管理员充值")
|
||||||
data3 += "&type_in=1";
|
data3 += "&type_in=1";
|
||||||
if (cmbType.Text == "支付宝充值")
|
else if (cmbType.Text == "支付宝充值")
|
||||||
data3 += "&type_in=30";
|
data3 += "&type_in=30";
|
||||||
if (cmbType.Text == "拍单扣除/作废返还")
|
else if (cmbType.Text == "礼物单支出")
|
||||||
|
data3 += "&type_in=16";
|
||||||
|
else if (cmbType.Text == "拍单扣除/作废返还")
|
||||||
data3 += "&type_in=20,23";
|
data3 += "&type_in=20,23";
|
||||||
if (cmbType.Text == "超重扣费支出")
|
else if (cmbType.Text == "超重扣费支出")
|
||||||
data3 += "&type_in=24";
|
data3 += "&type_in=24";
|
||||||
if (cmbType.Text == "退货包裹扣费支出")
|
else if(cmbType.Text == "退货包裹扣费支出")
|
||||||
data3 += "&type_in=26";
|
data3 += "&type_in=26";
|
||||||
if (cmbType.Text == "云仓退货扣费支出")
|
else if (cmbType.Text == "云仓退货扣费支出")
|
||||||
data3 += "&type_in=31";
|
data3 += "&type_in=31";
|
||||||
|
else if (!string.IsNullOrEmpty(cmbType.Text))
|
||||||
|
data3 += "&type_in=" + cmbType.Text;
|
||||||
data3 += "&page=" + ucSplitPage1.CurrentPage;
|
data3 += "&page=" + ucSplitPage1.CurrentPage;
|
||||||
data3 += "&page_size=" + ucSplitPage1.PageSize;
|
data3 += "&page_size=" + ucSplitPage1.PageSize;
|
||||||
pageSize = ucSplitPage1.PageSize;
|
pageSize = ucSplitPage1.PageSize;
|
||||||
@@ -201,6 +205,108 @@ namespace Work._29Tools.Forms.UserForms
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public async Task GetAllBalanceList()
|
||||||
|
{
|
||||||
|
Invoke(new Action(() =>
|
||||||
|
{
|
||||||
|
this.dgvPayment.Rows.Clear();
|
||||||
|
dgvPayment.CellValueChanged -= dgvPayment_CellValueChanged;
|
||||||
|
}));
|
||||||
|
|
||||||
|
await Task.Run(() =>
|
||||||
|
{
|
||||||
|
int pageCount = 1;
|
||||||
|
int pageSize = 50;
|
||||||
|
var url3 = BaseClass.BuildWXObjString("user/get_user_balance");
|
||||||
|
var data3 = UserLogin.GetSignaturex();
|
||||||
|
Invoke(new Action(() =>
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(txtUserName.Text.Trim()))
|
||||||
|
data3 += "&user_name_in=" + txtUserName.Text.Trim();
|
||||||
|
data3 += "&create_time_begin=" + dtpTimeBegin.Value.ToString("yyyy-MM-dd HH:mm:ss");
|
||||||
|
data3 += "&create_time_end=" + dtpTimeEnd.Value.ToString("yyyy-MM-dd HH:mm:ss");
|
||||||
|
if (cmbType.Text == "充值")
|
||||||
|
data3 += "&type_in=1,30";
|
||||||
|
else if (cmbType.Text == "管理员充值")
|
||||||
|
data3 += "&type_in=1";
|
||||||
|
else if (cmbType.Text == "支付宝充值")
|
||||||
|
data3 += "&type_in=30";
|
||||||
|
else if (cmbType.Text == "礼物单支出")
|
||||||
|
data3 += "&type_in=16";
|
||||||
|
else if (cmbType.Text == "拍单扣除/作废返还")
|
||||||
|
data3 += "&type_in=20,23";
|
||||||
|
else if (cmbType.Text == "超重扣费支出")
|
||||||
|
data3 += "&type_in=24";
|
||||||
|
else if (cmbType.Text == "退货包裹扣费支出")
|
||||||
|
data3 += "&type_in=26";
|
||||||
|
else if (cmbType.Text == "云仓退货扣费支出")
|
||||||
|
data3 += "&type_in=31";
|
||||||
|
else if (!string.IsNullOrEmpty(cmbType.Text))
|
||||||
|
data3 += "&type_in=" + cmbType.Text;
|
||||||
|
//if (!string.IsNullOrEmpty(txtOutOrderId.Text.Trim()))
|
||||||
|
// data3 += "&order_id_in=" + txtOutOrderId.Text.Trim();
|
||||||
|
//if (!string.IsNullOrEmpty(txtShopOrderNo.Text.Trim()))
|
||||||
|
// data3 += "&remark_fulltext=" + txtShopOrderNo.Text.Trim();
|
||||||
|
data3 += "&page=" + ucSplitPage1.CurrentPage;
|
||||||
|
data3 += "&page_size=" + ucSplitPage1.PageSize;
|
||||||
|
pageSize = ucSplitPage1.PageSize;
|
||||||
|
}));
|
||||||
|
var html3 = GetHtml.PostUtf8(url3, data3);
|
||||||
|
if (string.IsNullOrEmpty(html3) || !html3.Contains("\"code\":200"))
|
||||||
|
html3 = GetHtml.PostUtf8(url3, data3);
|
||||||
|
if (string.IsNullOrEmpty(html3) || !html3.Contains("\"code\":200"))
|
||||||
|
{
|
||||||
|
BaseMsgForm.ShowError("查询失败:" + BaseRegex.GetStringJsonByRegs(ref html3, html3, "msg"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<user_payment_record> paymentList = new List<user_payment_record>();
|
||||||
|
paymentList = JsonHelper.DeserializeJsonToList<user_payment_record>(JsonHelper.JObjectParse(html3)["data"].ParseToString());
|
||||||
|
foreach (var payment in paymentList)
|
||||||
|
{
|
||||||
|
Invoke(new Action(() =>
|
||||||
|
{
|
||||||
|
var rowIndex = this.dgvPayment.Rows.Add(
|
||||||
|
true,
|
||||||
|
((EnumOrderPaymentType)payment.type.ParseToInt()).ParseToString(),
|
||||||
|
payment.user_name,
|
||||||
|
payment.order_id,
|
||||||
|
payment.amount,
|
||||||
|
payment.oem_amount,
|
||||||
|
payment.balance,
|
||||||
|
payment.create_time.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||||
|
payment.remark
|
||||||
|
);
|
||||||
|
var row = this.dgvPayment.Rows[rowIndex];
|
||||||
|
row.Height = 60;
|
||||||
|
|
||||||
|
var rowExists = dgvPayment.Rows.Cast<DataGridViewRow>()
|
||||||
|
.Where(r => r.Cells["colOrderId"].Value.ParseToString() == payment.order_id && r.Cells["colType"].Value.ParseToString() == "中转仓作废返还收入").ToList();
|
||||||
|
if (rowExists.Count > 1)
|
||||||
|
{
|
||||||
|
var c = Color.FromArgb(Randomx.GetId(127, 200), Randomx.GetId(127, 200), Randomx.GetId(127, 200));
|
||||||
|
foreach (var rowExist in rowExists)
|
||||||
|
{
|
||||||
|
rowExist.Cells["colOrderId"].Style.BackColor = c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
int count = BaseRegex.GetIntJson(ref html3, "count");
|
||||||
|
pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt();
|
||||||
|
pageCount = Math.Max(pageCount, 1);
|
||||||
|
ucSplitPage1.TotalPage = pageCount;
|
||||||
|
});
|
||||||
|
Invoke(new Action(() =>
|
||||||
|
{
|
||||||
|
GetProfit();
|
||||||
|
dgvPayment.CellValueChanged += dgvPayment_CellValueChanged;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private async void btnSearch_Click(object sender, EventArgs e)
|
private async void btnSearch_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (cancellationTokenSource != null)
|
if (cancellationTokenSource != null)
|
||||||
|
|||||||
Reference in new issue
Block a user