Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_vip
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_vip
Commits
8a8288f0
Commit
8a8288f0
authored
Sep 28, 2018
by
gujin.wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能合并;界面添加天福特定logo
parent
c04b81ce
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
354 additions
and
425 deletions
+354
-425
res/img.qrc
+1
-0
res/img/tflogo.png
+0
-0
task/fmtask.cpp
+22
-53
task/fmtask.h
+1
-3
task/taskfinal.cpp
+15
-60
task/tasklogin.cpp
+23
-3
task/taskpay.cpp
+121
-47
task/taskpay.h
+2
-1
windows/fmcouponwidget.cpp
+3
-1
windows/fmviplogin.cpp
+1
-31
windows/fmviporder.cpp
+116
-83
windows/fmviporder.h
+5
-132
windows/forms/fmviplogin.ui
+23
-5
windows/forms/fmviporder.ui
+20
-5
windows/forms/fmvippanel.ui
+1
-1
No files found.
res/img.qrc
View file @
8a8288f0
...
...
@@ -14,5 +14,6 @@
<file>img/tip_error.png</file>
<file>img/tip_ok.png</file>
<file>img/tip_warning.png</file>
<file>img/tflogo.png</file>
</qresource>
</RCC>
res/img/tflogo.png
0 → 100644
View file @
8a8288f0
2.03 KB
task/fmtask.cpp
View file @
8a8288f0
...
...
@@ -22,78 +22,47 @@ FMTask::~FMTask()
del_p
(
_window
);
}
Q
JsonValue
FMTask
::
searchJsonObject
(
QJsonObject
&
searchJson
,
QString
searchK
ey
)
Q
Pair
<
bool
,
QJsonValue
>
FMTask
::
search
(
const
QJsonValue
&
json
,
QString
k
ey
)
{
Q
JsonValue
value
;
if
(
searchJson
.
contains
(
searchKey
))
Q
Pair
<
bool
,
QJsonValue
>
result
;
if
(
json
.
isObject
(
))
{
return
searchJson
[
searchKey
];
}
else
{
foreach
(
QString
key
,
searchJson
.
keys
())
QJsonObject
temp
=
json
.
toObject
();
if
(
temp
.
contains
(
key
))
{
if
(
searchJson
[
key
].
isObject
())
{
QJsonObject
ob
=
searchJson
[
key
].
toObject
();
value
=
searchJsonObject
(
ob
,
searchKey
);
}
else
if
(
searchJson
[
key
].
isArray
())
result
=
qMakePair
(
true
,
temp
[
key
]);
}
else
{
foreach
(
QString
k
,
temp
.
keys
())
{
QJsonArray
arr
=
searchJson
[
key
].
toArray
();
value
=
searchJsonArray
(
arr
,
searchKey
);
result
=
search
(
temp
[
k
],
key
);
if
(
result
.
first
)
break
;
}
}
}
return
value
;
}
QJsonValue
FMTask
::
searchJsonArray
(
QJsonArray
&
searchJson
,
QString
searchKey
)
{
QJsonValue
value
;
for
(
int
i
=
0
;
i
<
searchJson
.
size
();
i
++
)
else
if
(
json
.
isArray
())
{
if
(
searchJson
[
i
].
isObject
())
QJsonArray
temp
=
json
.
toArray
();
for
(
int
i
=
0
;
i
<
temp
.
size
();
i
++
)
{
QJsonObject
ob
=
searchJson
[
i
].
toObject
();
value
=
searchJsonObject
(
ob
,
searchKey
);
}
else
if
(
searchJson
[
i
].
isArray
())
{
QJsonArray
arr
=
searchJson
[
i
].
toArray
();
value
=
searchJsonArray
(
arr
,
searchKey
);
}
}
return
value
;
}
QJsonValue
FMTask
::
searchJsonValue
(
QJsonObject
&
searchJson
,
QString
searchKey
)
{
if
(
searchJson
.
contains
(
searchKey
))
{
return
searchJson
[
searchKey
];
}
else
{
qDebug
()
<<
searchJson
.
keys
();
foreach
(
QString
key
,
searchJson
.
keys
())
{
if
(
searchJson
[
key
].
isObject
())
{
QJsonObject
ob
=
searchJson
[
key
].
toObject
();
QJsonValue
value
=
searchJsonValue
(
ob
,
searchKey
);
if
(
!
value
.
isNull
()){
return
value
;
}
}
result
=
search
(
temp
[
i
],
key
);
if
(
result
.
first
)
break
;
}
}
return
QJsonValue
()
;
return
result
;
}
QJsonValue
FMTask
::
getServerJsonValue
(
const
QString
prop
)
{
return
search
JsonObject
(
serverRspJsonObj
,
prop
)
;
return
search
(
serverRspJsonObj
,
prop
).
second
;
}
QJsonValue
FMTask
::
getPosJsonValue
(
const
QString
prop
)
{
return
search
JsonObject
(
posReqJsonObj
,
prop
)
;
return
search
(
posReqJsonObj
,
prop
).
second
;
}
QString
FMTask
::
sign
()
const
...
...
task/fmtask.h
View file @
8a8288f0
...
...
@@ -48,9 +48,7 @@ public:
Session
*
session
()
const
{
return
_session
;}
QJsonValue
searchJsonValue
(
QJsonObject
&
searchJson
,
QString
searchKey
);
QJsonValue
searchJsonObject
(
QJsonObject
&
searchJson
,
QString
searchKey
);
QJsonValue
searchJsonArray
(
QJsonArray
&
searchJson
,
QString
searchKey
);
QPair
<
bool
,
QJsonValue
>
search
(
const
QJsonValue
&
json
,
QString
key
);
QJsonValue
getServerJsonValue
(
const
QString
prop
);
QJsonValue
getPosJsonValue
(
const
QString
prop
);
...
...
task/taskfinal.cpp
View file @
8a8288f0
...
...
@@ -33,10 +33,11 @@ void TaskFinal::packageServerReq()
serverReqJsonObj
[
"operatorId"
]
=
getPosJsonValue
(
"operator_id"
);
serverReqJsonObj
[
"partnerId"
]
=
PARTNER_ID
;
serverReqJsonObj
[
"businessDate"
]
=
getPosJsonValue
(
"business_date"
);
//serverReqJsonObj["transId"] = getPosJsonValue("trans_id");
serverReqJsonObj
[
"memberTransId"
]
=
""
;
serverReqJsonObj
[
"memberTransId"
]
=
getPosJsonValue
(
"fm_transId"
).
toString
();
QJsonObject
transaction
;
transaction
[
"account"
]
=
getPosJsonValue
(
"fm_open_id"
);
QString
fm_open_id
=
getPosJsonValue
(
"fm_open_id"
).
toString
();
fm_open_id
.
remove
(
fm_open_id
.
length
()
-
1
,
1
);
transaction
[
"account"
]
=
fm_open_id
;
transaction
[
"totalAmount"
]
=
getPosJsonValue
(
"order_amount"
);
transaction
[
"payAmount"
]
=
getPosJsonValue
(
"paid_amount"
);
...
...
@@ -58,57 +59,12 @@ void TaskFinal::packageServerReq()
{
QJsonObject
pay
;
pay
[
"amount"
]
=
p
.
toObject
()[
"pay_amount"
].
toInt
();
pay
[
"thirdPayTransId"
]
=
p
.
toObject
()[
"
thirdPayT
ransId"
].
toString
();
pay
[
"thirdPayTransId"
]
=
p
.
toObject
()[
"
pay_t
ransId"
].
toString
();
pay
[
"code"
]
=
p
.
toObject
()[
"code"
].
toString
();
pay
[
"transId"
]
=
getPosJsonValue
(
"trans_id"
).
toString
();
pay
[
"payTransId"
]
=
p
.
toObject
()[
"
pay_transI
d"
].
toString
();
pay
[
"payTransId"
]
=
p
.
toObject
()[
"
fm_i
d"
].
toString
();
QString
typeModeFlag
=
p
.
toObject
()[
"pay_id"
].
toString
();
#if 0
if(typeModeFlag == "00")
{
//现金支付
pay["typeModeFlag"] = 20005;
}
else if(typeModeFlag == "000")
{
//非码会员支付
if(p.toObject()["code"].toString().isEmpty())
{
//券码为空,是 会员储值金支付
pay["typeModeFlag"] = 20001;
}
else
{
//否则,是代金券/商品券支付(统一转为代金券)
pay["typeModeFlag"] = 20003;
}
}
else if(typeModeFlag == "7")
{
//支付宝钱包
pay["typeModeFlag"] = 10001;
}
else if(typeModeFlag == "9")
{
//微信钱包
pay["typeModeFlag"] = 10004; //
}
else if(typeModeFlag == "2")
{
//银行卡
pay["typeModeFlag"] = 10011;
}
else if(typeModeFlag == "8")
{
//翼支付
pay["typeModeFlag"] = 10010;
}
else
{
pay["typeModeFlag"] = typeModeFlag.toInt();
FMP_ERROR() << QStringLiteral("未知的支付类型: ") << typeModeFlag;
}
#endif
if
(
typeModeFlag
==
"84"
)
{
//会员商品券
...
...
@@ -124,6 +80,11 @@ void TaskFinal::packageServerReq()
//非码会员支付
pay
[
"typeModeFlag"
]
=
20001
;
}
else
if
(
typeModeFlag
==
"87"
)
{
//非码折扣券
pay
[
"typeModeFlag"
]
=
20008
;
}
else
if
(
typeModeFlag
==
"0"
)
{
//现金
...
...
@@ -141,12 +102,6 @@ void TaskFinal::packageServerReq()
FMP_ERROR
()
<<
QStringLiteral
(
"其他支付: "
)
<<
typeModeFlag
;
}
// if(typeModeFlag == "20002")
// {
// //积分支付
// pay["typeModeFlag"] = 20002;
// }
payList
.
append
(
pay
);
}
transaction
[
"payList"
]
=
payList
;
...
...
@@ -205,9 +160,9 @@ bool TaskFinal::sendToServer(bool /*isShowMsg*/)
// 备份
if
(
error
()
==
FM_API_NETWORERROR
)
{
if
(
searchJsonValue
(
serverReqJsonObj
,
ServerProps
(
PosProps
.
CodeAmount
)).
toInt
()
==
0
&&
searchJsonValue
(
serverReqJsonObj
,
ServerProps
(
PosProps
.
ScoreAmount
)).
toInt
()
==
0
&&
searchJsonValue
(
serverReqJsonObj
,
ServerProps
(
PosProps
.
Coupons
)).
toArray
().
isEmpty
())
{
if
(
getServerJsonValue
(
ServerProps
(
PosProps
.
CodeAmount
)).
toInt
()
==
0
&&
getServerJsonValue
(
ServerProps
(
PosProps
.
ScoreAmount
)).
toInt
()
==
0
&&
getServerJsonValue
(
ServerProps
(
PosProps
.
Coupons
)).
toArray
().
isEmpty
())
{
QString
fm_id
=
backup
();
if
(
!
fm_id
.
isEmpty
()){
setError
(
FM_API_SUCCESS
);
...
...
task/tasklogin.cpp
View file @
8a8288f0
...
...
@@ -17,7 +17,9 @@ QByteArray TaskLogin::doTask()
if
(
posReqJsonObj
.
contains
(
"member_sign"
))
{
//直接保存member_sign到_session中
session
()
->
addData
(
"code"
,
posReqJsonObj
[
"member_sign"
].
toString
());
QString
member_sign
=
posReqJsonObj
[
"member_sign"
].
toString
();
member_sign
.
remove
(
member_sign
.
length
()
-
1
,
1
);
session
()
->
addData
(
"code"
,
member_sign
);
onLogin
();
}
else
...
...
@@ -116,7 +118,7 @@ void TaskLogin::packagePOSRsp()
posRspJsonObj
[
"statusCode"
]
=
getServerJsonValue
(
"statusCode"
).
toInt
();
posRspJsonObj
[
"msg"
]
=
getServerJsonValue
(
"msg"
).
toString
();
posRspJsonObj
[
"prompt"
]
=
getServerJsonValue
(
"prompt"
).
toInt
();
posRspJsonObj
[
"fm_open_id"
]
=
getServerJsonValue
(
"account"
).
toString
();
posRspJsonObj
[
"fm_open_id"
]
=
getServerJsonValue
(
"account"
).
toString
()
.
append
(
QString
::
number
(
getServerJsonValue
(
"canPay"
).
toInt
()))
;
posRspJsonObj
[
"account"
]
=
getServerJsonValue
(
"memberNo"
).
toString
();
posRspJsonObj
[
"type_code"
]
=
getServerJsonValue
(
"typecode"
).
toString
();
posRspJsonObj
[
"type_name"
]
=
getServerJsonValue
(
"typename"
).
toString
();
...
...
@@ -145,7 +147,25 @@ void TaskLogin::onLogin()
QString
info
=
serverRspJsonObj
[
"msg"
].
toString
();
FMP_WARN
()
<<
"Login failed: "
<<
info
;
}
if
(
_window
!=
nullptr
)
if
(
session
()
->
data
(
"fm_entry"
).
toInt
()
==
FM_Pay
)
{
if
(
getServerJsonValue
(
"canPay"
).
toInt
())
{
if
(
_window
!=
nullptr
)
_window
->
close
();
}
else
{
//如果服务端返回该会员不能支付,则不关闭窗口,继续输入支付码
if
(
_window
!=
nullptr
)
{
FMMsgWnd
::
WarningWnd
(
QString
::
fromLocal8Bit
(
"请输入支付码!"
),
_window
);
_window
->
resetWnd
();
}
}
}
else
if
(
_window
!=
nullptr
)
{
_window
->
close
();
}
...
...
task/taskpay.cpp
View file @
8a8288f0
...
...
@@ -8,6 +8,9 @@
#include <QJsonDocument>
#include <QJsonObject>
#include <QCryptographicHash>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlError>
TaskPay
::
TaskPay
(
QJsonObject
&
jsonObj
,
Session
*
session
,
QObject
*
parent
)
:
FMTask
(
jsonObj
,
session
,
parent
)
...
...
@@ -15,10 +18,9 @@ TaskPay::TaskPay(QJsonObject &jsonObj, Session *session, QObject *parent)
}
QByteArray
TaskPay
::
doTask
()
{
FMP_DEBUG
()
<<
__FUNCTION__
;
{
//判断是否真的是会员,如果不是,则先认证
if
(
!
posReqJsonObj
.
contains
(
"fm_open_id"
)
||
posReqJsonObj
[
"fm_open_id"
].
toString
().
isEmpty
())
if
(
!
posReqJsonObj
.
contains
(
"fm_open_id"
)
||
posReqJsonObj
[
"fm_open_id"
].
toString
().
isEmpty
()
||
posReqJsonObj
[
"fm_open_id"
].
toString
().
endsWith
(
"0"
)
)
{
QJsonObject
reqObj
;
reqObj
[
"pos_ver"
]
=
getPosJsonValue
(
"pos_ver"
);
...
...
@@ -28,6 +30,7 @@ QByteArray TaskPay::doTask()
reqObj
[
"store_id"
]
=
getPosJsonValue
(
"store_id"
);
reqObj
[
"business_date"
]
=
getPosJsonValue
(
"business_date"
);
session
()
->
addData
(
"fm_entry"
,
FM_Pay
);
TaskLogin
taskLogin
(
reqObj
,
session
());
QByteArray
ret
=
taskLogin
.
doTask
();
if
(
taskLogin
.
error
()
!=
FM_API_SUCCESS
)
...
...
@@ -36,7 +39,16 @@ QByteArray TaskPay::doTask()
}
//认证成功,使用返回的fm_open_id进行会员支付
posReqJsonObj
[
"fm_open_id"
]
=
QJsonDocument
::
fromJson
(
ret
).
object
()[
"fm_open_id"
];
QString
fm_open_id
=
QJsonDocument
::
fromJson
(
ret
).
object
()[
"fm_open_id"
].
toString
();
fm_open_id
=
fm_open_id
.
remove
(
fm_open_id
.
length
()
-
1
,
1
);
posReqJsonObj
[
"fm_open_id"
]
=
fm_open_id
;
}
else
{
//如果可以直接会员支付,则需要将pos传入的fm_open_id的最后一位去掉
QString
fm_open_id
=
posReqJsonObj
[
"fm_open_id"
].
toString
();
fm_open_id
.
remove
(
fm_open_id
.
length
()
-
1
,
1
);
posReqJsonObj
[
"fm_open_id"
]
=
fm_open_id
;
}
//获取可用的代金券
...
...
@@ -59,16 +71,9 @@ QByteArray TaskPay::doTask()
session
()
->
addData
(
"name"
,
getServerJsonValue
(
"name"
));
//清空相应json对象
QStringList
keys
=
serverReqJsonObj
.
keys
();
foreach
(
QString
key
,
keys
)
{
serverReqJsonObj
.
remove
(
key
);
}
keys
=
serverRspJsonObj
.
keys
();
foreach
(
QString
key
,
keys
)
{
serverRspJsonObj
.
remove
(
key
);
}
//清空相应json对象
serverReqJsonObj
=
QJsonObject
();
serverRspJsonObj
=
QJsonObject
();
RunFunction
(
setWindow
);
RunFunction
(
showWindow
);
...
...
@@ -170,7 +175,6 @@ void TaskPay::packageServerReq()
int
payAmount
=
0
;
//该次会员支付的总金额
transaction
[
"memberTransId"
]
=
""
;
transaction
[
"account"
]
=
getPosJsonValue
(
"fm_open_id"
);
// transaction["payAmount"] = getPosJsonValue("need_amount");
transaction
[
"isUseScore"
]
=
session
()
->
data
(
"isUseScore"
).
toInt
();
QJsonArray
products
;
...
...
@@ -187,13 +191,16 @@ void TaskPay::packageServerReq()
QJsonArray
payList
;
//余额支付详情
QJsonObject
balance
;
balance
[
"amount"
]
=
session
()
->
data
(
"codeAmount"
).
toInt
();
balance
[
"transId"
]
=
getPosJsonValue
(
"trans_id"
);
balance
[
"typeModeFlag"
]
=
20001
;
balance
[
"code"
]
=
""
;
payList
.
push_back
(
balance
);
payAmount
+=
session
()
->
data
(
"codeAmount"
).
toInt
();
if
(
session
()
->
data
(
"codeAmount"
).
toInt
()
>
0
)
{
QJsonObject
balance
;
balance
[
"amount"
]
=
session
()
->
data
(
"codeAmount"
).
toInt
();
balance
[
"transId"
]
=
getPosJsonValue
(
"trans_id"
);
balance
[
"typeModeFlag"
]
=
20001
;
balance
[
"code"
]
=
""
;
payList
.
push_back
(
balance
);
payAmount
+=
session
()
->
data
(
"codeAmount"
).
toInt
();
}
//积分支付详情(天福目前没有积分支付)
if
(
transaction
[
"isUseScore"
].
toInt
())
...
...
@@ -282,48 +289,114 @@ void TaskPay::packagePOSRsp()
//支付方式
QMap
<
int
,
QString
>
typeModeFlags
;
typeModeFlags
[
20005
]
=
"0"
;
//现金
typeModeFlags
[
10011
]
=
"2"
;
//银行卡
typeModeFlags
[
10001
]
=
"7"
;
//支付宝支付
typeModeFlags
[
20004
]
=
"77"
;
//商品券
typeModeFlags
[
10010
]
=
"8"
;
//翼支付
typeModeFlags
[
20003
]
=
"76"
;
//代金券
typeModeFlags
[
10004
]
=
"9"
;
//微信支付
typeModeFlags
[
20001
]
=
"20001"
;
//会员储值金支付
typeModeFlags
[
20002
]
=
"20002"
;
//会员积分支付
typeModeFlags
[
20004
]
=
"84"
;
//会员商品券
typeModeFlags
[
20003
]
=
"85"
;
//会员代金券
typeModeFlags
[
20001
]
=
"86"
;
//非码会员余额
typeModeFlags
[
20008
]
=
"87"
;
//非码折扣券
//支付方式描述
QMap
<
int
,
QString
>
description
;
description
[
20001
]
=
QStringLiteral
(
"会员储值金支付"
);
description
[
20002
]
=
QStringLiteral
(
"会员积分支付"
);
description
[
20003
]
=
QStringLiteral
(
"代金券支付"
);
description
[
20004
]
=
QStringLiteral
(
"商品券支付"
);
description
[
20005
]
=
QStringLiteral
(
"现金支付"
);
description
[
10011
]
=
QStringLiteral
(
"银行卡支付"
);
description
[
10001
]
=
QStringLiteral
(
"支付宝支付"
);
description
[
10010
]
=
QStringLiteral
(
"翼支付"
);
description
[
10004
]
=
QStringLiteral
(
"微信支付"
);
description
[
20005
]
=
QStringLiteral
(
"现金"
);
description
[
20004
]
=
QStringLiteral
(
"会员商品券"
);
description
[
20003
]
=
QStringLiteral
(
"会员代金券"
);
description
[
20001
]
=
QStringLiteral
(
"非码会员余额"
);
description
[
20008
]
=
QStringLiteral
(
"非码折扣券"
);
//计算总支付额
int
totalPaid
=
getServerJsonValue
(
"scoreAmount"
).
toInt
()
+
getServerJsonValue
(
"disAmount"
).
toInt
()
+
getServerJsonValue
(
"codeAmount"
).
toInt
();
int
totalPaid
=
0
;
bool
useCoupon
=
false
;
for
(
int
i
=
0
;
i
<
servPayArray
.
size
();
i
++
)
{
QJsonObject
pay_id
;
pay_id
[
"pay_id"
]
=
typeModeFlags
[
servPayArray
[
i
].
toObject
()[
"typeModeFlag"
].
toInt
()];
pay_id
[
"pay_str"
]
=
description
[
servPayArray
[
i
].
toObject
()[
"typeModeFlag"
].
toInt
()];
pay_id
[
"pay_amount"
]
=
servPayArray
[
i
].
toObject
()[
"amount"
].
toInt
();
pay_id
[
"code"
]
=
servPayArray
[
i
].
toObject
()[
"code"
].
toString
();
QJsonObject
currentPay
=
servPayArray
[
i
].
toObject
();
int
type
=
currentPay
[
"typeModeFlag"
].
toInt
();
if
(
type
==
20003
||
type
==
20004
||
type
==
20008
)
useCoupon
=
true
;
pay_id
[
"pay_id"
]
=
typeModeFlags
.
contains
(
type
)
?
typeModeFlags
[
type
]
:
QStringLiteral
(
"未知"
);
pay_id
[
"pay_str"
]
=
description
.
contains
(
type
)
?
description
[
type
]
:
QStringLiteral
(
"未知"
);
pay_id
[
"pay_amount"
]
=
currentPay
[
"amount"
].
toInt
();
pay_id
[
"code"
]
=
currentPay
[
"code"
].
toString
();
pay_id
[
"act_id"
]
=
currentPay
[
"couponFkId"
].
toString
();
pay_ids
.
push_back
(
pay_id
);
//
totalPaid += pay_id["pay_amount"].toInt();
totalPaid
+=
pay_id
[
"pay_amount"
].
toInt
();
}
posRspJsonObj
[
"paid_total_amount"
]
=
totalPaid
;
posRspJsonObj
[
"pay_ids"
]
=
pay_ids
;
//如果支付成功,且本次使用了优惠券,则记录流水号,以限制一笔订单只使用一张券
if
(
useCoupon
&&
posRspJsonObj
[
PosProps
.
StatusCode
].
toInt
()
==
FM_API_SUCCESS
)
{
storeUseCoupon
(
posReqJsonObj
[
PosProps
.
TransId
].
toString
());
}
}
void
TaskPay
::
onPay
()
{
sendToServer
();
_window
->
close
();
}
void
TaskPay
::
storeUseCoupon
(
QString
transId
)
{
QString
appPath
=
QApplication
::
applicationDirPath
();
QSqlDatabase
db
=
QSqlDatabase
::
addDatabase
(
"QSQLITE"
,
"couponConnection"
);
db
.
setDatabaseName
(
appPath
+
"/coupon.db"
);
if
(
!
db
.
open
())
return
;
QString
storeId
=
session
()
->
data
(
"store_id"
).
toString
();
if
(
storeId
.
length
()
==
4
)
transId
=
transId
.
mid
(
0
,
20
);
else
transId
=
transId
.
mid
(
0
,
21
);
QSqlQuery
query
(
db
);
QString
sql
=
QString
(
"select * from coupon where trans_id='%1'"
).
arg
(
transId
);
if
(
!
query
.
exec
(
sql
))
{
FMP_ERROR
()
<<
query
.
lastError
().
text
();
db
.
close
();
return
;
}
while
(
query
.
next
())
{
bool
used
=
query
.
value
(
"used"
).
toBool
();
if
(
used
)
{
db
.
close
();
return
;
}
else
{
QMap
<
QString
,
QVariant
>
coupons
=
session
()
->
data
(
"payCouponMap"
).
toMap
();
if
(
coupons
.
size
())
{
if
(
!
query
.
exec
(
QString
(
"update coupon set used=1 where trans_id='%1'"
).
arg
(
transId
)))
{
FMP_ERROR
()
<<
query
.
lastError
().
text
();
db
.
close
();
return
;
}
}
}
}
//是一笔新订单,则先清空数据库
if
(
!
query
.
exec
(
"delete from coupon"
))
{
FMP_ERROR
()
<<
query
.
lastError
().
text
();
}
//插入新记录
sql
=
QString
(
"insert into coupon values('%1',1)"
).
arg
(
transId
);
if
(
!
query
.
exec
(
sql
))
{
FMP_ERROR
()
<<
query
.
lastError
().
text
();
}
db
.
close
();
return
;
}
\ No newline at end of file
task/taskpay.h
View file @
8a8288f0
#ifndef TASKPAY_H
#
ifndef
TASKPAY_H
#define TASKPAY_H
#include "fmtask.h"
#include "taskcoupon.h"
...
...
@@ -19,6 +19,7 @@ public:
private
slots
:
void
onPay
();
void
storeUseCoupon
(
QString
transId
);
};
#endif // TASKPAY_H
windows/fmcouponwidget.cpp
View file @
8a8288f0
#include "fmcouponwidget.h"
#
include
"fmcouponwidget.h"
#include "ui_fmcouponwidget.h"
#include <QPainter>
...
...
@@ -8,6 +8,8 @@ FMCouponWidget::FMCouponWidget(Coupon conpon, QWidget *parent) :
{
ui
->
setupUi
(
this
);
ui
->
code_lab
->
setText
(
conpon
.
code
);
ui
->
code_lab
->
hide
();
ui
->
amount_lab
->
setText
(
QString
::
number
(
conpon
.
disAmount
/
100
,
'f'
,
2
));
ui
->
desc_lab
->
setText
(
conpon
.
desc
);
}
...
...
windows/fmviplogin.cpp
View file @
8a8288f0
...
...
@@ -54,37 +54,7 @@ QString FMVipLogin::getVersionInfo()
}
void
FMVipLogin
::
on_login_btn_clicked
()
{
QJsonObject
result
;
QJsonObject
req
;
//req["ver"] = 1;
//req["action"] = "redeem";
req
[
"store_id"
]
=
"99998"
;
req
[
"operator_id"
]
=
"00000002"
;
req
[
"station_id"
]
=
1
;
req
[
"trans_id"
]
=
QDateTime
::
currentDateTime
().
toString
(
"yyyyMMddHHmmsszzz"
);
req
[
"business_date"
]
=
QDate
::
currentDate
().
toString
(
"yyyyMMdd"
);
if
(
ctxTest
!=
nullptr
)
{
try
{
//! Verify pointer
ctxTest
->
getPlugin
();
ctkServiceReference
ref
=
ctxTest
->
getServiceReference
<
FMPRedeemInterface
>
();
FMPRedeemInterface
*
redeem
=
ctxTest
->
getService
<
FMPRedeemInterface
>
(
ref
);
redeem
->
StartService
();
result
=
redeem
->
Redeem
(
QJsonObject
(),
req
);
qDebug
()
<<
result
;
}
catch
(
const
ctkException
&
)
{
qDebug
()
<<
"Invalid context"
<<
ctxTest
;
}
}
return
;
{
QString
id
=
ui
->
login_edit
->
text
();
_session
->
addData
(
"code"
,
id
);
...
...
windows/fmviporder.cpp
View file @
8a8288f0
...
...
@@ -4,18 +4,20 @@
#include "ui_fmviporder.h"
#include <QScrollBar>
#include <QJsonArray>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlError>
#include "fmp_logger_i.h"
FMVipOrder
::
FMVipOrder
(
QDialog
*
parent
)
:
FMVipWnd
(
parent
),
ui
(
new
Ui
::
FMVipOrder
)
{
ui
->
setupUi
(
this
);
orderInfo
=
nullptr
;
}
FMVipOrder
::~
FMVipOrder
()
{
del_p
(
orderInfo
);
delete
ui
;
}
...
...
@@ -31,45 +33,40 @@ void FMVipOrder::initWnd(Session *se)
QString
fm_id
=
session
()
->
data
(
"fm_open_id"
).
toString
();
QString
name
=
session
()
->
data
(
"name"
).
toString
();
QString
amount_str
=
QString
::
number
(
session
()
->
data
(
"amount"
).
toInt
());
QString
score_str
=
QString
::
number
(
session
()
->
data
(
"score"
).
toInt
());
int
needPay
=
session
()
->
data
(
"need_amount"
).
toInt
();
QString
needPay_str
=
QString
::
number
(
needPay
);
orderInfo
=
new
FMVipOrder
::
OrderInfo
(
amount_str
,
score_str
,
needPay_str
);
orderInfo
->
setCouponMap
(
session
()
->
getCouponMap
(
"payCouponMap"
));
_couponMap
=
session
()
->
getCouponMap
(
"payCouponMap"
);
_couponAmount
=
0
;
_amount
=
session
()
->
data
(
"amount"
).
toInt
()
/
100.0
;
_score
=
session
()
->
data
(
"score"
).
toInt
();
_needPay
=
session
()
->
data
(
"need_amount"
).
toInt
()
/
100.0
;
ui
->
store_label
->
setText
(
session
()
->
data
(
"store_id"
).
toString
());
ui
->
pos_label
->
setText
(
session
()
->
data
(
"pos_id"
).
toString
());
ui
->
operator_label
->
setText
(
operator_id
);
ui
->
bd_label
->
setText
(
business_date
);
ui
->
id_label
->
setText
(
fm_id
);
ui
->
point_label
->
setText
(
score_str
);
ui
->
balance_label
->
setText
(
orderInfo
->
getAmountStr
(
));
ui
->
price_label
->
setText
(
orderInfo
->
getNeedPayStr
(
));
ui
->
point_label
->
setText
(
QString
::
number
(
_score
)
);
ui
->
balance_label
->
setText
(
QString
::
number
(
_amount
));
ui
->
price_label
->
setText
(
QString
::
number
(
_needPay
));
ui
->
name_label
->
setText
(
name
);
initCouponItems
();
connect
(
ui
->
coupon_page
,
SIGNAL
(
itemClicked
(
QListWidgetItem
*
)),
this
,
SLOT
(
onItemClicked
(
QListWidgetItem
*
)));
ui
->
pay_chk
->
setText
(
QString
::
fromLocal8Bit
(
"使用积分抵用 %1 元"
).
arg
(
orderInfo
->
getScoreAmount
()
));
ui
->
pay_chk
->
setText
(
QString
::
fromLocal8Bit
(
"使用积分抵用 %1 元"
).
arg
(
_score
/
100
));
oldPayText
=
DOUBLE_STR
(
orderInfo
->
getMaxWillPay
());
ui
->
pay_edit
->
setText
(
oldPayText
);
ui
->
pay_edit
->
setText
(
QString
::
number
(
qMin
(
_amount
,
_needPay
)));
QRegExp
regexp
(
"^[0-9]+(.[0-9]{2})?$"
);
ui
->
pay_edit
->
setValidator
(
new
QRegExpValidator
(
regexp
));
setWillPayText
();
}
void
FMVipOrder
::
on_pay_btn_clicked
()
{
session
()
->
addData
(
"payCouponMap"
,
orderInfo
->
selectCouponMap
);
//int codeAmount = orderInfo->getPayAmount(ui->pay_edit->text());
int
codeAmount
=
ui
->
pay_edit
->
text
().
toDouble
()
*
100
;
session
()
->
addData
(
"payCouponMap"
,
_selectCouponMap
);
int
codeAmount
=
QString
::
number
(
ui
->
pay_edit
->
text
().
toDouble
()
*
100
).
toInt
();
session
()
->
addData
(
"codeAmount"
,
codeAmount
);
session
()
->
addData
(
"isUseScore"
,
orderInfo
->
isUseScore
());
this
->
setEnabled
(
false
);
...
...
@@ -80,76 +77,49 @@ void FMVipOrder::on_pay_btn_clicked()
void
FMVipOrder
::
on_pay_chk_clicked
(
bool
checked
)
{
orderInfo
->
setUseScore
(
checked
);
setWillPayText
();
}
void
FMVipOrder
::
onItemClicked
(
QListWidgetItem
*
item
)
{
QString
code
=
item
->
data
(
Qt
::
UserRole
).
toString
();
// if(orderInfo->couponMap()[code].typeModeFlag == 20003) //代金券
// {
// // 如果代金券已被选中则取消,否则选中
// if(orderInfo->selectCouponMap.contains(code)) {
// ui->coupon_page->itemWidget(item)->setStyleSheet("#FMCouponWidget{background-color: rgb(255, 255, 255); border: none; border-left: 5 solid rgb(255, 170, 37);}");
// orderInfo->selectCouponMap.remove(code);
// orderInfo->enoughCoupon(); // 计算一下当前代金券金额
// }else{
// if(orderInfo->couponMap()[code].compatible_flag == 0)
// {
// FMMsgWnd::WarningWnd(QString::fromLocal8Bit("请注意该券不能与其他券叠加使用!"), this);
// return ;
// }
// ui->coupon_page->itemWidget(item)->setStyleSheet("#FMCouponWidget{background-color: rgb(255, 255, 255); border: none; border-image: url(:/coupon_select.png);}");
// orderInfo->selectCouponMap[code] = orderInfo->couponMap()[code];
// if(orderInfo->enoughCoupon())
// {
// FMMsgWnd::WarningWnd(QString::fromLocal8Bit("请注意代金券总额已超过待付金额!"), this);
// }
// }
// }
// else if(orderInfo->couponMap()[code].typeModeFlag == 20004) //商品券
// {
// if(orderInfo->selectCouponMap.contains(code))
// {
// ui->coupon_page->itemWidget(item)->setStyleSheet("#FMCouponWidget{background-color: rgb(255, 255, 255); border: none; border-left: 5 solid rgb(255, 170, 37);}");
// orderInfo->selectCouponMap.remove(code);
// orderInfo->enoughCoupon();
// }
// else
// {
// if(orderInfo->couponMap()[code].compatible_flag == 0)
// {
// FMMsgWnd::WarningWnd(QString::fromLocal8Bit("请注意该券不能与其他券叠加使用!"), this);
// return ;
// }
// ui->coupon_page->itemWidget(item)->setStyleSheet("#FMCouponWidget{background-color: rgb(255, 255, 255); border: none; border-image: url(:/coupon_select.png);}");
// orderInfo->selectCouponMap[code] = orderInfo->couponMap()[code];
// if(orderInfo->enoughCoupon())
// {
// FMMsgWnd::WarningWnd(QString::fromLocal8Bit("请注意代金券总额已超过待付金额!"), this);
// }
// }
// }
if
(
orderInfo
->
selectCouponMap
.
contains
(
code
))
//先判断该笔订单是否已使用过卡券
if
(
!
canUseCoupon
(
session
()
->
data
(
"trans_id"
).
toString
()))
{
FMMsgWnd
::
WarningWnd
(
QString
::
fromLocal8Bit
(
"无法使用多张券"
),
this
);
return
;
}
//一笔订单只能使用一张券
if
(
_selectCouponMap
.
contains
(
code
))
{
//已经选择该券,再次点击则取消选择
ui
->
coupon_page
->
itemWidget
(
item
)
->
setStyleSheet
(
"#FMCouponWidget{background-color: rgb(255, 255, 255); border: none; border-left: 5 solid rgb(255, 170, 37);}"
);
orderInfo
->
selectCouponMap
.
remove
(
code
);
orderInfo
->
enoughCoupon
();
_selectCouponMap
.
remove
(
code
);
}
else
{
if
(
orderInfo
->
couponMap
()[
code
].
compatible_flag
==
0
)
if
(
!
_selectCouponMap
.
isEmpty
()
)
{
FMMsgWnd
::
WarningWnd
(
QString
::
fromLocal8Bit
(
"请注意该券不能与其他券叠加使用!"
),
this
);
return
;
}
ui
->
coupon_page
->
itemWidget
(
item
)
->
setStyleSheet
(
"#FMCouponWidget{background-color: rgb(255, 255, 255); border: none; border-image: url(:/coupon_select.png);}"
);
orderInfo
->
selectCouponMap
[
code
]
=
orderInfo
->
couponMap
()[
code
];
if
(
orderInfo
->
enoughCoupon
())
{
FMMsgWnd
::
WarningWnd
(
QString
::
fromLocal8Bit
(
"请注意代金券总额已超过待付金额!"
),
this
);
QString
lastCode
=
_selectCouponMap
.
begin
().
key
();
for
(
int
i
=
0
;
!
lastCode
.
isEmpty
()
&&
i
<
ui
->
coupon_page
->
count
();
i
++
)
{
QListWidgetItem
*
curItem
=
ui
->
coupon_page
->
item
(
i
);
if
(
curItem
->
data
(
Qt
::
UserRole
).
toString
()
==
lastCode
)
{
ui
->
coupon_page
->
itemWidget
(
curItem
)
->
setStyleSheet
(
"#FMCouponWidget{background-color: rgb(255, 255, 255); border: none; border-left: 5 solid rgb(255, 170, 37);}"
);
_selectCouponMap
.
clear
();
break
;
}
}
}
ui
->
coupon_page
->
itemWidget
(
item
)
->
setStyleSheet
(
"#FMCouponWidget{background-color: rgb(255, 255, 255); border: none; border-image: url(:/img/coupon_select.png);}"
);
_selectCouponMap
[
code
]
=
_couponMap
[
code
];
}
if
(
enoughCoupon
())
{
FMMsgWnd
::
WarningWnd
(
QString
::
fromLocal8Bit
(
"请注意代金券总额已超过待付金额!"
),
this
);
}
setWillPayText
();
}
...
...
@@ -157,7 +127,6 @@ void FMVipOrder::onItemClicked(QListWidgetItem *item)
void
FMVipOrder
::
initCouponItems
()
{
QMap
<
QString
,
Coupon
>
coupons
=
session
()
->
getCouponMap
(
"payCouponMap"
);
qDebug
()
<<
coupons
.
size
();
foreach
(
Coupon
coupon
,
coupons
.
values
())
{
auto
item
=
new
QListWidgetItem
();
...
...
@@ -173,10 +142,14 @@ void FMVipOrder::initCouponItems()
void
FMVipOrder
::
setWillPayText
()
{
on_pay_edit_textChanged
(
oldPayText
);
double
needPay
=
0
;
if
(
_needPay
>=
_couponAmount
)
needPay
=
_needPay
-
_couponAmount
;
ui
->
pay_edit
->
setText
(
QString
::
number
(
needPay
));
ui
->
pay_edit
->
setFocus
();
ui
->
pay_edit
->
selectAll
();
on_pay_edit_textChanged
(
ui
->
pay_edit
->
text
());
}
void
FMVipOrder
::
on_coupon_prev_btn_clicked
()
...
...
@@ -194,12 +167,13 @@ void FMVipOrder::on_coupon_next_btn_clicked()
void
FMVipOrder
::
on_pay_edit_textChanged
(
const
QString
&
text
)
{
double
num
=
text
.
toDouble
();
double
maxPay
=
orderInfo
->
getMaxWillPay
();
double
willPay
=
_needPay
-
_couponAmount
;
double
maxPay
=
qMin
(
qMax
(
willPay
,
0.0
),
_amount
);
if
(
num
>
maxPay
)
{
ui
->
pay_edit
->
setText
(
DOUBLE_STR
(
maxPay
));
QString
maxPay_info
=
QString
::
fromLocal8Bit
(
"余额只需支付 %1 元"
);
if
(
maxPay
>=
orderInfo
->
getAmountStr
().
toDouble
()
)
{
if
(
maxPay
>=
_amount
)
{
maxPay_info
=
QString
::
fromLocal8Bit
(
"余额最多支付 %1 元"
);
}
ui
->
pay_max
->
setText
(
maxPay_info
.
arg
(
maxPay
));
...
...
@@ -207,7 +181,65 @@ void FMVipOrder::on_pay_edit_textChanged(const QString &text)
ui
->
pay_edit
->
setFocus
();
ui
->
pay_edit
->
selectAll
();
}
else
{
oldPayText
=
text
;
ui
->
pay_max
->
setText
(
""
);
}
}
bool
FMVipOrder
::
enoughCoupon
()
{
_couponAmount
=
0.0
;
foreach
(
auto
coupon
,
_selectCouponMap
)
{
_couponAmount
+=
coupon
.
disAmount
/
100.0
;
}
bool
isEnough
=
(
_couponAmount
>
_needPay
);
return
isEnough
;
}
bool
FMVipOrder
::
canUseCoupon
(
QString
curTransId
)
{
QString
appPath
=
QApplication
::
applicationDirPath
();
QSqlDatabase
db
=
QSqlDatabase
::
addDatabase
(
"QSQLITE"
,
"couponConnection"
);
db
.
setDatabaseName
(
appPath
+
"/coupon.db"
);
if
(
!
db
.
open
())
{
FMP_ERROR
()
<<
QString
::
fromLocal8Bit
(
"打开coupon.db失败. "
)
<<
db
.
lastError
().
text
();
return
false
;
}
QSqlQuery
query
(
db
);
if
(
!
query
.
exec
(
"create table if not exists coupon(trans_id text, used boolean)"
))
{
FMP_ERROR
()
<<
query
.
lastError
().
text
();
db
.
close
();
return
false
;
}
QString
storeId
=
session
()
->
data
(
"store_id"
).
toString
();
if
(
storeId
.
length
()
==
4
)
curTransId
=
curTransId
.
mid
(
0
,
20
);
else
curTransId
=
curTransId
.
mid
(
0
,
21
);
QString
sql
=
QString
(
"select * from coupon where trans_id='%1'"
).
arg
(
curTransId
);
if
(
!
query
.
exec
(
sql
))
{
FMP_ERROR
()
<<
query
.
lastError
().
text
();
db
.
close
();
return
false
;
}
while
(
query
.
next
())
{
bool
used
=
query
.
value
(
"used"
).
toBool
();
if
(
used
)
{
db
.
close
();
return
false
;
}
else
{
db
.
close
();
return
true
;
}
}
db
.
close
();
return
true
;
}
\ No newline at end of file
windows/fmviporder.h
View file @
8a8288f0
...
...
@@ -28,149 +28,22 @@ signals:
public
slots
:
void
on_pay_btn_clicked
();
void
on_pay_chk_clicked
(
bool
checked
);
void
onItemClicked
(
QListWidgetItem
*
);
private
slots
:
void
on_coupon_prev_btn_clicked
();
void
on_coupon_next_btn_clicked
();
void
on_pay_edit_textChanged
(
const
QString
&
text
);
private
:
class
OrderInfo
{
public
:
OrderInfo
()
{
_amountStr
=
_scoreStr
=
_needPayStr
=
""
;
_amount
=
_score
=
_needPay
=
_maxWillPay
=
_useScore
=
_couponAmount
=
0
;
}
OrderInfo
(
QString
amountStr
,
QString
scoreStr
,
QString
needPayStr
)
{
this
->
_amountStr
=
amountStr
;
this
->
_scoreStr
=
scoreStr
;
this
->
_needPayStr
=
needPayStr
;
_amount
=
_amountStr
.
toDouble
()
/
100
;
_score
=
_scoreStr
.
toDouble
()
/
100
;
_needPay
=
_needPayStr
.
toDouble
()
/
100
;
_maxWillPay
=
_useScore
=
_couponAmount
=
0
;
setMaxWillPay
();
}
QString
getAmountStr
()
{
return
DOUBLE_STR
(
_amount
);
}
QString
getNeedPayStr
()
{
return
DOUBLE_STR
(
_needPay
);
}
QString
getScoreAmount
()
{
return
DOUBLE_STR
(
MIN
(
_score
,
_needPay
));
}
int
getPayAmount
(
QString
amountStr
)
{
double
payAmount
=
MIN
(
_needPay
,
(
amountStr
.
toDouble
()
+
_couponAmount
+
_useScore
))
*
100
;
return
QString
::
number
(
payAmount
).
toInt
();
}
// 代金券总额超过待付时返回true
bool
enoughCoupon
()
{
_couponAmount
=
0
.
0
;
foreach
(
auto
coupon
,
selectCouponMap
)
{
//_couponAmount += coupon.disAmount / 100;
if
(
coupon
.
typeModeFlag
==
20003
)
{
//代金券
_couponAmount
+=
coupon
.
disAmount
/
100
;
}
else
if
(
coupon
.
typeModeFlag
==
20004
)
{
//商品券
_couponAmount
+=
coupon
.
dis_price
/
100
;
}
}
qDebug
()
<<
"_couponAmount: "
<<
_couponAmount
;
qDebug
()
<<
"_needPay: "
<<
_needPay
;
bool
isEnough
=
(
_couponAmount
>
_needPay
);
setMaxWillPay
();
return
isEnough
;
}
void
setUseScore
(
bool
isUse
)
{
if
(
isUse
)
{
_useScore
=
MIN
(
_score
,
_needPay
);
}
else
{
_useScore
=
0
;
}
setMaxWillPay
();
}
double
getUseScore
()
{
return
_useScore
;
}
int
isUseScore
()
{
return
(
_useScore
==
0
?
0
:
1
);
}
// 设置付款金额的最大值
void
setMaxWillPay
()
{
double
willPay
=
_needPay
-
_useScore
-
_couponAmount
;
_maxWillPay
=
MIN
(
MAX
(
willPay
,
0
),
_amount
);
}
double
getMaxWillPay
()
{
return
_maxWillPay
;
}
/// 代金券列表
void
setCouponMap
(
QMap
<
QString
,
Coupon
>
couponMap
)
{
this
->
_couponMap
=
couponMap
;
_maxPage
=
(
couponMap
.
count
()
-
1
)
/
6
+
1
;
_nowPage
=
-
1
;
}
QMap
<
QString
,
Coupon
>
couponMap
()
{
return
_couponMap
;
}
QMap
<
QString
,
Coupon
>
selectCouponMap
;
private
:
QString
_amountStr
,
_scoreStr
,
_needPayStr
;
double
_amount
,
_score
,
_needPay
;
QMap
<
QString
,
Coupon
>
_couponMap
;
int
_maxPage
,
_nowPage
;
// 代金券金额 使用积分金额 余额将付金额
double
_couponAmount
,
_useScore
,
_maxWillPay
;
};
private
:
Ui
::
FMVipOrder
*
ui
;
QMap
<
QString
,
Coupon
>
_couponMap
;
QMap
<
QString
,
Coupon
>
_selectCouponMap
;
double
_amount
,
_score
,
_needPay
,
_couponAmount
;
FMVipOrder
::
OrderInfo
*
orderInfo
;
QString
oldPayText
;
bool
enoughCoupon
();
void
initCouponItems
();
bool
canUseCoupon
(
QString
curTransId
);
//一笔订单的多次支付间,只能使用一张券
};
#endif // FMVIPORDER_H
windows/forms/fmviplogin.ui
View file @
8a8288f0
...
...
@@ -46,9 +46,14 @@
}
#logo_label {
font: 75 22px
"
微软雅黑
"
;;
color: rgb(220, 220, 220);
min-width: 120px; min-height: 54px;
margin-left: 20;
/*color: rgb(220, 220, 220);*/
color: rgb(255, 0, 0);
min-width: 100px; min-height: 55px;
}
#tflogo
{
image:url(:/img/tflogo.png);
background-repeat:no-repeat;
}
#close_btn {
min-width: 54;
...
...
@@ -280,6 +285,19 @@
<number>
0
</number>
</property>
<item>
<widget
class=
"QLabel"
name=
"tflogo"
>
<property
name=
"minimumSize"
>
<size>
<width>
55
</width>
<height>
55
</height>
</size>
</property>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"logo_label"
>
<property
name=
"maximumSize"
>
<size>
...
...
@@ -288,7 +306,7 @@
</size>
</property>
<property
name=
"text"
>
<string>
非码会员
</string>
<string>
天福会员管理系统
</string>
</property>
</widget>
</item>
...
...
@@ -317,7 +335,7 @@
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
""
>
<widget
class=
"QWidget"
name=
"
layoutWidget
"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
...
...
windows/forms/fmviporder.ui
View file @
8a8288f0
...
...
@@ -50,11 +50,13 @@
border-bottom: 0 solid silver;
}
#logo_label {
font: 75 22px
"
微软雅黑
"
;
;
color: rgb(2
20, 220, 22
0);
font: 75 22px
"
微软雅黑
"
;
color: rgb(2
55, 0,
0);
min-width: 120px; min-height: 54px;
margin-left: 20;
/*image: url(
"
:/img_logo.png
"
);*/
}
#tflogo{
image:url(:/img/tflogo.png);
background-repeat:no-repeat;
}
#close_btn {
min-width: 54;
...
...
@@ -327,6 +329,19 @@
<number>
0
</number>
</property>
<item>
<widget
class=
"QLabel"
name=
"tflogo"
>
<property
name=
"minimumSize"
>
<size>
<width>
55
</width>
<height>
55
</height>
</size>
</property>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"logo_label"
>
<property
name=
"maximumSize"
>
<size>
...
...
@@ -335,7 +350,7 @@
</size>
</property>
<property
name=
"text"
>
<string>
非码会员
</string>
<string>
天福会员管理系统
</string>
</property>
</widget>
</item>
...
...
windows/forms/fmvippanel.ui
View file @
8a8288f0
...
...
@@ -179,7 +179,7 @@
</size>
</property>
<property
name=
"text"
>
<string
/
>
<string
>
天福会员管理系统
</string
>
</property>
</widget>
</item>
...
...
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