Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FMVip_LXJ
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
FMVip_LXJ
Commits
f06483a1
Commit
f06483a1
authored
Jan 11, 2017
by
NitefullWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 修复积分消费bug。 2. 修复支付返回bug。 3. 新增一个弹出窗口确保输入框能获取焦点。
parent
c2e00688
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
7 deletions
+25
-7
FMVip_LXJ/main.cpp
+6
-1
FMVip_LXJ/task/taskpay.cpp
+17
-4
FMVip_LXJ/windows/fmviporder.cpp
+2
-2
No files found.
FMVip_LXJ/main.cpp
View file @
f06483a1
...
...
@@ -4,6 +4,7 @@
#include "resend.h"
#include "reader.h"
#include "include/fmutils/fmutils.hpp"
#include <QWidget>
//global.h 中声明 读卡器是否初始化||初始化是否成功标识
bool
g_init_reader_flg
=
false
;
...
...
@@ -21,7 +22,11 @@ int main(int argc, char *argv[])
auto
reSend
=
new
ReSend
();
reSend
->
start
();
//qInstallMessageHandler(customMessageHandler);
qInstallMessageHandler
(
customMessageHandler
);
QWidget
w
;
w
.
show
();
w
.
close
();
FMVipDispatcher
relay
;
FMSockServer
server
(
&
relay
);
...
...
FMVip_LXJ/task/taskpay.cpp
View file @
f06483a1
...
...
@@ -36,7 +36,7 @@ void TaskPay::packageServerReq()
QJsonObject
transObj
;
transObj
[
ServerProps
(
PosProps
.
Fm_open_id
)]
=
session
()
->
data
(
PosProps
.
Fm_open_id
).
toString
();
transObj
[
ServerProps
(
PosProps
.
CodeAmount
)]
=
session
()
->
data
(
PosProps
.
CodeAmount
).
toInt
();
transObj
[
ServerProps
(
PosProps
.
IsUseScore
)]
=
session
()
->
data
(
PosProps
.
IsUseScore
).
toInt
();
transObj
[
ServerProps
(
PosProps
.
IsUseScore
)]
=
session
()
->
data
(
ServerProps
(
PosProps
.
IsUseScore
)
).
toInt
();
QJsonArray
couponArr
;
for
(
auto
code
:
session
()
->
data
(
PosProps
.
CouponMap
).
toMap
().
keys
())
...
...
@@ -57,26 +57,39 @@ void TaskPay::packagePOSRsp()
posRspJsonObj
[
PosProps
.
Prompt
]
=
1
;
posRspJsonObj
[
PosProps
.
Fm_open_id
]
=
session
()
->
data
(
PosProps
.
Fm_open_id
).
toString
();
int
paidTotalAmount
=
0
;
QJsonArray
pay_ids
;
QJsonObject
pay_id
;
pay_id
[
PosProps
.
Pay_id
]
=
"24"
;
pay_id
[
PosProps
.
Pay_str
]
=
"会员储值金支付"
;
pay_id
[
PosProps
.
Paid_total_amount
]
=
getServerJsonValue
(
PosProps
.
CodeAmount
);
int
codeAmount
=
getServerJsonValue
(
PosProps
.
CodeAmount
).
toInt
();
pay_id
[
PosProps
.
Paid_total_amount
]
=
codeAmount
;
paidTotalAmount
+=
codeAmount
;
pay_ids
.
append
(
pay_id
);
pay_id
[
PosProps
.
Pay_id
]
=
"25"
;
pay_id
[
PosProps
.
Pay_str
]
=
"会员积分支付"
;
pay_id
[
PosProps
.
Paid_total_amount
]
=
getServerJsonValue
(
PosProps
.
ScoreAmount
);
int
scoreAmount
=
getServerJsonValue
(
PosProps
.
ScoreAmount
).
toInt
();
pay_id
[
PosProps
.
Paid_total_amount
]
=
scoreAmount
;
paidTotalAmount
+=
scoreAmount
;
pay_ids
.
append
(
pay_id
);
for
(
auto
coupon
:
getServerJsonValue
(
PosProps
.
Coupons
).
toArray
())
{
QJsonObject
cp
=
coupon
.
toObject
();
pay_id
[
PosProps
.
Pay_id
]
=
"77"
;
pay_id
[
PosProps
.
Pay_str
]
=
"代金券支付"
;
pay_id
[
PosProps
.
Paid_total_amount
]
=
cp
[
PosProps
.
Coupon_disAmount
];
int
couponAmount
=
cp
[
PosProps
.
Coupon_disAmount
].
toInt
();
pay_id
[
PosProps
.
Paid_total_amount
]
=
couponAmount
;
paidTotalAmount
+=
couponAmount
;
pay_id
[
PosProps
.
Coupon_code
]
=
cp
[
ServerProps
(
PosProps
.
Coupon_code
)];
pay_ids
.
append
(
pay_id
);
}
posRspJsonObj
[
PosProps
.
Pay_id
]
=
pay_ids
;
posRspJsonObj
[
"total_amount"
]
=
session
()
->
data
(
PosProps
.
OrderAmount
).
toInt
();
posRspJsonObj
[
PosProps
.
Paid_total_amount
]
=
paidTotalAmount
;
posRspJsonObj
[
"invoice_amount"
]
=
paidTotalAmount
;
posRspJsonObj
[
"incentives_amount"
]
=
0
;
posRspJsonObj
[
"forward"
]
=
posReqJsonObj
[
"forward"
];
}
...
...
FMVip_LXJ/windows/fmviporder.cpp
View file @
f06483a1
...
...
@@ -75,7 +75,7 @@ void FMVipOrder::on_pay_btn_clicked()
{
session
()
->
addData
(
PosProps
.
CouponMap
,
orderInfo
->
selectCouponMap
);
QString
codeAmountStr
=
orderInfo
->
getPayAmountStr
(
ui
->
pay_edit
->
text
());
session
()
->
addData
(
PosProps
.
CodeAmount
,
codeAmountStr
.
to
Double
());
session
()
->
addData
(
PosProps
.
CodeAmount
,
codeAmountStr
.
to
Int
());
this
->
setEnabled
(
false
);
...
...
@@ -87,7 +87,7 @@ void FMVipOrder::on_pay_btn_clicked()
void
FMVipOrder
::
on_pay_chk_clicked
(
bool
checked
)
{
int
is
=
checked
?
1
:
0
;
session
()
->
addData
(
ServerProps
(
PosProps
.
IsUseScore
),
QString
::
number
(
is
)
);
session
()
->
addData
(
ServerProps
(
PosProps
.
IsUseScore
),
is
);
orderInfo
->
setUseScore
(
checked
);
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