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
5c982b42
Commit
5c982b42
authored
Jul 12, 2017
by
NitefullWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 能够演示
parent
ebd75d4b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
61 additions
and
51 deletions
+61
-51
FMVip_LXJ/fmvipdispatcher.cpp
+26
-26
FMVip_LXJ/task/taskfinal.cpp
+6
-6
FMVip_LXJ/task/taskpay.cpp
+3
-3
FMVip_LXJ/windows/fmviporder.cpp
+8
-8
FMVip_LXJ/windows/fmviporder.h
+1
-1
FMVip_LXJ/windows/fmvippanel.cpp
+4
-4
FMVip_LXJ/windows/forms/fmviporder.ui
+13
-3
No files found.
FMVip_LXJ/fmvipdispatcher.cpp
View file @
5c982b42
...
...
@@ -25,8 +25,8 @@ FMVipDispatcher::FMVipDispatcher(QObject *parent) :
connect
(
this
,
SIGNAL
(
startSocketTimer
()),
_posSocketTimer
,
SLOT
(
start
()));
connect
(
this
,
SIGNAL
(
stopSocketTimer
()),
_posSocketTimer
,
SLOT
(
stop
()));
connect
(
_confirmRechageTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
onConfirmRechageTimeOut
()));
_confirmRechageTimer
->
setSingleShot
(
true
);
//
connect(_confirmRechageTimer, SIGNAL(timeout()), this, SLOT(onConfirmRechageTimeOut()));
//
_confirmRechageTimer->setSingleShot(true);
}
FMVipDispatcher
::~
FMVipDispatcher
()
...
...
@@ -99,21 +99,21 @@ void FMVipDispatcher::onDoTask()
}
else
{
rspData
=
fmTask
->
doTask
();
if
(
fmTask
->
FM_Type
()
==
FM_Manage
)
{
QJsonObject
posRspJsonObj
=
*
(
fmTask
->
getPosRspJsonObj
());
if
(
!
posRspJsonObj
.
empty
()
&&
posRspJsonObj
.
contains
(
PosProps
.
FundInfo
))
{
backupReqObj
=
*
(
fmTask
->
getPosReqJsonObj
());
backupReqObj
[
PosProps
.
TransId
]
=
fmTask
->
session
()
->
data
(
PosProps
.
TransId
).
toString
();
backupReqObj
[
PosProps
.
Fm_id
]
=
fmTask
->
session
()
->
data
(
PosProps
.
Fm_id
).
toString
();
backupReqObj
[
PosProps
.
Print
]
=
fmTask
->
session
()
->
data
(
PosProps
.
Print
).
toString
();
// 启动定时器,30秒后对该充值订单进行冲正
if
(
_confirmRechageTimer
->
isActive
())
{
onConfirmRechageTimeOut
();
_confirmRechageTimer
->
stop
();
}
_confirmRechageTimer
->
start
(
30000
);
}
}
//
if(fmTask->FM_Type() == FM_Manage) {
//
QJsonObject posRspJsonObj = *(fmTask->getPosRspJsonObj());
//
if(!posRspJsonObj.empty() && posRspJsonObj.contains(PosProps.FundInfo)) {
//
backupReqObj = *(fmTask->getPosReqJsonObj());
//
backupReqObj[PosProps.TransId] = fmTask->session()->data(PosProps.TransId).toString();
//
backupReqObj[PosProps.Fm_id] = fmTask->session()->data(PosProps.Fm_id).toString();
//
backupReqObj[PosProps.Print] = fmTask->session()->data(PosProps.Print).toString();
//
// 启动定时器,30秒后对该充值订单进行冲正
//
if(_confirmRechageTimer->isActive()) {
//
onConfirmRechageTimeOut();
//
_confirmRechageTimer->stop();
//
}
//
_confirmRechageTimer->start(30000);
//
}
//
}
}
qDebug
()
<<
"Send to pos: "
<<
QString
::
fromUtf8
(
rspData
);
qDebug
()
<<
"==============="
;
...
...
@@ -205,13 +205,13 @@ void FMVipDispatcher::onAbout()
void
FMVipDispatcher
::
onConfirmRechageTimeOut
()
{
if
(
!
backupReqObj
.
empty
())
{
qDebug
()
<<
"冲正备份的请求:"
<<
backupReqObj
;
FMTask
*
reversalTask
=
new
TaskRefundOrder
(
backupReqObj
,
this
);
reversalTask
->
doTask
();
reversalTask
->
deleteLater
();
backupReqObj
=
QJsonObject
();
}
else
{
qDebug
()
<<
"备份的请求为空,未执行冲正."
;
}
//
if(!backupReqObj.empty()) {
//
qDebug() << "冲正备份的请求:" << backupReqObj;
//
FMTask *reversalTask = new TaskRefundOrder(backupReqObj, this);
//
reversalTask->doTask();
//
reversalTask->deleteLater();
//
backupReqObj = QJsonObject();
//
} else {
//
qDebug() << "备份的请求为空,未执行冲正.";
//
}
}
FMVip_LXJ/task/taskfinal.cpp
View file @
5c982b42
...
...
@@ -30,19 +30,19 @@ void TaskFinal::packageServerReq()
QString
type
=
pay_ob
[
PosProps
.
Pay_id
].
toString
();
if
(
type
==
"01"
)
{
cashAmount
=
pay_ob
[
PosProps
.
Paid_total_amount
].
toInt
();
}
else
if
(
type
==
"2
0
"
)
{
}
else
if
(
type
==
"2
4
"
)
{
codeAmount
=
pay_ob
[
PosProps
.
Paid_total_amount
].
toInt
();
}
else
if
(
type
==
"2
0002
"
)
{
// 积分,暂无
}
else
if
(
type
==
"2
5
"
)
{
// 积分,暂无
scoreAmount
=
pay_ob
[
PosProps
.
Paid_total_amount
].
toInt
();
}
else
if
(
type
==
"
21
"
)
{
// 代金券
}
else
if
(
type
==
"
77
"
)
{
// 代金券
coupons
.
append
(
pay_ob
[
PosProps
.
Coupon_code
].
toString
());
}
else
if
(
type
==
"
10"
||
type
==
"11
"
||
type
==
"12"
)
{
}
else
if
(
type
==
"
72"
||
type
==
"73
"
||
type
==
"12"
)
{
thirdAmount
=
pay_ob
[
PosProps
.
Paid_total_amount
].
toInt
();
trans
[
ServerProps
(
PosProps
.
Pay_transId
)]
=
pay_ob
[
PosProps
.
Pay_transId
];
if
(
type
==
"
10
"
)
{
// 支付宝
if
(
type
==
"
72
"
)
{
// 支付宝
trans
[
ServerProps
(
PosProps
.
Pay_type
)]
=
1
;
}
else
if
(
type
==
"
11
"
)
{
// 微信
}
else
if
(
type
==
"
73
"
)
{
// 微信
trans
[
ServerProps
(
PosProps
.
Pay_type
)]
=
2
;
}
else
if
(
type
==
"12"
)
{
// 非码支付
trans
[
ServerProps
(
PosProps
.
Pay_type
)]
=
5
;
...
...
FMVip_LXJ/task/taskpay.cpp
View file @
5c982b42
...
...
@@ -84,14 +84,14 @@ void TaskPay::packagePOSRsp()
QJsonArray
pay_ids
;
QJsonObject
pay_id
;
pay_id
[
PosProps
.
Pay_id
]
=
"2
0001
"
;
pay_id
[
PosProps
.
Pay_id
]
=
"2
4
"
;
pay_id
[
PosProps
.
Pay_str
]
=
"会员储值金支付"
;
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
]
=
"2
0002
"
;
pay_id
[
PosProps
.
Pay_id
]
=
"2
5
"
;
pay_id
[
PosProps
.
Pay_str
]
=
"会员积分支付"
;
int
scoreAmount
=
getServerJsonValue
(
PosProps
.
ScoreAmount
).
toInt
();
pay_id
[
PosProps
.
Paid_total_amount
]
=
scoreAmount
;
...
...
@@ -100,7 +100,7 @@ void TaskPay::packagePOSRsp()
for
(
auto
coupon
:
getServerJsonValue
(
PosProps
.
Coupons
).
toArray
())
{
QJsonObject
cp
=
coupon
.
toObject
();
pay_id
[
PosProps
.
Pay_id
]
=
"
20003
"
;
pay_id
[
PosProps
.
Pay_id
]
=
"
77
"
;
pay_id
[
PosProps
.
Pay_str
]
=
"代金券支付"
;
int
couponAmount
=
cp
[
ServerProps
(
PosProps
.
Coupon_disAmount
)].
toInt
();
pay_id
[
PosProps
.
Paid_total_amount
]
=
couponAmount
;
...
...
FMVip_LXJ/windows/fmviporder.cpp
View file @
5c982b42
...
...
@@ -67,7 +67,7 @@ bool FMVipOrder::initWnd(Session *session)
initCouponItems
();
//
ui->pay_chk->setText(QString("使用积分抵用 %1 元").arg(orderInfo->getScoreAmount()));
ui
->
pay_chk
->
setText
(
QString
(
"使用积分抵用 %1 元"
).
arg
(
orderInfo
->
getScoreAmount
()));
if
(
standard_amount
>
0
)
{
ui
->
standard_label
->
setText
(
QString
(
"满 %1 元可享受储值金满额优惠"
).
arg
(
standard_amount
));
...
...
@@ -96,13 +96,13 @@ void FMVipOrder::on_pay_btn_clicked()
emit
pay
();
}
//
void FMVipOrder::on_pay_chk_clicked(bool checked)
//
{
//
int is = checked ? 1 : 0;
//
session()->addData(ServerProps(PosProps.IsUseScore), is);
//
orderInfo->setUseScore(checked);
//
setWillPayText();
//
}
void
FMVipOrder
::
on_pay_chk_clicked
(
bool
checked
)
{
int
is
=
checked
?
1
:
0
;
session
()
->
addData
(
ServerProps
(
PosProps
.
IsUseScore
),
is
);
orderInfo
->
setUseScore
(
checked
);
setWillPayText
();
}
//! 点击元素时选中/取消选中代金券
...
...
FMVip_LXJ/windows/fmviporder.h
View file @
5c982b42
...
...
@@ -31,7 +31,7 @@ signals:
public
slots
:
void
on_pay_btn_clicked
();
//
void on_pay_chk_clicked(bool checked);
void
on_pay_chk_clicked
(
bool
checked
);
void
on_clean_numpad
();
...
...
FMVip_LXJ/windows/fmvippanel.cpp
View file @
5c982b42
...
...
@@ -43,9 +43,9 @@ bool FMVipPanel::initWnd(Session *session)
void
FMVipPanel
::
on_fund_btn_clicked
()
{
if
(
session
()
->
data
(
PosProps
.
Member_type
).
toInt
()
==
Member_Type
::
EntityCard
)
{
//
if(session()->data(PosProps.Member_type).toInt() == Member_Type::EntityCard) {
emit
fund
();
}
else
{
FMMsgWnd
::
FailureWnd
(
"POS上只能进行实体卡充值!"
);
}
//
} else {
//
FMMsgWnd::FailureWnd("POS上只能进行实体卡充值!");
//
}
}
FMVip_LXJ/windows/forms/fmviporder.ui
View file @
5c982b42
...
...
@@ -194,12 +194,12 @@ QWidget {
#pay_chk {
color: rgb(60,60,60);
font-size: 2
6
px;
font-size: 2
2
px;
}
#pay_chk::indicator {
width: 56px;
height:
48
px;
height:
30
px;
margin-right: -10px;
}
...
...
@@ -744,7 +744,7 @@ QWidget {
<widget
class=
"QWidget"
name=
"pay_widget"
native=
"true"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<property
name=
"spacing"
>
<number>
1
0
</number>
<number>
0
</number>
</property>
<property
name=
"leftMargin"
>
<number>
60
</number>
...
...
@@ -821,6 +821,16 @@ font: 13px "微软雅黑";
</layout>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"pay_chk"
>
<property
name=
"cursor"
>
<cursorShape>
PointingHandCursor
</cursorShape>
</property>
<property
name=
"text"
>
<string>
使用积分抵扣 0 元
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"standard_label"
>
<property
name=
"maximumSize"
>
<size>
...
...
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