快递拍单更改每单oem费用

This commit is contained in:
wule committed 2026-08-14 16:02:53 +08:00
1 parent f80e99cf57
commit 191ecbb57f
16 files changed
+761 -276

No files matched your search

@@ -240,6 +240,7 @@ namespace TemuKJD.WXForms.AdminForms
user.shop_points_per_month = BaseRegex.GetIntJson(ref oStr, "shop_points_per_month");
user.postage_per_order = BaseRegex.GetDecimalJson(ref oStr, "postage_per_order");
user.refund_postage_per_order = BaseRegex.GetDecimalJson(ref oStr, "refund_postage_per_order");
user.gift_oem_amount_per_order = BaseRegex.GetDecimalJson(ref oStr, "gift_oem_amount_per_order");
user.oem_id = BaseRegex.GetStringJson(ref oStr, "oem_id");
user.oem_name = BaseRegex.GetStringJson(ref oStr, "oem_name");
var parent_user_name = BaseRegex.GetStringJson(ref oStr, "parent_user_name");
@@ -271,6 +272,8 @@ namespace TemuKJD.WXForms.AdminForms
(user.group_id == "3") ? "改" : null,
Math.Max(2.5m, user.refund_postage_per_order.ParseToDecimal()),
(user.group_id == "3") ? "改" : null,
Math.Max(2.5m, user.gift_oem_amount_per_order.ParseToDecimal()),
(user.group_id == "3") ? "改" : null,
user.group_id == "3" ? "添加店铺" : "",
"编辑",
"删除");
File diff suppressed because it is too large. Load diff
@@ -173,6 +173,7 @@ namespace TemuKJD.WXForms.AdminForms
user.shop_points_per_month = BaseRegex.GetIntJson(ref oStr, "shop_points_per_month");
user.postage_per_order = BaseRegex.GetDecimalJson(ref oStr, "postage_per_order");
user.refund_postage_per_order = BaseRegex.GetDecimalJson(ref oStr, "refund_postage_per_order");
user.gift_oem_amount_per_order = BaseRegex.GetDecimalJson(ref oStr, "gift_oem_amount_per_order");
user.oem_id = BaseRegex.GetStringJson(ref oStr, "oem_id");
user.oem_name = BaseRegex.GetStringJson(ref oStr, "oem_name");
var parent_user_name = BaseRegex.GetStringJson(ref oStr, "parent_user_name");
@@ -203,6 +204,8 @@ namespace TemuKJD.WXForms.AdminForms
(user.group_id == "3") ? "改" : null,
Math.Max(2.5m, user.refund_postage_per_order.ParseToDecimal()),
(user.group_id == "3") ? "改" : null,
Math.Max(0m, user.gift_oem_amount_per_order.ParseToDecimal()),
(user.group_id == "3") ? "改" : null,
user.group_id == "3" ? "添加店铺" : "",
"编辑",
"删除");
@@ -263,6 +266,7 @@ namespace TemuKJD.WXForms.AdminForms
int shopPointsPerMonth = dgvUser.Rows[e.RowIndex].Cells["colShopPointsPerMonth"].Value.ParseToInt();
decimal postagePerOrder = dgvUser.Rows[e.RowIndex].Cells["colPostagePerOrder"].Value.ParseToDecimal();
decimal refundPostagePerOrder = dgvUser.Rows[e.RowIndex].Cells["colRefundPostagePerOrder"].Value.ParseToDecimal();
decimal giftOemAmountPerOrder = dgvUser.Rows[e.RowIndex].Cells["colGiftOemAmountPerOrder"].Value.ParseToDecimal();
string oemId = dgvUser.Rows[e.RowIndex].Cells["colOemId"].Value.ParseToString();
var row = dgvUser.Rows[e.RowIndex];
if (columText == "编辑")
@@ -329,6 +333,15 @@ namespace TemuKJD.WXForms.AdminForms
this.pnlBalance.Visible = true;
this.pnlBalance.BringToFront();
}
if (columName == "colChangeGiftOemAmountPerOrder")
{
this.lblGiftOemAmountPerOrderUserInfo.Text = mobile + " - " + nickName;
this.numGiftOemAmountPerOrder.Value = giftOemAmountPerOrder;
this.pnlGiftOemAmountPerOrder.Tag = row;
this.pnlGiftOemAmountPerOrder.Visible = true;
this.pnlGiftOemAmountPerOrder.BringToFront();
this.lblGiftOemAmountPerOrderUserId.Text = uid;
}
}
if (columText == "改")
{
@@ -359,6 +372,15 @@ namespace TemuKJD.WXForms.AdminForms
this.pnlRefundPostagePerOrder.BringToFront();
this.lblRefundPostagePerOrderUserId.Text = uid;
}
if (columName == "colChangeGiftOemAmountPerOrder")
{
this.lblGiftOemAmountPerOrderUserInfo.Text = mobile + " - " + nickName;
this.numGiftOemAmountPerOrder.Value = giftOemAmountPerOrder;
this.pnlGiftOemAmountPerOrder.Tag = row;
this.pnlGiftOemAmountPerOrder.Visible = true;
this.pnlGiftOemAmountPerOrder.BringToFront();
this.lblGiftOemAmountPerOrderUserId.Text = uid;
}
}
}
@@ -402,6 +424,7 @@ namespace TemuKJD.WXForms.AdminForms
pnlBalance.Location = new Point(pnlTopUp.Location.X, pnlTopUp.Location.Y);
pnlPostagePerOrder.Location = new Point(pnlTopUp.Location.X, pnlTopUp.Location.Y);
pnlRefundPostagePerOrder.Location = new Point(pnlTopUp.Location.X, pnlTopUp.Location.Y);
pnlGiftOemAmountPerOrder.Location = new Point(pnlTopUp.Location.X, pnlTopUp.Location.Y);
this.cmbGroup.Items.Clear();
this.cmbGroup.Items.Add("主账户");
@@ -656,5 +679,44 @@ namespace TemuKJD.WXForms.AdminForms
{
pnlRefundPostagePerOrder.Visible = false;
}
private void btnGiftOemAmountPerOrder_Click(object sender, EventArgs e)
{
if (updateGiftOemAmountPerOrder(lblGiftOemAmountPerOrderUserId.Text))
{
pnlGiftOemAmountPerOrder.Visible = false;
BaseMsgForm.ShowInfo("修改充值用户店铺月费金额成功");
}
}
public bool updateGiftOemAmountPerOrder(string userDbId, bool showFailBox = true)
{
string url = BaseClass.BuildObjString("user/update_user");
string data = UserLogin.GetSignaturex();
data += "&id=" + userDbId;
data += "&gift_oem_amount_per_order=" + numGiftOemAmountPerOrder.Value;
string html = GetHtml.PostUtf8(url, data.ToString()).Trim();
if (!html.Contains("\"code\":200"))
{
var msg = BaseRegex.GetStringJsonByRegs(ref html, html, "msg");
if (showFailBox)
{
Invoke(new Action(() => { BaseMsgForm.ShowError(msg); }));
}
return false;
}
var row = dgvUser.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["UserIdColumn"].Value.ParseToString() == userDbId);
if (row != null)
{
Invoke(new Action(() => { row.Cells["colGiftOemAmountPerOrder"].Value = numGiftOemAmountPerOrder.Value; }));
}
return true;
}
private void btnGiftOemAmountPerOrderCancel_Click(object sender, EventArgs e)
{
pnlGiftOemAmountPerOrder.Visible = false;
}
}
}
@@ -189,6 +189,12 @@
<metadata name="colChangeRefundPostagePerOrder.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colGiftOemAmountPerOrder.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colChangeGiftOemAmountPerOrder.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colAddShop.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>