Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FMVip_Today
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_Today
Commits
ccbedfbc
Commit
ccbedfbc
authored
Sep 19, 2016
by
NitefllWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.解决程序在多屏幕计算机中未居中显示。2.修改了代金券显示部分代码。
parent
a2562082
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
7 deletions
+19
-7
FMVip/fmvipforward.cpp
+8
-1
FMVip/fmviporder.cpp
+5
-4
FMVip/fmviporder.h
+2
-2
FMVip/fmvipwnd.cpp
+4
-0
No files found.
FMVip/fmvipforward.cpp
View file @
ccbedfbc
...
@@ -286,7 +286,14 @@ void FMVipForward::logined(const QJsonObject &serverJob, QJsonObject &posJob)
...
@@ -286,7 +286,14 @@ void FMVipForward::logined(const QJsonObject &serverJob, QJsonObject &posJob)
foreach
(
QJsonValue
value
,
couponArr
)
foreach
(
QJsonValue
value
,
couponArr
)
{
{
QJsonObject
co
=
value
.
toObject
();
QJsonObject
co
=
value
.
toObject
();
_sessionCouponMap
[
co
[
"couponCode"
].
toString
()]
=
co
[
"desc"
].
toString
();
QString
codeStr
=
co
[
"couponCode"
].
toString
();
double
amountStr
=
co
[
"disAmount"
].
toInt
()
/
100.0
;
QString
desc
=
co
[
"desc"
].
toString
();
QString
couponInfo
=
QString
(
"券码:%1 金额:%2 备注:%3"
)
.
arg
(
codeStr
)
.
arg
(
amountStr
)
.
arg
(
desc
);
_sessionCouponMap
[
co
[
"couponCode"
].
toString
()]
=
couponInfo
;
}
}
QString
name
=
memberObj
[
"name"
].
toString
();
QString
name
=
memberObj
[
"name"
].
toString
();
...
...
FMVip/fmviporder.cpp
View file @
ccbedfbc
...
@@ -39,7 +39,7 @@ FMVipOrder::FMVipOrder(QDialog *parent) :
...
@@ -39,7 +39,7 @@ FMVipOrder::FMVipOrder(QDialog *parent) :
ui
->
scrollAreaWidgetContents
->
addItem
(
item
);
ui
->
scrollAreaWidgetContents
->
addItem
(
item
);
}
}
connect
(
ui
->
scrollAreaWidgetContents
,
SIGNAL
(
clicked
(
QModelIndex
)),
this
,
SLOT
(
on_list_view_clicked
(
QModelIndex
)));
connect
(
ui
->
scrollAreaWidgetContents
,
SIGNAL
(
itemClicked
(
QListWidgetItem
*
)),
this
,
SLOT
(
on_item_clicked
(
QListWidgetItem
*
)));
ui
->
pay_chk
->
setText
(
QString
(
"使用积分抵扣 %1 元"
).
arg
(
orderInfo
->
getScoreAmount
()));
ui
->
pay_chk
->
setText
(
QString
(
"使用积分抵扣 %1 元"
).
arg
(
orderInfo
->
getScoreAmount
()));
...
@@ -97,10 +97,10 @@ void FMVipOrder::on_pay_chk_clicked(bool checked)
...
@@ -97,10 +97,10 @@ void FMVipOrder::on_pay_chk_clicked(bool checked)
FMVipForward
::
instance
()
->
addSessionData
(
"isUseScore"
,
QString
::
number
(
is
));
FMVipForward
::
instance
()
->
addSessionData
(
"isUseScore"
,
QString
::
number
(
is
));
}
}
void
FMVipOrder
::
on_
list_view_clicked
(
QModelIndex
index
)
void
FMVipOrder
::
on_
item_clicked
(
QListWidgetItem
*
item
)
{
{
i
nt
row
=
index
.
row
();
i
f
(
item
!=
NULL
)
auto
item
=
ui
->
scrollAreaWidgetContents
->
item
(
row
);
{
Qt
::
CheckState
state
=
item
->
checkState
();
Qt
::
CheckState
state
=
item
->
checkState
();
switch
(
state
)
{
switch
(
state
)
{
case
Qt
:
:
Checked
:
case
Qt
:
:
Checked
:
...
@@ -111,4 +111,5 @@ void FMVipOrder::on_list_view_clicked(QModelIndex index)
...
@@ -111,4 +111,5 @@ void FMVipOrder::on_list_view_clicked(QModelIndex index)
default
:
default
:
break
;
break
;
}
}
}
}
}
FMVip/fmviporder.h
View file @
ccbedfbc
#ifndef FMVIPORDER_H
#ifndef FMVIPORDER_H
#define FMVIPORDER_H
#define FMVIPORDER_H
#include <Q
ModelIndex
>
#include <Q
ListWidgetItem
>
#include "fmvipwnd.h"
#include "fmvipwnd.h"
#define MIN(a,b) ((a<b) ? a : b)
#define MIN(a,b) ((a<b) ? a : b)
...
@@ -22,7 +22,7 @@ public slots:
...
@@ -22,7 +22,7 @@ public slots:
void
on_pay_btn_clicked
();
void
on_pay_btn_clicked
();
void
on_pay_chk_clicked
(
bool
checked
);
void
on_pay_chk_clicked
(
bool
checked
);
void
on_
list_view_clicked
(
QModelIndex
);
void
on_
item_clicked
(
QListWidgetItem
*
);
private
:
private
:
class
OrderInfo
class
OrderInfo
...
...
FMVip/fmvipwnd.cpp
View file @
ccbedfbc
...
@@ -76,6 +76,10 @@ int FMVipWnd::exec()
...
@@ -76,6 +76,10 @@ int FMVipWnd::exec()
showNormal
();
showNormal
();
::
SetForegroundWindow
((
HWND
)
effectiveWinId
());
::
SetForegroundWindow
((
HWND
)
effectiveWinId
());
QDesktopWidget
w
;
QRect
rc
=
w
.
availableGeometry
();
setGeometry
((
rc
.
width
()
-
width
())
/
2
,
(
rc
.
height
()
-
height
())
/
2
,
width
(),
height
());
return
QDialog
::
exec
();
return
QDialog
::
exec
();
}
}
...
...
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