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
zhenfei.zhang
fmp_vip
Commits
7c692847
Commit
7c692847
authored
Sep 28, 2017
by
gujin.wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加退款功能
parent
ed18036b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
116 deletions
+77
-116
global.h
+3
-19
task/taskfinal.cpp
+0
-9
task/taskfinal.h
+0
-1
task/taskothers.cpp
+0
-15
task/taskpay.cpp
+70
-71
windows/fmviporder.cpp
+4
-1
No files found.
global.h
View file @
7c692847
...
...
@@ -32,8 +32,8 @@ enum FM_TYPE {
FM_Order_Revoke
,
FM_QR_Pay
=
10031
,
FM_QR_Refund
=
10041
,
FM_Refund_Pay
,
FM_Refund_Order
FM_Refund_Pay
=
1004
,
FM_Refund_Order
=
1005
};
enum
Member_Type
{
...
...
@@ -256,21 +256,8 @@ const PropsMap::value_type PropsMapPairs[] =
PropsMap
::
value_type
(
PosProps
.
ConsumeNum
,
"consumeNum"
),
};
static
PropsMap
PosToServerProps
(
PropsMapPairs
,
PropsMapPairs
+
(
sizeof
(
PropsMapPairs
)
/
sizeof
(
PropsMapPairs
[
0
])));
class
FMPropsMap
{
public
:
static
QString
get
(
QString
posProp
)
{
PropsMap
::
iterator
it
=
PosToServerProps
.
find
(
posProp
);
if
(
it
!=
PosToServerProps
.
end
())
{
return
it
->
second
;
}
return
posProp
;
}
};
#endif
#define ServerProps(posProp) FMPropsMap::get(posProp)
#define ServerProps(posProp) PosToServerProps.find(posProp) == PosToServerProps.end() ? posProp : PosToServerProps[posProp]
// 签名字段
const
static
QString
SignProps
[]
=
{
...
...
@@ -333,10 +320,7 @@ const FMErrorMap fm_error(fm_error_pairs, fm_error_pairs + (sizeof fm_error_pair
#endif
#define AppDirPath qApp->applicationDirPath()
#define QuitCMD "{\"reqType\":-1}"
#endif // GLOBAL_H
task/taskfinal.cpp
View file @
7c692847
...
...
@@ -14,15 +14,6 @@ TaskFinal::TaskFinal(QJsonObject &jsonObj, Session *session, QObject *parent)
{
}
QByteArray
TaskFinal
::
doTask
()
{
serverReqJsonObj
=
posReqJsonObj
;
sendToServer
(
false
);
packagePOSRsp
();
QJsonDocument
json
(
posRspJsonObj
);
return
json
.
toJson
(
QJsonDocument
::
Compact
);
}
void
TaskFinal
::
packageServerReq
()
{
isUseVipPay
=
false
;
...
...
task/taskfinal.h
View file @
7c692847
...
...
@@ -7,7 +7,6 @@ class TaskFinal : public FMTaskNoWnd
Q_OBJECT
public
:
explicit
TaskFinal
(
QJsonObject
&
jsonObj
,
Session
*
session
=
0
,
QObject
*
parent
=
0
);
virtual
QByteArray
doTask
();
void
packageServerReq
();
bool
sendToServer
(
bool
isShowMsg
=
true
);
void
packagePOSRsp
();
...
...
task/taskothers.cpp
View file @
7c692847
...
...
@@ -42,21 +42,6 @@ void TaskCoupon::packagePOSRsp()
int
type
=
couponOb
[
ServerProps
(
PosProps
.
Coupon_type
)].
toInt
();
QString
limitTime
=
couponOb
[
"expiration_date"
].
toString
();
// double disAmount = qRound((1-amount)*canDisAmount/100);
// if(amount<1) // 折扣券
// {
// Coupon c(desc, code, "discount", disAmount , 0, limitTime, false);
// c.setDiscountFactor(amount*10);
// QVariant v;
// v.setValue(c);
// couponMap[code] = v;
// } else {
// Coupon c(desc, code, QString::number(type), amount, 0, limitTime, false);
// QVariant v;
// v.setValue(c);
// couponMap[code] = v;
// }
Coupon
c
(
desc
,
code
,
QString
::
number
(
type
),
amount
,
0
,
limitTime
,
true
);
QVariant
v
;
v
.
setValue
(
c
);
...
...
task/taskpay.cpp
View file @
7c692847
This diff is collapsed.
Click to expand it.
windows/fmviporder.cpp
View file @
7c692847
...
...
@@ -153,7 +153,10 @@ void FMVipOrder::onSelectionChanged(const QItemSelection &selected, const QItemS
orderInfo
->
selectCouponMap
.
remove
(
coupon
.
code
());
orderInfo
->
setMaxDisAmount
(
orderInfo
->
getMaxDisAmount
()
+
coupon
.
limitAmount
());
}
orderInfo
->
enoughCoupon
();
if
(
orderInfo
->
enoughCoupon
())
{
FMMsgWnd
::
WarningWnd
(
QString
::
fromLocal8Bit
(
"已超出待付金额"
),
this
);
}
oldPayText
=
DOUBLE_STR
(
orderInfo
->
getMaxWillPay
());
setWillPayText
();
}
...
...
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