Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmPOS
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
fmPOS
Commits
1be029b4
Commit
1be029b4
authored
Aug 21, 2017
by
gujin.wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改卡券核销时,商品信息的传递方式
parent
6869663f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
fmp_epay
+1
-1
fmp_redeem/fmp_redeem.cpp
+6
-6
fmp_redeem/fmp_redeem.h
+3
-3
fmp_redeem/fmp_redeem_i.h
+1
-1
No files found.
fmp_epay
@
30a8ed65
Subproject commit
180302030459e884456c8d1ab66443e18f9d4f17
Subproject commit
30a8ed65198847106c3218cb6d103dd8558e7e25
fmp_redeem/fmp_redeem.cpp
View file @
1be029b4
...
@@ -55,7 +55,7 @@ void FMPRedeem::UninitService()
...
@@ -55,7 +55,7 @@ void FMPRedeem::UninitService()
{
{
}
}
QJsonValue
FMPRedeem
::
SearchJsonObject
(
const
QJsonObject
&
searchJson
,
const
QString
&
searchKey
)
QJsonValue
FMPRedeem
::
SearchJsonObject
(
QJsonObject
&
searchJson
,
QString
searchKey
)
{
{
QJsonValue
value
;
QJsonValue
value
;
if
(
searchJson
.
contains
(
searchKey
))
if
(
searchJson
.
contains
(
searchKey
))
...
@@ -81,7 +81,7 @@ QJsonValue FMPRedeem::SearchJsonObject(const QJsonObject& searchJson, const QStr
...
@@ -81,7 +81,7 @@ QJsonValue FMPRedeem::SearchJsonObject(const QJsonObject& searchJson, const QStr
return
value
;
return
value
;
}
}
QJsonValue
FMPRedeem
::
SearchJsonArray
(
const
QJsonArray
&
searchJson
,
const
QString
&
searchKey
)
QJsonValue
FMPRedeem
::
SearchJsonArray
(
QJsonArray
&
searchJson
,
QString
searchKey
)
{
{
QJsonValue
value
;
QJsonValue
value
;
for
(
int
i
=
0
;
i
<
searchJson
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
searchJson
.
size
();
i
++
)
...
@@ -100,10 +100,10 @@ QJsonValue FMPRedeem::SearchJsonArray(const QJsonArray& searchJson, const QStrin
...
@@ -100,10 +100,10 @@ QJsonValue FMPRedeem::SearchJsonArray(const QJsonArray& searchJson, const QStrin
return
value
;
return
value
;
}
}
QJsonObject
FMPRedeem
::
Redeem
(
const
double
needPay
,
const
QJson
Object
&
requestInfo
,
QWidget
*
parent
)
QJsonObject
FMPRedeem
::
Redeem
(
const
double
needPay
,
const
QJson
Array
&
productsInfo
)
{
{
FMP_DEBUG
()
<<
"Recv redeem data: "
<<
QJsonDocument
(
request
Info
).
toJson
(
QJsonDocument
::
Compact
);
FMP_DEBUG
()
<<
"Recv redeem data: "
<<
QJsonDocument
(
products
Info
).
toJson
(
QJsonDocument
::
Compact
);
_products_info
=
SearchJsonObject
(
requestInfo
,
"products"
).
toArray
()
;
_products_info
=
productsInfo
;
_needPay
=
needPay
;
_needPay
=
needPay
;
//读取门店信息
//读取门店信息
QString
apppath
=
QCoreApplication
::
applicationDirPath
();
QString
apppath
=
QCoreApplication
::
applicationDirPath
();
...
@@ -115,7 +115,7 @@ QJsonObject FMPRedeem::Redeem(const double needPay, const QJsonObject& requestIn
...
@@ -115,7 +115,7 @@ QJsonObject FMPRedeem::Redeem(const double needPay, const QJsonObject& requestIn
_partner_id
=
settings
.
value
(
FMP_INIKEY_LOGINPARTNERID
).
toInt
();
_partner_id
=
settings
.
value
(
FMP_INIKEY_LOGINPARTNERID
).
toInt
();
//显示扫码界面获取券码
//显示扫码界面获取券码
ScanningDialog
scanningDialog
(
parent
)
;
ScanningDialog
scanningDialog
;
if
(
scanningDialog
.
exec
()
!=
QDialog
::
Accepted
)
if
(
scanningDialog
.
exec
()
!=
QDialog
::
Accepted
)
{
{
QJsonObject
ret
;
QJsonObject
ret
;
...
...
fmp_redeem/fmp_redeem.h
View file @
1be029b4
...
@@ -29,7 +29,7 @@ public:
...
@@ -29,7 +29,7 @@ public:
explicit
FMPRedeem
(
const
FMPContext
context
);
explicit
FMPRedeem
(
const
FMPContext
context
);
virtual
~
FMPRedeem
();
virtual
~
FMPRedeem
();
QJsonObject
Redeem
(
const
double
needPay
,
const
QJson
Object
&
requestInfo
,
QWidget
*
parent
=
0
);
//券码核销
QJsonObject
Redeem
(
const
double
needPay
,
const
QJson
Array
&
productsInfo
);
//券码核销
protected
:
protected
:
const
FMPContext
GetContext
()
const
{
return
_context
;
}
const
FMPContext
GetContext
()
const
{
return
_context
;
}
...
@@ -48,9 +48,9 @@ private:
...
@@ -48,9 +48,9 @@ private:
QJsonObject
ShowForMismatch
(
QJsonObject
json
);
QJsonObject
ShowForMismatch
(
QJsonObject
json
);
int
ZH_caclChkValue
(
char
*
pJsonData
,
int
startPos
,
int
endPos
);
int
ZH_caclChkValue
(
char
*
pJsonData
,
int
startPos
,
int
endPos
);
QByteArray
CheckSendArray
(
QByteArray
&
jsonArray
);
QByteArray
CheckSendArray
(
QByteArray
&
jsonArray
);
QJsonValue
SearchJsonObject
(
const
QJsonObject
&
searchJson
,
const
QString
&
searchKey
);
QJsonValue
SearchJsonArray
(
const
QJsonArray
&
searchJson
,
const
QString
&
searchKey
);
bool
IsContinue
(
int
couponAmount
);
bool
IsContinue
(
int
couponAmount
);
QJsonValue
SearchJsonObject
(
QJsonObject
&
searchJson
,
QString
searchKey
);
QJsonValue
SearchJsonArray
(
QJsonArray
&
searchJson
,
QString
searchKey
);
private
:
private
:
bool
_inited
;
bool
_inited
;
double
_needPay
;
double
_needPay
;
...
...
fmp_redeem/fmp_redeem_i.h
View file @
1be029b4
...
@@ -20,7 +20,7 @@ public:
...
@@ -20,7 +20,7 @@ public:
connect
(
this
,
&
FMPRedeemInterface
::
TriggerUninit
,
this
,
&
FMPRedeemInterface
::
OnTriggerUninit
);
connect
(
this
,
&
FMPRedeemInterface
::
TriggerUninit
,
this
,
&
FMPRedeemInterface
::
OnTriggerUninit
);
}
}
virtual
QJsonObject
Redeem
(
const
double
needPay
,
const
QJson
Object
&
requestInfo
,
QWidget
*
parent
=
0
)
=
0
;
//券码核销
virtual
QJsonObject
Redeem
(
const
double
needPay
,
const
QJson
Array
&
productsInfo
)
=
0
;
//券码核销
signals:
signals:
void
TriggerInit
();
void
TriggerInit
();
void
TriggerUninit
();
void
TriggerUninit
();
...
...
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