快递拍单更改每单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

+58 -1
View File
@@ -127,6 +127,7 @@ namespace TemuKJD.WXForms.ShopForms
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");
@@ -157,6 +158,8 @@ namespace TemuKJD.WXForms.ShopForms
(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" ? "添加店铺" : "",
"编辑",
"删除");
@@ -202,6 +205,7 @@ namespace TemuKJD.WXForms.ShopForms
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();
var row = dgvUser.Rows[e.RowIndex];
if (columText == "编辑")
{
@@ -269,9 +273,18 @@ namespace TemuKJD.WXForms.ShopForms
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;
}
}
if (columText == "")
row.Cells["colSelect"].Value = !row.Cells["colSelect"].Value.ParseToBool();
row.Cells["colCheck"].Value = !row.Cells["colCheck"].Value.ParseToBool();
}
public void Delete(string uid)
@@ -314,6 +327,7 @@ namespace TemuKJD.WXForms.ShopForms
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.txtSearch.GotFocus += TxtSearch_GotFocus;
this.txtSearch.LostFocus += TxtSearch_LostFocus;
@@ -326,6 +340,10 @@ namespace TemuKJD.WXForms.ShopForms
this.dgvUser.AddMergeColumnHeader(new List<string> { "colBalance", "colBalancePlus" }, "快递余额");
this.dgvUser.AddMergeColumn(new List<string> { "colPostagePerOrder", "colChangePostagePerOrder" });
this.dgvUser.AddMergeColumnHeader(new List<string> { "colPostagePerOrder", "colChangePostagePerOrder" }, "每单快递费");
this.dgvUser.AddMergeColumn(new List<string> { "colRefundPostagePerOrder", "colChangeRefundPostagePerOrder" });
this.dgvUser.AddMergeColumnHeader(new List<string> { "colRefundPostagePerOrder", "colChangeRefundPostagePerOrder" }, "每单退货快递费");
this.dgvUser.AddMergeColumn(new List<string> { "colGiftOemAmountPerOrder", "colChangeRefundPostagePerOrder" });
this.dgvUser.AddMergeColumnHeader(new List<string> { "colGiftOemAmountPerOrder", "colChangeGiftOemAmountPerOrder" }, "每单礼物额外收取");
}
private void TxtSearch_LostFocus(object sender, EventArgs e)
@@ -557,5 +575,44 @@ namespace TemuKJD.WXForms.ShopForms
{
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;
}
}
}