Commit a152cd91 by NitefullWind

1. 账户有至少和最多充值金额限制。 2. 改变重置按钮样式。

parent 327ffb73
......@@ -91,7 +91,8 @@ struct{
const QString Member_type = "member_type";
const QString IsActive = "is_active";
const QString Inner_code = "inner_code";
const QString Recharge_value = "recharge_value";
const QString Max_recharge_value= "max_recharge_value";
const QString Min_recharge_value= "min_recharge_value";
const QString Name = "name";
const QString Birthday = "birthday";
......
......@@ -77,7 +77,8 @@ void TaskLogin::onLogin()
session()->addData(PosProps.Score, getServerJsonValue(PosProps.Score).toInt());
session()->addData(PosProps.Score_value, getServerJsonValue(PosProps.Score_value).toInt());
session()->addData(PosProps.IsActive, getServerJsonValue(PosProps.IsActive).toInt());
session()->addData(PosProps.Recharge_value, getServerJsonValue(PosProps.Recharge_value).toInt());
session()->addData(PosProps.Max_recharge_value, getServerJsonValue(PosProps.Max_recharge_value).toInt());
session()->addData(PosProps.Min_recharge_value, getServerJsonValue(PosProps.Min_recharge_value).toInt());
closeWindow();
}
}
......
......@@ -41,12 +41,15 @@ void FMVipFund::initWnd(Session *session)
double amount = session->data(PosProps.Amount).toInt() / 100.0;
double max_recharge = session->data(PosProps.Recharge_value).toInt() / 100.0;
double max_recharge = session->data(PosProps.Max_recharge_value).toInt() / 100.0;
double min_recharge = session->data(PosProps.Min_recharge_value).toInt() / 100.0;
for (auto &btn : _digit_group->buttons()) {
QString digit = btn->text();
digit = digit.replace("¥", "");
if(digit.toDouble() > max_recharge) {
btn->setText(QString("该账户最多充值\n %1 元").arg(max_recharge));
btn->setEnabled(false);
}
if(digit.toDouble() < min_recharge) {
btn->setEnabled(false);
}
}
......
......@@ -79,16 +79,17 @@ QWidget {
}
#amount QPushButton {
font: 400 28px &quot;Microsoft YaHei&quot;;
/*
min-height: 108px; max-height: 108px;
min-width: 280px;
*/
background : #7aad65;
border: 1 solid gray;
}
#amount QPushButton[enabled=&quot;false&quot;] {
background-color: rgb(159, 159, 159);
}
#amount QPushButton:hover {
border-color: rgb(255,255,255);
border-width: 3 0 0 3;
}
#amount QPushButton:checked {
/*background: rgb(47,165,253);*/
background : #7aad65;
border: 0;
color: white;
}
......@@ -471,6 +472,9 @@ QPushButton#fund_btn:hover {
</item>
<item row="0" column="0">
<widget class="QPushButton" name="one">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
......@@ -503,6 +507,9 @@ QPushButton#fund_btn:hover {
</item>
<item row="0" column="1">
<widget class="QPushButton" name="two">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment