Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_vip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaojing.zhang
fmp_vip
Commits
15076e58
Commit
15076e58
authored
Aug 14, 2017
by
NitefullWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 修复支付界面金额变化问题。 2. 限制使用支付码支付。 3. 修复在认证界面按Esc会进入支付界面的Bug。 4. 修改一些界面。
parent
6e5a131f
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
46 additions
and
27 deletions
+46
-27
global.h
+1
-1
task/fmtask.cpp
+4
-2
task/taskfund.cpp
+1
-1
task/tasklogin.cpp
+7
-7
task/taskpay.cpp
+9
-1
windows/fmmsgwnd.cpp
+4
-4
windows/fmviporder.cpp
+17
-8
windows/fmvipwnd.cpp
+1
-1
windows/forms/fmviplogin.ui
+1
-1
windows/forms/fmviporder.ui
+1
-1
No files found.
global.h
View file @
15076e58
...
...
@@ -75,7 +75,7 @@ struct PP{
Mobile
=
"mobile"
;
Fm_open_id
=
"fm_open_id"
;
Account
=
"account"
;
CanPay
=
"
CanP
ay"
;
CanPay
=
"
can_p
ay"
;
Score
=
"score"
;
...
...
task/fmtask.cpp
View file @
15076e58
...
...
@@ -61,7 +61,7 @@ void FMTask::stopTask()
preTask
->
stopTask
();
}
if
(
_window
!=
nullptr
)
{
_window
->
close
();
_window
->
accept
();
_window
=
nullptr
;
}
...
...
@@ -81,6 +81,8 @@ void FMTask::showWindow()
{
FMP_DEBUG
()
<<
__FUNCTION__
;
QString
sL
[]
=
{
PosProps
.
StoreId
,
PosProps
.
PosId
,
PosProps
.
OperatorId
,
PosProps
.
BussinessDate
,
};
...
...
@@ -93,7 +95,7 @@ void FMTask::showWindow()
if
(
_window
!=
nullptr
)
{
_window
->
initWnd
(
this
->
session
());
int
ret
=
_window
->
exec
();
if
(
ret
==
-
1
)
{
if
(
ret
!=
1
)
{
setError
(
FM_API_WINDOWCLOSE
);
}
}
...
...
task/taskfund.cpp
View file @
15076e58
...
...
@@ -55,5 +55,5 @@ void TaskFund::packagePOSRsp()
void
TaskFund
::
onFund
()
{
sendToServer
();
_window
->
close
();
_window
->
reject
();
}
task/tasklogin.cpp
View file @
15076e58
...
...
@@ -37,7 +37,7 @@ void TaskLogin::onLogin()
bool
isOk
=
sendToServer
();
if
(
!
isOk
)
{
if
(
_window
!=
nullptr
)
{
_window
->
close
();
_window
->
accept
();
}
return
;
}
...
...
@@ -49,11 +49,11 @@ void TaskLogin::onLogin()
FMMsgWnd
::
FailureWnd
(
info
,
_window
);
}
// 认证成功但限制用支付码
//
else if((session()->data(PosProps.FM_Type).toInt() == FM_Pay) &&
//
(getServerJsonValue(PosProps.CanPay).toInt() != 1)) {
//
FMP_WARN() << ErrorNeedPayCode;
// FMMsgWnd::FailureWnd(ErrorNeedPayCode
);
//
}
else
if
((
session
()
->
data
(
PosProps
.
FM_Type
).
toInt
()
==
FM_Pay
)
&&
(
getServerJsonValue
(
PosProps
.
CanPay
).
toInt
()
!=
1
))
{
FMP_WARN
()
<<
ErrorNeedPayCode
;
FMMsgWnd
::
FailureWnd
(
QString
::
fromLocal8Bit
(
ErrorNeedPayCode
),
_window
);
}
// 认证成功
else
{
QString
fm_open_id
=
getServerJsonValue
(
PosProps
.
Fm_open_id
).
toString
();
...
...
@@ -87,7 +87,7 @@ void TaskLogin::onLogin()
}
session
()
->
addData
(
PosProps
.
CouponMap
,
couponMap
);
}
_window
->
close
();
_window
->
accept
();
}
if
(
_window
!=
nullptr
)
{
_window
->
resetWnd
();
...
...
task/taskpay.cpp
View file @
15076e58
#
include
"taskpay.h"
#include "fmviporder.h"
#include "tasklogin.h"
#include "fmp_vip_settings.h"
TaskPay
::
TaskPay
(
QJsonObject
&
jsonObj
,
QObject
*
parent
)
:
FMTask
(
jsonObj
,
FM_Pay
,
0
,
parent
)
...
...
@@ -121,5 +122,12 @@ void TaskPay::packagePOSRsp()
void
TaskPay
::
onPay
()
{
sendToServer
();
_window
->
close
();
if
(
error
()
==
FM_API_TIMEOUT
)
{
FMP_INFO
()
<<
"Pay failed: timeout. To reversal."
;
TaskRefundPay
taskRefundPay
(
posReqJsonObj
);
taskRefundPay
.
doTask
();
}
_window
->
accept
();
}
windows/fmmsgwnd.cpp
View file @
15076e58
...
...
@@ -25,17 +25,17 @@ void FMMsgWnd::show(InfoType type, const QString &info)
iconUrl
=
""
;
break
;
case
T_Success
:
iconUrl
=
":/tip_ok.png"
;
iconUrl
=
":/
img/
tip_ok.png"
;
break
;
case
T_Failure
:
iconUrl
=
":/tip_error.png"
;
iconUrl
=
":/
img/
tip_error.png"
;
break
;
case
T_Warning
:
iconUrl
=
":/tip_warning.png"
;
iconUrl
=
":/
img/
tip_warning.png"
;
break
;
case
T_LoginSuccess
:
ui
->
label_msg
->
setText
(
QString
::
fromLocal8Bit
(
"会员认证成功"
));
iconUrl
=
":/tip_ok.png"
;
iconUrl
=
":/
img/
tip_ok.png"
;
break
;
default
:
iconUrl
=
""
;
...
...
windows/fmviporder.cpp
View file @
15076e58
...
...
@@ -31,8 +31,14 @@ bool FMVipOrder::initWnd(Session *session)
QString
operator_id
=
session
->
data
(
PosProps
.
OperatorId
).
toString
();
QString
business_date
=
session
->
data
(
PosProps
.
BussinessDate
).
toString
();
QString
fm_id
=
session
->
data
(
PosProps
.
Account
).
toString
();
QString
fm_id
=
session
->
data
(
PosProps
.
Mobile
).
toString
();
if
(
fm_id
.
isEmpty
())
{
fm_id
=
"--"
;
}
QString
name
=
session
->
data
(
PosProps
.
Name
).
toString
();
if
(
name
.
isEmpty
())
{
name
=
"--"
;
}
QString
birthday
=
session
->
data
(
PosProps
.
Birthday
).
toString
();
QString
amount_str
=
QString
::
number
(
session
->
data
(
PosProps
.
Amount
).
toInt
());
...
...
@@ -48,6 +54,8 @@ bool FMVipOrder::initWnd(Session *session)
double
maxDisAmount
=
(
orderAmount
-
session
->
data
(
PosProps
.
UndisAmount
).
toInt
())
/
100.0
;
orderInfo
->
setMaxDisAmount
(
maxDisAmount
);
ui
->
store_label
->
setText
(
session
->
data
(
PosProps
.
StoreId
).
toString
());
ui
->
pos_label
->
setText
(
session
->
data
(
PosProps
.
PosId
).
toString
());
ui
->
operator_label
->
setText
(
operator_id
);
ui
->
bd_label
->
setText
(
business_date
);
ui
->
id_label
->
setText
(
fm_id
);
...
...
@@ -93,6 +101,7 @@ void FMVipOrder::on_pay_chk_clicked(bool checked)
int
is
=
checked
?
1
:
0
;
session
()
->
addData
(
ServerProps
(
PosProps
.
IsUseScore
),
is
);
orderInfo
->
setUseScore
(
checked
);
oldPayText
=
DOUBLE_STR
(
orderInfo
->
getMaxWillPay
());
setWillPayText
();
}
...
...
@@ -158,6 +167,7 @@ void FMVipOrder::onSelectionChanged(const QItemSelection &selected, const QItemS
orderInfo
->
setMaxDisAmount
(
orderInfo
->
getMaxDisAmount
()
+
coupon
.
limitAmount
());
}
orderInfo
->
enoughCoupon
();
oldPayText
=
DOUBLE_STR
(
orderInfo
->
getMaxWillPay
());
setWillPayText
();
}
...
...
@@ -165,8 +175,8 @@ void FMVipOrder::setWillPayText()
{
on_pay_edit_textChanged
(
oldPayText
);
ui
->
pay_edit
->
setFocus
();
ui
->
pay_edit
->
selectAll
();
//
ui->pay_edit->setFocus();
//
ui->pay_edit->selectAll();
}
void
FMVipOrder
::
on_coupon_prev_btn_clicked
()
...
...
@@ -185,19 +195,18 @@ void FMVipOrder::on_pay_edit_textChanged(const QString &text)
{
double
num
=
text
.
toDouble
();
double
maxPay
=
orderInfo
->
getMaxWillPay
();
if
(
num
>
maxPay
)
{
ui
->
pay_edit
->
setText
(
DOUBLE_STR
(
maxPay
));
if
(
num
>
maxPay
)
{
QString
maxPay_info
=
QString
::
fromLocal8Bit
(
"余额只需支付 %1 元"
);
if
(
maxPay
>=
orderInfo
->
getAmountStr
().
toDouble
())
{
maxPay_info
=
QString
::
fromLocal8Bit
(
"余额最多支付 %1 元"
);
}
ui
->
pay_max
->
setText
(
maxPay_info
.
arg
(
maxPay
));
ui
->
pay_edit
->
setFocus
();
ui
->
pay_edit
->
selectAll
();
ui
->
pay_edit
->
setText
(
DOUBLE_STR
(
maxPay
));
}
else
{
oldPayText
=
text
;
ui
->
pay_max
->
setText
(
""
);
ui
->
pay_edit
->
setText
(
text
);
}
}
windows/fmvipwnd.cpp
View file @
15076e58
...
...
@@ -26,7 +26,7 @@ FMVipWnd::~FMVipWnd()
void
FMVipWnd
::
on_close_btn_clicked
()
{
this
->
done
(
-
1
);
this
->
reject
(
);
}
bool
FMVipWnd
::
close
()
...
...
windows/forms/fmviplogin.ui
View file @
15076e58
...
...
@@ -149,7 +149,7 @@
</size>
</property>
<property
name=
"text"
>
<string
/
>
<string
>
非码会员
</string
>
</property>
</widget>
</item>
...
...
windows/forms/fmviporder.ui
View file @
15076e58
...
...
@@ -329,7 +329,7 @@
</size>
</property>
<property
name=
"text"
>
<string
/
>
<string
>
非码会员
</string
>
</property>
</widget>
</item>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment