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
c51d56e9
Commit
c51d56e9
authored
Nov 29, 2018
by
刘帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支持上线浦发银行券
parent
8c451a96
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
53 additions
and
34 deletions
+53
-34
.gitmodules
+0
-5
fmp_coupon
+0
-1
fmp_epay
+1
-1
fmp_home
+1
-1
fmp_redeem/consumptiondialog.cpp
+5
-4
fmp_redeem/consumptiondialog.h
+2
-2
fmp_redeem/consumptiondialog.ui
+3
-0
fmp_redeem/errcodedialog.cpp
+15
-11
fmp_redeem/errcodedialog.h
+1
-1
fmp_redeem/fmp_redeem.cpp
+21
-4
fmp_redeem/version.h
+1
-1
release/bins/FreemudPOS.exe
+0
-0
release/bins/FreemudPOS.ini
+3
-3
release/bins/FreemudSyncer.exe
+0
-0
release/bins/configuration/plugins.db
+0
-0
No files found.
.gitmodules
View file @
c51d56e9
...
...
@@ -16,8 +16,3 @@
[submodule "fmp_printer"]
path = fmp_printer
url = git@git.oschina.net:kong__mo/fmp_printer.git
[submodule "fmp_coupon"]
path = fmp_coupon
url = git@gitlab.freemud.com:gujin.wang/fmp_coupon.git
fmp_coupon
@
5da0cec7
Subproject commit 5da0cec7ac3e369d63f6b5b384124bd90e850808
fmp_epay
@
e65e6b51
Subproject commit
96735c51448644c6ac421c3ccb8e022a8fbf4997
Subproject commit
e65e6b51182eecea81aff8b52887d68d2d0770e3
fmp_home
@
ae117074
Subproject commit
e32c00d448c4366d6b103a83db400fce36853787
Subproject commit
ae1170745403d24c3d1cbd1ce5bd418732b02075
fmp_redeem/consumptiondialog.cpp
View file @
c51d56e9
...
...
@@ -41,7 +41,7 @@ bool ConsumptionDialog::ShowForUnConsum(const QString& act_name, double face_amo
return
false
;
}
bool
ConsumptionDialog
::
ShowForHasConsum
(
const
QString
&
act_name
,
const
QString
&
code_name
,
const
QString
&
time_name
,
const
QString
&
coupon
,
QWidget
*
parent
)
bool
ConsumptionDialog
::
ShowForHasConsum
(
const
QString
&
act_name
,
const
QString
channel
,
const
QString
&
code_name
,
const
QString
&
time_name
,
const
QString
&
coupon
,
QWidget
*
parent
)
{
ConsumptionDialog
v
(
parent
);
// v.setGeometry( 0,0,350,470);
...
...
@@ -53,7 +53,7 @@ bool ConsumptionDialog::ShowForHasConsum(const QString& act_name, const QString&
v
.
ui
->
btnConsumption
->
setStyleSheet
(
v
.
ui
->
btnConsumption
->
styleSheet
());
v
.
ui
->
btnConsumption
->
setEnabled
(
false
);
v
.
setData
(
act_name
,
code_name
,
time_name
,
coupon
);
v
.
setData
(
act_name
,
c
hannel
,
c
ode_name
,
time_name
,
coupon
);
v
.
ui
->
labActName
->
setStyleSheet
(
"color:white;"
);
if
(
v
.
exec
()
==
QDialog
::
Accepted
){
return
true
;
...
...
@@ -105,12 +105,13 @@ void ConsumptionDialog::HideForWaiting()
reject
();
}
void
ConsumptionDialog
::
setData
(
const
QString
&
act_name
,
const
QString
&
code_name
,
const
QString
&
time_name
,
const
QString
&
coupon
)
void
ConsumptionDialog
::
setData
(
const
QString
&
act_name
,
const
QString
channel
,
const
QString
&
code_name
,
const
QString
&
time_name
,
const
QString
&
coupon
)
{
ui
->
labCode
->
setText
(
coupon
);
ui
->
labCodeName
->
setAlignment
(
Qt
::
AlignCenter
);
ui
->
actualAmount
->
hide
();
ui
->
ebname
->
hide
();
ui
->
ebname
->
setText
(
QString
::
fromLocal8Bit
(
"渠道: "
)
+
channel
);
//ui->ebname->hide();
ui
->
labCodeName
->
setText
(
code_name
);
ui
->
labActName
->
setText
(
act_name
);
ui
->
labTime
->
setText
(
time_name
);
...
...
fmp_redeem/consumptiondialog.h
View file @
c51d56e9
...
...
@@ -18,10 +18,10 @@ public:
explicit
ConsumptionDialog
(
QWidget
*
parent
=
0
,
Qt
::
WindowFlags
f
=
0
);
~
ConsumptionDialog
();
void
setData
(
const
QString
&
act_name
,
const
QString
&
code_name
,
const
QString
&
time_name
,
const
QString
&
coupon
);
void
setData
(
const
QString
&
act_name
,
const
QString
channel
,
const
QString
&
code_name
,
const
QString
&
time_name
,
const
QString
&
coupon
);
void
setData
(
const
QString
&
act_name
,
double
face_amount
,
double
actual_amount
,
const
QString
&
eb_name
,
const
QString
&
time_name
,
const
QString
&
coupon
);
static
bool
ShowForUnConsum
(
const
QString
&
act_name
,
double
face_amount
,
double
actual_amount
,
const
QString
&
eb_name
,
const
QString
&
time_name
,
const
QString
&
coupon
,
QWidget
*
parent
=
0
);
static
bool
ShowForHasConsum
(
const
QString
&
act_name
,
const
QString
&
code_name
,
const
QString
&
time_name
,
const
QString
&
coupon
,
QWidget
*
parent
=
0
);
static
bool
ShowForHasConsum
(
const
QString
&
act_name
,
const
QString
channel
,
const
QString
&
code_name
,
const
QString
&
time_name
,
const
QString
&
coupon
,
QWidget
*
parent
=
0
);
void
ShowForWaiting
(
QString
context
,
QString
coupon
,
QWidget
*
parent
=
0
);
void
HideForWaiting
();
...
...
fmp_redeem/consumptiondialog.ui
View file @
c51d56e9
...
...
@@ -197,6 +197,9 @@
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
</property>
<property
name=
"wordWrap"
>
<bool>
true
</bool>
</property>
</widget>
<widget
class=
"QLabel"
name=
"labTime"
>
<property
name=
"geometry"
>
...
...
fmp_redeem/errcodedialog.cpp
View file @
c51d56e9
...
...
@@ -55,7 +55,7 @@ void ErrCodeDialog::showForExpird(const QString& act_name, const QString& code_n
v
.
exec
();
}
void
ErrCodeDialog
::
showForErr
(
const
QString
&
coupon
,
const
QString
&
mess
,
QWidget
*
parent
)
void
ErrCodeDialog
::
showForErr
(
const
QString
&
coupon
,
const
QString
&
mess
,
const
QString
channel
,
QWidget
*
parent
)
{
ErrCodeDialog
v
(
parent
);
// v.setGeometry( 0,0,350,470);
...
...
@@ -67,15 +67,20 @@ void ErrCodeDialog::showForErr(const QString& coupon, const QString& mess, QWidg
v
.
ui
->
labChannel
->
setVisible
(
true
);
//100 -> 浦发银行
//88 -> 交通银行
QString
channel
;
if
(
coupon
.
left
(
3
)
==
"100"
&&
coupon
.
length
()
==
12
)
channel
=
QString
::
fromLocal8Bit
(
"浦发银行"
);
else
if
(
coupon
.
left
(
2
)
==
"88"
&&
coupon
.
length
()
==
12
)
channel
=
QString
::
fromLocal8Bit
(
"交通银行"
);
else
channel
=
QString
::
fromLocal8Bit
(
"未知"
);
QString
finalChannel
=
channel
;
int
index
=
channel
.
indexOf
(
"-"
);
if
(
index
!=
-
1
)
{
finalChannel
=
channel
.
left
(
index
);
}
// if(coupon.left(3) == "100" && coupon.length()==12)
// channel = QString::fromLocal8Bit("浦发银行");
// else if(coupon.left(2) == "88" && coupon.length()==12)
// channel = QString::fromLocal8Bit("交通银行");
// else
// channel = QString::fromLocal8Bit("未知");
v
.
ui
->
labChannel
->
setText
(
QString
::
fromLocal8Bit
(
"渠道: "
)
+
c
hannel
);
v
.
ui
->
labChannel
->
setText
(
QString
::
fromLocal8Bit
(
"渠道: "
)
+
finalC
hannel
);
v
.
ui
->
labActName
->
setVisible
(
true
);
v
.
ui
->
labCode
->
setText
(
coupon
);
...
...
@@ -102,4 +107,4 @@ void ErrCodeDialog::showForErr(const QString& coupon, const QString& mess, QWidg
v
.
ui
->
labActName
->
setStyleSheet
(
"color:white;"
);
v
.
exec
();
}
\ No newline at end of file
}
fmp_redeem/errcodedialog.h
View file @
c51d56e9
...
...
@@ -17,7 +17,7 @@ public:
static
void
showForInvalid
(
const
QString
&
coupon
,
QWidget
*
parent
=
0
);
static
void
showForExpird
(
const
QString
&
act_name
,
const
QString
&
code_name
,
const
QString
&
time_name
,
const
QString
&
coupon
,
QWidget
*
parent
=
0
);
static
void
showForErr
(
const
QString
&
coupon
,
const
QString
&
mess
,
QWidget
*
parent
=
0
);
static
void
showForErr
(
const
QString
&
coupon
,
const
QString
&
mess
,
const
QString
channel
,
QWidget
*
parent
=
0
);
private
:
Ui
::
ErrCodeDialog
*
ui
;
...
...
fmp_redeem/fmp_redeem.cpp
View file @
c51d56e9
...
...
@@ -297,10 +297,22 @@ QJsonObject FMPRedeem::ShowForUnConsum(QJsonObject json)
QString
ebcode
=
codeInfo
[
"ebcode"
].
toString
();
QString
ebname
=
codeInfo
[
"ebname"
].
toString
();
QString
channel
=
json
[
"channel"
].
toString
();
QString
fullChannel
=
json
[
"channel"
].
toString
();
int
index
=
fullChannel
.
indexOf
(
"-"
);
if
(
index
!=
-
1
)
{
channel
=
fullChannel
.
left
(
index
);
}
double
realAmount
=
codeInfo
[
"amount"
].
toInt
()
/
100.0
;
// 面值
if
(
coupon
.
trimmed
().
length
()
==
9
||
coupon
.
trimmed
().
length
()
==
15
)
//非码券
{
realAmount
=
codeInfo
[
"originalPrice"
].
toInt
()
/
100.0
;
// 面值
}
double
amount
=
codeInfo
[
"paid"
].
toInt
()
/
100.0
;
//实付
QString
time_name
=
QString
::
fromLocal8Bit
(
"有效期至: "
).
append
(
QDate
::
fromString
(
vdata
,
"yyyyMMdd"
).
toString
(
"yyyy-MM-dd"
));
//UNUSED(time_name);
int
couponType
=
json
[
"couponType"
].
toInt
();
if
(
ConsumptionDialog
::
ShowForUnConsum
(
act_name
,
realAmount
,
amount
,
channel
,
""
,
coupon
))
{
...
...
@@ -382,7 +394,7 @@ QJsonObject FMPRedeem::ShowForUnConsum(QJsonObject json)
}
break
;
default
:
ErrCodeDialog
::
showForErr
(
coupon
,
msg
);
ErrCodeDialog
::
showForErr
(
coupon
,
msg
,
retJson
[
"channel"
].
toString
()
);
break
;
}
redeemResult
[
"statusCode"
]
=
retJson
[
"statusCode"
];
...
...
@@ -400,7 +412,7 @@ QJsonObject FMPRedeem::ShowForUnConsum(QJsonObject json)
QJsonObject
FMPRedeem
::
ShowForHasConsum
(
QJsonObject
json
)
{
ConsumptionDialog
::
ShowForHasConsum
(
json
[
"msg"
].
toString
(),
""
,
""
,
_coupon
);
ConsumptionDialog
::
ShowForHasConsum
(
json
[
"msg"
].
toString
(),
json
[
"channel"
].
toString
(),
""
,
""
,
_coupon
);
return
json
;
}
...
...
@@ -419,7 +431,7 @@ QJsonObject FMPRedeem::ShowForExpird(QJsonObject json)
QJsonObject
FMPRedeem
::
ShowForErr
(
QJsonObject
json
)
{
QString
msg
=
json
[
"msg"
].
toString
();
ErrCodeDialog
::
showForErr
(
_coupon
,
msg
);
ErrCodeDialog
::
showForErr
(
_coupon
,
msg
,
json
[
"channel"
].
toString
()
);
return
json
;
}
...
...
@@ -509,5 +521,10 @@ void FMPRedeem::LoadStoreInfo()
_operator_id
=
settings
.
value
(
FMP_INIKEY_LOGINCASHIER
).
toString
();
_redeem_url
=
settings
.
value
(
FMP_INIKEY_EPAYURL
).
toString
();
_redeem_log_url
=
settings
.
value
(
FMP_INIKEY_REDEEM_LOG
).
toString
();
_partner_id
=
settings
.
value
(
FMP_INIKEY_LOGINPARTNERID
).
toInt
();
//_partner_id = settings.value(FMP_INIKEY_LOGINPARTNERID).toInt();
QSettings
urlSettings
(
QString
(
"%1/server_url.ini"
).
arg
(
apppath
),
QSettings
::
IniFormat
);
_redeem_url
=
urlSettings
.
value
(
FMP_INIKEY_EPAYURL
).
toString
();
_redeem_log_url
=
urlSettings
.
value
(
FMP_INIKEY_REDEEM_LOG
).
toString
();
_partner_id
=
urlSettings
.
value
(
FMP_INIKEY_LOGINPARTNERID
).
toInt
();
}
fmp_redeem/version.h
View file @
c51d56e9
...
...
@@ -5,7 +5,7 @@
#define VER_MINOR 1
#define VER_REVISION 0
#define VER_BUILD 9
0
#define VER_BUILD 9
1
//! Convert version numbers to string
#define _STR(S) #S
...
...
release/bins/FreemudPOS.exe
View file @
c51d56e9
No preview for this file type
release/bins/FreemudPOS.ini
View file @
c51d56e9
...
...
@@ -23,12 +23,12 @@ CashierId=001
ShowStoreInfo
=
0
[Pay]
Server
=
"http://115.159.119.32:2793
5
/api?partner=yhdw"
Server
=
"http://115.159.119.32:2793
9
/api?partner=yhdw"
Timeout
=
60
[Coupon]
Server
=
http://115.159.142.32/api
RedeemLog
=
http://115.159.119.32:2793
5
/getRedeemLog
RedeemLog
=
http://115.159.119.32:2793
9
/getRedeemLog
[Vip]
Server
=
http://member.freemudorder.com/member_today/service/restful/pos
...
...
@@ -57,7 +57,7 @@ Entryurl=
Entryport
=
[Printer]
Name
=
Send To OneNote 16
Name
=
Send To OneNote
20
16
Mode
=
2
PaperWidth
=
80
type
=
4
...
...
release/bins/FreemudSyncer.exe
View file @
c51d56e9
No preview for this file type
release/bins/configuration/plugins.db
deleted
100644 → 0
View file @
8c451a96
File deleted
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