Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_epay
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_epay
Commits
18030203
Commit
18030203
authored
Aug 21, 2017
by
gujin.wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
券核销后,修改应付金额
parent
9426a791
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
fmp_epay_p.cpp
+5
-1
fmp_epay_p.h
+2
-0
fmp_epayview_dialog.cpp
+8
-6
No files found.
fmp_epay_p.cpp
View file @
18030203
...
@@ -243,7 +243,6 @@ void FMPePayPrivate::Init()
...
@@ -243,7 +243,6 @@ void FMPePayPrivate::Init()
FMP_INFO
()
<<
"++++++++++++++++++request JOSN"
<<
hash
;
FMP_INFO
()
<<
"++++++++++++++++++request JOSN"
<<
hash
;
_payDialog
=
new
FMPPayDialog
(
this
,
hash
);
_payDialog
=
new
FMPPayDialog
(
this
,
hash
);
}
}
_payDialog
->
show
();
_payDialog
->
show
();
}
}
...
@@ -279,6 +278,11 @@ void FMPePayPrivate::DockPayRequest(const QByteArray &json)
...
@@ -279,6 +278,11 @@ void FMPePayPrivate::DockPayRequest(const QByteArray &json)
FMP_INFO
()
<<
"pay request json:"
<<
json
;
FMP_INFO
()
<<
"pay request json:"
<<
json
;
}
}
QJsonObject
FMPePayPrivate
::
GetRequestInfo
()
{
return
_origin_request
;
}
#define FMP_EPAY_STATUSCODE "statusCode"
#define FMP_EPAY_STATUSCODE "statusCode"
#define FMP_EPAY_ERRORMSG "msg"
#define FMP_EPAY_ERRORMSG "msg"
#define FMP_EPAY_FMID "fm_id"
#define FMP_EPAY_FMID "fm_id"
...
...
fmp_epay_p.h
View file @
18030203
...
@@ -70,6 +70,8 @@ public:
...
@@ -70,6 +70,8 @@ public:
void
GetDailyBillData
(
QVector
<
PayDetail
>
&
vecPay
);
void
GetDailyBillData
(
QVector
<
PayDetail
>
&
vecPay
);
QJsonObject
GetRequestInfo
();
private
:
private
:
void
ControlReverseJson
();
void
ControlReverseJson
();
...
...
fmp_epayview_dialog.cpp
View file @
18030203
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
#include "fmp_epay_plugin_p.h"
#include "fmp_epay_plugin_p.h"
#include "fmp_forceclose_dialog.h"
#include "fmp_forceclose_dialog.h"
#include "fmp_redeem_i.h"
#include "fmp_redeem_i.h"
#include "fmp_home_i.h"
#include <QDebug>
#include <QDebug>
#include <fmp_settings_i.h>
#include <fmp_settings_i.h>
...
@@ -19,6 +20,7 @@
...
@@ -19,6 +20,7 @@
#include <QPropertyAnimation>
#include <QPropertyAnimation>
#include <QPushButton>
#include <QPushButton>
#include <QVBoxLayout>
#include <QVBoxLayout>
#include <QSettings>
FMPPayDialog
::
FMPPayDialog
(
FMPePayPrivate
*
control
,
QVariantHash
basicinfo
,
QWidget
*
parent
)
:
FMPPayDialog
::
FMPPayDialog
(
FMPePayPrivate
*
control
,
QVariantHash
basicinfo
,
QWidget
*
parent
)
:
_control
(
control
),
_control
(
control
),
...
@@ -1101,12 +1103,12 @@ void FMPPayDialog::setShowFunc()
...
@@ -1101,12 +1103,12 @@ void FMPPayDialog::setShowFunc()
#endif
#endif
void
FMPPayDialog
::
redeem
()
void
FMPPayDialog
::
redeem
()
{
{
double
needPay
=
ui
->
lineedit_num
->
text
().
toDouble
();
FMPRedeemInterface
*
redeem
=
FMP
::
GetService
<
FMPRedeemInterface
>
();
FMPRedeemInterface
*
redeem
=
FMP
::
GetService
<
FMPRedeemInterface
>
();
redeem
->
StartService
();
redeem
->
StartService
();
QJsonObject
storeInfo
;
QJsonObject
requestInfo
=
_control
->
GetRequestInfo
();
storeInfo
[
"store_id"
]
=
"99998"
;
QJsonObject
result
=
redeem
->
Redeem
(
needPay
,
requestInfo
);
storeInfo
[
"station_id"
]
=
1
;
FMP_DEBUG
()
<<
"redeem result: "
<<
result
;
storeInfo
[
"operator_id"
]
=
"00000002"
;
needPay
-=
result
[
"discount"
].
toDouble
();
QJsonObject
result
=
redeem
->
Redeem
(
storeInfo
);
ui
->
lineedit_num
->
setText
(
QString
::
number
(
qMax
(
0.0
,
needPay
)));
qDebug
()
<<
result
;
}
}
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