1打包逻辑优化 2代理逻辑优化 3新的拼多多数据格式支持
This commit is contained in:
1 parent
f703e15f11
commit
554d1f4b4f
30 files changed
+1400
-82
No files matched your search
@@ -163,8 +163,8 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
user.company_name = BaseRegex.GetStringJson(ref oStr, "company_name");
|
||||
user.sa_level = BaseRegex.GetIntJson(ref oStr, "sa_level");
|
||||
user.authority = BaseRegex.GetStringJson(ref oStr, "authority");
|
||||
user.group_id = BaseRegex.GetStringJson(ref oStr, "group_id");
|
||||
user.points = BaseRegex.GetIntJson(ref oStr, "points");
|
||||
user.balance = BaseRegex.GetDecimalJson(ref oStr, "balance");
|
||||
user.shop_points_per_month = BaseRegex.GetIntJson(ref oStr, "shop_points_per_month");
|
||||
var parent_user_name = BaseRegex.GetStringJson(ref oStr, "parent_user_name");
|
||||
|
||||
@@ -185,6 +185,8 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
(user.authority.Contains("充值用户") && user.group_id == "3") ? "改" : null,
|
||||
(user.authority.Contains("充值用户") && user.group_id == "3") ? (int?)user.points : null,
|
||||
(user.authority.Contains("充值用户") && user.group_id == "3") ? "+" : null,
|
||||
user.balance.ParseToDecimal(),
|
||||
"+",
|
||||
user.group_id == "3" ? "添加店铺" : "",
|
||||
"编辑",
|
||||
"删除");
|
||||
@@ -230,7 +232,8 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
{
|
||||
if (e.ColumnIndex < 0 || e.RowIndex < 0)
|
||||
return;
|
||||
string columname = dgvUser.Columns[e.ColumnIndex].HeaderText;
|
||||
string columText = dgvUser.Columns[e.ColumnIndex].HeaderText;
|
||||
string columName = dgvUser.Columns[e.ColumnIndex].Name;
|
||||
string uid = dgvUser.Rows[e.RowIndex].Cells["UseridColumn"].Value.ToString();
|
||||
string nickName = dgvUser.Rows[e.RowIndex].Cells["UserNickNameColumn"].Value.ToString();
|
||||
string mobile = dgvUser.Rows[e.RowIndex].Cells["mobileColumn"].Value.ToString();
|
||||
@@ -240,7 +243,7 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
string authority = dgvUser.Rows[e.RowIndex].Cells["colAuthority"].Value.ParseToString();
|
||||
int shopPointsPerMonth = dgvUser.Rows[e.RowIndex].Cells["colShopPointsPerMonth"].Value.ParseToInt();
|
||||
var row = dgvUser.Rows[e.RowIndex];
|
||||
if (columname == "编辑")
|
||||
if (columText == "编辑")
|
||||
{
|
||||
Uid = uid;
|
||||
txtNickName.Text = nickName;
|
||||
@@ -263,14 +266,14 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
chkHot.Checked = authority.Contains(chkHot.Text);
|
||||
chkWXShowProdGetFromType.Checked = authority.Contains(chkWXShowProdGetFromType.Text);
|
||||
}
|
||||
if (columname == "删除")
|
||||
if (columText == "删除")
|
||||
{
|
||||
if (BaseMsgForm.ShowConfirm("是否删除,删除后无法再次添加", "提示").DialogResult == DialogResult.OK)
|
||||
{
|
||||
Delete(uid);
|
||||
}
|
||||
}
|
||||
if (columname == "添加店铺")
|
||||
if (columText == "添加店铺")
|
||||
{
|
||||
WXAdminShopListForm shopListForm = new WXAdminShopListForm();
|
||||
shopListForm.UserAccountInfo = AllUsers.FirstOrDefault(u => u.user_name == mobile);
|
||||
@@ -278,14 +281,24 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
shopListForm.btnAddToAccount.Visible = true;
|
||||
shopListForm.ShowDialog();
|
||||
}
|
||||
if (columname == "+")
|
||||
if (columText == "+")
|
||||
{
|
||||
this.lblUserInfo.Text = mobile + " - " + nickName;
|
||||
this.numAddTopUp.Value = 0;
|
||||
this.pnlTopUp.Tag = row;
|
||||
this.pnlTopUp.Visible = true;
|
||||
if (columName == "colPlus")
|
||||
{
|
||||
this.lblUserInfo.Text = mobile + " - " + nickName;
|
||||
this.numAddTopUp.Value = 0;
|
||||
this.pnlTopUp.Tag = row;
|
||||
this.pnlTopUp.Visible = true;
|
||||
}
|
||||
if (columName == "colBalancePlus")
|
||||
{
|
||||
this.lblUserBalanceInfo.Text = mobile + " - " + nickName;
|
||||
this.numAddBalance.Value = 0;
|
||||
this.pnlBalance.Tag = row;
|
||||
this.pnlBalance.Visible = true;
|
||||
}
|
||||
}
|
||||
if (columname == "改")
|
||||
if (columText == "改")
|
||||
{
|
||||
this.lblShopPointsPerMonthUserInfo.Text = mobile + " - " + nickName;
|
||||
this.numShopPointsPerMonth.Value = shopPointsPerMonth;
|
||||
@@ -330,6 +343,7 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
private void MainAccountForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
pnlShopPointsPerMonth.Location = new Point(pnlTopUp.Location.X, pnlTopUp.Location.Y);
|
||||
pnlBalance.Location = new Point(pnlTopUp.Location.X, pnlTopUp.Location.Y);
|
||||
|
||||
this.cmbGroup.Items.Clear();
|
||||
this.cmbGroup.Items.Add("主账户");
|
||||
@@ -347,6 +361,8 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
this.dgvUser.AddMergeColumnHeader(new List<string> { "colShopPointsPerMonth", "colChangePointsPerMonth" }, "月费耗点");
|
||||
this.dgvUser.AddMergeColumn(new List<string> { "colPoints", "colPlus" });
|
||||
this.dgvUser.AddMergeColumnHeader(new List<string> { "colPoints", "colPlus" }, "积分点数");
|
||||
this.dgvUser.AddMergeColumn(new List<string> { "colBalance", "colBalancePlus" });
|
||||
this.dgvUser.AddMergeColumnHeader(new List<string> { "colBalance", "colBalancePlus" }, "快递余额");
|
||||
}
|
||||
|
||||
private void TxtSearch_LostFocus(object sender, EventArgs e)
|
||||
@@ -457,5 +473,36 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
pnlShopPointsPerMonth.Visible = false;
|
||||
BaseMsgForm.ShowInfo("修改充值用户店铺月费金额成功");
|
||||
}
|
||||
|
||||
private void btnChangeBalanceOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
string url = BaseClass.BuildObjString("user/update_user_balance");
|
||||
string data = UserLogin.GetSignaturex();
|
||||
data += "&update_user_name=" + lblUserBalanceInfo.Text.Split('-')[0].Trim();
|
||||
data += "&update_user_nick=" + lblUserBalanceInfo.Text.Split('-')[1].Trim();
|
||||
data += "&option_type=" + "充值";
|
||||
data += "&operator_name=" + BaseClass.UserName;
|
||||
data += "&delta_balance=" + numAddBalance.Value;
|
||||
|
||||
string html = GetHtml.PostUtf8(url, data.ToString()).Trim();
|
||||
if (!html.Contains("\"code\":200"))
|
||||
{
|
||||
var msg = BaseRegex.GetStringJsonByRegs(ref html, html, "msg");
|
||||
BaseMsgForm.ShowError(msg);
|
||||
return;
|
||||
}
|
||||
var row = pnlBalance.Tag as DataGridViewRow;
|
||||
if (row != null)
|
||||
{
|
||||
row.Cells["colBalance"].Value = row.Cells["colBalance"].Value.ParseToDecimal() + numAddBalance.Value;
|
||||
}
|
||||
pnlBalance.Visible = false;
|
||||
BaseMsgForm.ShowInfo("充值成功");
|
||||
}
|
||||
|
||||
private void btnChangeBalanceCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
pnlBalance.Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user