Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_epay
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_epay
Commits
25d5b650
Commit
25d5b650
authored
Sep 21, 2017
by
Carwyn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正: 1. 判断数据库连接是否存在Bug; 2.支付等待确认按钮后才返回; 3. 支付错误界面宽度调整
parent
215e58a6
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
126 additions
and
63 deletions
+126
-63
fmp_database.cpp
+1
-1
fmp_epay_p.cpp
+66
-23
fmp_epay_p.h
+6
-1
fmp_epayview_dialog.cpp
+22
-5
fmp_epayview_dialog.ui
+21
-3
fmp_epayview_wait.ui
+9
-29
version.h
+1
-1
No files found.
fmp_database.cpp
View file @
25d5b650
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
FMPDataBase
::
FMPDataBase
(
QString
dbname
,
QString
connectname
,
QObject
*
parent
)
:
QObject
(
parent
)
FMPDataBase
::
FMPDataBase
(
QString
dbname
,
QString
connectname
,
QObject
*
parent
)
:
QObject
(
parent
)
{
{
if
(
QSqlDatabase
::
contains
(
connectname
))
{
if
(
!
QSqlDatabase
::
contains
(
connectname
))
{
_db
=
QSqlDatabase
::
addDatabase
(
"QSQLITE"
,
connectname
);
_db
=
QSqlDatabase
::
addDatabase
(
"QSQLITE"
,
connectname
);
}
}
else
{
else
{
...
...
fmp_epay_p.cpp
View file @
25d5b650
...
@@ -42,6 +42,7 @@ FMPePayPrivate::FMPePayPrivate(FMPePay *parent)
...
@@ -42,6 +42,7 @@ FMPePayPrivate::FMPePayPrivate(FMPePay *parent)
{
{
_watcher
=
new
QFutureWatcher
<
QByteArray
>
();
_watcher
=
new
QFutureWatcher
<
QByteArray
>
();
connect
(
_watcher
,
SIGNAL
(
finished
()
),
this
,
SLOT
(
witedata
()
)
);
connect
(
_watcher
,
SIGNAL
(
finished
()
),
this
,
SLOT
(
witedata
()
)
);
connect
(
this
,
&
FMPePayPrivate
::
confirmClicked
,
&
_api_evt
,
&
QEventLoop
::
quit
);
}
}
FMPePayPrivate
::~
FMPePayPrivate
()
FMPePayPrivate
::~
FMPePayPrivate
()
...
@@ -170,6 +171,7 @@ void FMPePayPrivate::Init()
...
@@ -170,6 +171,7 @@ void FMPePayPrivate::Init()
if
(
trans
.
contains
(
"refund_amount"
)
&&
trans
[
"refund_amount"
].
toInt
()
!=
0
if
(
trans
.
contains
(
"refund_amount"
)
&&
trans
[
"refund_amount"
].
toInt
()
!=
0
&&
trans
.
contains
(
FMP_JKEY_FM_ORDERID
)
&&
!
trans
[
FMP_JKEY_FM_ORDERID
].
toString
().
isEmpty
()
&&
trans
.
contains
(
FMP_JKEY_FM_ORDERID
)
&&
!
trans
[
FMP_JKEY_FM_ORDERID
].
toString
().
isEmpty
()
||
trans
.
contains
(
FMP_JKEY_PAY_TRANSID
)
&&
!
trans
[
FMP_JKEY_PAY_TRANSID
].
toString
().
isEmpty
())
{
||
trans
.
contains
(
FMP_JKEY_PAY_TRANSID
)
&&
!
trans
[
FMP_JKEY_PAY_TRANSID
].
toString
().
isEmpty
())
{
connect
(
this
,
&
FMPePayPrivate
::
finished
,
this
,
&
FMPePayPrivate
::
confirmClicked
);
ControlRefundJson
(
trans
);
ControlRefundJson
(
trans
);
return
;
return
;
}
}
...
@@ -240,10 +242,7 @@ void FMPePayPrivate::DockPayRequest(const QByteArray &json)
...
@@ -240,10 +242,7 @@ void FMPePayPrivate::DockPayRequest(const QByteArray &json)
QByteArray
FMPePayPrivate
::
DockPayRespond
()
QByteArray
FMPePayPrivate
::
DockPayRespond
()
{
{
QByteArray
json
=
"{
\"
statusCode
\"
:106,
\"
msg
\"
:
\"\347\252\227\345\217\243\345\267\262\345\205\263\351\227\255\357\274\214\344\272\244\346\230\223\345\217\226\346\266\210\"
,
\"
prompt
\"
:0}"
;
QByteArray
json
=
"{
\"
statusCode
\"
:106,
\"
msg
\"
:
\"\347\252\227\345\217\243\345\267\262\345\205\263\351\227\255\357\274\214\344\272\244\346\230\223\345\217\226\346\266\210\"
,
\"
prompt
\"
:0}"
;
QEventLoop
evt
;
_api_evt
.
exec
();
connect
(
this
,
SIGNAL
(
finished
(
QJsonObject
)),
&
evt
,
SLOT
(
quit
()));
connect
(
this
,
SIGNAL
(
apiError
()),
&
evt
,
SLOT
(
quit
()));
evt
.
exec
();
if
(
!
_api_abort
)
{
if
(
!
_api_abort
)
{
_docked_response
=
QJsonObject
();
_docked_response
=
QJsonObject
();
...
@@ -277,10 +276,6 @@ QByteArray FMPePayPrivate::DockPayRespond()
...
@@ -277,10 +276,6 @@ QByteArray FMPePayPrivate::DockPayRespond()
json
=
QJsonDocument
(
_docked_response
).
toJson
();
json
=
QJsonDocument
(
_docked_response
).
toJson
();
}
}
if
(
_is_api
)
{
Uninit
();
}
return
json
;
return
json
;
}
}
...
@@ -294,10 +289,7 @@ void FMPePayPrivate::DockRefundRequest(const QByteArray &json)
...
@@ -294,10 +289,7 @@ void FMPePayPrivate::DockRefundRequest(const QByteArray &json)
QByteArray
FMPePayPrivate
::
DockRefundRespond
()
QByteArray
FMPePayPrivate
::
DockRefundRespond
()
{
{
QByteArray
json
=
"{
\"
statusCode
\"
:106,
\"
msg
\"
:
\"\347\252\227\345\217\243\345\267\262\345\205\263\351\227\255\357\274\214\344\272\244\346\230\223\345\217\226\346\266\210\"
,
\"
prompt
\"
:0}"
;
QByteArray
json
=
"{
\"
statusCode
\"
:106,
\"
msg
\"
:
\"\347\252\227\345\217\243\345\267\262\345\205\263\351\227\255\357\274\214\344\272\244\346\230\223\345\217\226\346\266\210\"
,
\"
prompt
\"
:0}"
;
QEventLoop
evt
;
_api_evt
.
exec
();
connect
(
this
,
SIGNAL
(
finished
(
QJsonObject
)),
&
evt
,
SLOT
(
quit
()));
connect
(
this
,
SIGNAL
(
apiError
()),
&
evt
,
SLOT
(
quit
()));
evt
.
exec
();
//!
//!
if
(
!
_api_abort
)
{
if
(
!
_api_abort
)
{
...
@@ -313,20 +305,27 @@ QByteArray FMPePayPrivate::DockRefundRespond()
...
@@ -313,20 +305,27 @@ QByteArray FMPePayPrivate::DockRefundRespond()
json
=
QJsonDocument
(
_docked_response
).
toJson
();
json
=
QJsonDocument
(
_docked_response
).
toJson
();
}
}
if
(
_is_api
)
{
return
json
;
Uninit
();
}
void
FMPePayPrivate
::
OnFinish
()
{
if
(
_origin_response
.
isEmpty
())
{
_api_abort
=
true
;
}
}
return
json
;
emit
confirmClicked
();
_api_evt
.
quit
();
}
}
void
FMPePayPrivate
::
ControlPayJson
(
QString
sum
,
QString
code
)
void
FMPePayPrivate
::
ControlPayJson
(
QString
sum
,
QString
code
)
{
{
QtConcurrent
::
run
(
[
&
,
sum
,
code
,
this
]()
{
Q_Q
(
FMPePay
);
Q_Q
(
FMPePay
);
_origin_response
=
QJsonObject
();
_origin_response
=
QJsonObject
();
QtConcurrent
::
run
(
[
q
,
sum
,
code
,
this
]()
{
if
(
_reverse_flag
)
if
(
_reverse_flag
)
{
{
emit
error
(
QString
::
fromLocal8Bit
(
"网络连接异常(冲正...)"
));
emit
error
(
QString
::
fromLocal8Bit
(
"网络连接异常(冲正...)"
));
...
@@ -466,13 +465,54 @@ bool FMPePayPrivate::HttpPost(QJsonObject& outjson, QJsonObject json, QString &e
...
@@ -466,13 +465,54 @@ bool FMPePayPrivate::HttpPost(QJsonObject& outjson, QJsonObject json, QString &e
FMP_INFO
()
<<
outjson
;
FMP_INFO
()
<<
outjson
;
if
(
outjson
[
FMP_RPAY_PAY_RETURN_STATUSCODE
].
toInt
()
==
100
)
int
statusCode
=
outjson
[
FMP_RPAY_PAY_RETURN_STATUSCODE
].
toInt
();
int
reqType
=
json
[
FMP_EPAY_REQUESTTYPE
].
toInt
();
if
(
statusCode
==
100
)
return
true
;
return
true
;
if
(
outjson
.
contains
(
FMP_RPAY_PAY_RETURN_MSG
))
if
(
statusCode
==
204
&&
reqType
==
72
)
{
QJsonObject
queryJson
=
json
;
queryJson
[
FMP_EPAY_REQUESTTYPE
]
=
52
;
queryJson
[
FMP_EPAY_VER
]
=
3
;
FMP_INFO
()
<<
"Query: "
<<
json
[
FMP_EPAY_TRANSID
].
toString
();
QJsonObject
queryOutJson
;
if
(
!
HttpPost
(
queryOutJson
,
queryJson
,
error
,
timeout
))
{
QJsonObject
revokeJson
=
json
;
revokeJson
[
FMP_EPAY_REQUESTTYPE
]
=
3
;
QJsonObject
revokeOutJson
;
HttpPost
(
revokeOutJson
,
revokeJson
,
error
,
timeout
);
error
=
QString
::
fromLocal8Bit
(
"支付失败,请重试
\r\n
如已扣款会自动退还"
);
return
false
;
}
else
{
outjson
=
queryOutJson
;
}
}
if
(
outjson
.
contains
(
FMP_RPAY_PAY_RETURN_MSG
))
{
error
=
outjson
[
FMP_RPAY_PAY_RETURN_MSG
].
toString
()
+
QString
(
"[%1]"
).
arg
(
outjson
[
FMP_RPAY_PAY_RETURN_STATUSCODE
].
toInt
());
error
=
outjson
[
FMP_RPAY_PAY_RETURN_MSG
].
toString
()
+
QString
(
"[%1]"
).
arg
(
outjson
[
FMP_RPAY_PAY_RETURN_STATUSCODE
].
toInt
());
else
}
else
{
error
=
QString
::
fromLocal8Bit
(
"未定义错误"
)
+
QString
(
"[%1]"
).
arg
(
outjson
[
FMP_RPAY_PAY_RETURN_STATUSCODE
].
toInt
());
QString
errorDesc
;
switch
(
statusCode
)
{
case
21
:
errorDesc
=
QString
::
fromLocal8Bit
(
"参数错误"
);
break
;
case
41
:
errorDesc
=
QString
::
fromLocal8Bit
(
"交易不存在"
);
break
;
case
203
:
errorDesc
=
QString
::
fromLocal8Bit
(
"余额不足"
);
break
;
case
205
:
errorDesc
=
QString
::
fromLocal8Bit
(
"支付码错误"
);
break
;
default
:
errorDesc
=
QString
::
fromLocal8Bit
(
"未定义错误"
);
break
;
}
error
=
errorDesc
+
QString
(
"[%1]"
).
arg
(
outjson
[
FMP_RPAY_PAY_RETURN_STATUSCODE
].
toInt
());
}
return
false
;
return
false
;
}
}
...
@@ -515,11 +555,12 @@ void FMPePayPrivate::GetMode()
...
@@ -515,11 +555,12 @@ void FMPePayPrivate::GetMode()
void
FMPePayPrivate
::
ControlRefundJson
(
const
QJsonObject
&
trans
)
void
FMPePayPrivate
::
ControlRefundJson
(
const
QJsonObject
&
trans
)
{
{
QtConcurrent
::
run
(
[
&
,
trans
,
this
]()
{
Q_Q
(
FMPePay
);
Q_Q
(
FMPePay
);
_origin_response
=
QJsonObject
();
_origin_response
=
QJsonObject
();
QtConcurrent
::
run
(
[
q
,
trans
,
this
]()
{
QStringList
keylist
;
QStringList
keylist
;
QSqlQuery
query
;
QSqlQuery
query
;
keylist
.
append
(
SQL_KEY_EBCODE
);
keylist
.
append
(
SQL_KEY_EBCODE
);
...
@@ -617,6 +658,8 @@ void FMPePayPrivate::ControlRefundJson(const QJsonObject &trans)
...
@@ -617,6 +658,8 @@ void FMPePayPrivate::ControlRefundJson(const QJsonObject &trans)
if
(
!
dock_success
)
{
if
(
!
dock_success
)
{
emit
apiError
();
emit
apiError
();
}
}
disconnect
(
this
,
&
FMPePayPrivate
::
finished
,
this
,
&
FMPePayPrivate
::
confirmClicked
);
});
});
}
}
...
...
fmp_epay_p.h
View file @
25d5b650
...
@@ -59,12 +59,17 @@ private:
...
@@ -59,12 +59,17 @@ private:
void
SetBasicInfo
(
QVariantHash
hash
);
void
SetBasicInfo
(
QVariantHash
hash
);
void
clearorder
();
void
clearorder
();
signals
:
signals
:
void
confirmClicked
();
void
apiError
();
void
apiError
();
void
error
(
QString
errormsg
);
void
error
(
QString
errormsg
);
void
finished
(
QJsonObject
json
);
void
finished
(
QJsonObject
json
);
public
slots
:
void
OnFinish
();
protected
slots
:
protected
slots
:
void
witedata
();
void
witedata
();
public
:
public
:
...
@@ -80,7 +85,7 @@ private:
...
@@ -80,7 +85,7 @@ private:
QJsonObject
_docked_request
;
QJsonObject
_docked_request
;
QJsonObject
_origin_response
;
QJsonObject
_origin_response
;
QJsonObject
_docked_response
;
QJsonObject
_docked_response
;
QEventLoop
_api_evt
;
bool
_is_api
;
bool
_is_api
;
bool
_api_abort
;
bool
_api_abort
;
bool
_reverse_flag
;
bool
_reverse_flag
;
...
...
fmp_epayview_dialog.cpp
View file @
25d5b650
...
@@ -92,6 +92,12 @@ FMPPayDialog::FMPPayDialog(FMPePayPrivate *control, QVariantHash basicinfo, QWid
...
@@ -92,6 +92,12 @@ FMPPayDialog::FMPPayDialog(FMPePayPrivate *control, QVariantHash basicinfo, QWid
connect
(
_control
,
&
FMPePayPrivate
::
error
,
this
,
&
FMPPayDialog
::
showErrorMsg
);
connect
(
_control
,
&
FMPePayPrivate
::
error
,
this
,
&
FMPPayDialog
::
showErrorMsg
);
connect
(
_control
,
&
FMPePayPrivate
::
finished
,
this
,
&
FMPPayDialog
::
showSuccessMsg
);
connect
(
_control
,
&
FMPePayPrivate
::
finished
,
this
,
&
FMPPayDialog
::
showSuccessMsg
);
connect
(
ui
->
btn_close
,
&
QPushButton
::
clicked
,
_control
,
&
FMPePayPrivate
::
OnFinish
,
Qt
::
QueuedConnection
);
connect
(
ui
->
btn_success_confirm
,
&
QPushButton
::
clicked
,
_control
,
&
FMPePayPrivate
::
OnFinish
,
Qt
::
QueuedConnection
);
connect
(
this
,
&
FMPPayDialog
::
accepted
,
_control
,
&
FMPePayPrivate
::
OnFinish
,
Qt
::
QueuedConnection
);
connect
(
this
,
&
FMPPayDialog
::
rejected
,
_control
,
&
FMPePayPrivate
::
OnFinish
,
Qt
::
QueuedConnection
);
ui
->
lineedit_num
->
setFocus
();
ui
->
lineedit_num
->
setFocus
();
_current_LineEdit
=
ui
->
lineedit_num
;
_current_LineEdit
=
ui
->
lineedit_num
;
...
@@ -314,7 +320,7 @@ void FMPPayDialog::onSelectionChanged(QModelIndex idx)
...
@@ -314,7 +320,7 @@ void FMPPayDialog::onSelectionChanged(QModelIndex idx)
void
FMPPayDialog
::
keyPressEvent
(
QKeyEvent
*
e
)
void
FMPPayDialog
::
keyPressEvent
(
QKeyEvent
*
e
)
{
{
if
(
e
->
key
()
==
Qt
::
Key_Escape
)
{
if
(
e
->
key
()
==
Qt
::
Key_Escape
)
{
on_btn_close_clicked
();
emit
ui
->
btn_close
->
click
();
}
}
}
}
...
@@ -348,6 +354,10 @@ void FMPPayDialog::setPaySuccessView(QJsonObject json)
...
@@ -348,6 +354,10 @@ void FMPPayDialog::setPaySuccessView(QJsonObject json)
ui
->
lb6
->
show
();
ui
->
lb6
->
show
();
ui
->
tlb6
->
show
();
ui
->
tlb6
->
show
();
ui
->
label_tip
->
setVisible
(
false
);
ui
->
verticalLayout
->
removeWidget
(
ui
->
label_tip
);
ui
->
wdg_right_bg
->
setMinimumHeight
(
450
);
ui
->
suc2
->
setText
(
QString
::
fromLocal8Bit
(
"支付成功"
));
ui
->
suc2
->
setText
(
QString
::
fromLocal8Bit
(
"支付成功"
));
ui
->
tlb1
->
setText
(
QString
::
fromLocal8Bit
(
"支 付 渠 道"
));
ui
->
tlb1
->
setText
(
QString
::
fromLocal8Bit
(
"支 付 渠 道"
));
ui
->
lb1
->
setText
(
json
[
FMP_RPAY_PAY_RETURN_PAYID
].
toString
());
ui
->
lb1
->
setText
(
json
[
FMP_RPAY_PAY_RETURN_PAYID
].
toString
());
...
@@ -365,10 +375,16 @@ void FMPPayDialog::setPaySuccessView(QJsonObject json)
...
@@ -365,10 +375,16 @@ void FMPPayDialog::setPaySuccessView(QJsonObject json)
_success_flag
=
true
;
_success_flag
=
true
;
PlayAnimation
(
findChild
<
QWidget
*>
(
_curt_btn
->
property
(
"pageName"
).
toString
()),
ui
->
wdg_success_main
,
RightToLeft
);
PlayAnimation
(
findChild
<
QWidget
*>
(
_curt_btn
->
property
(
"pageName"
).
toString
()),
ui
->
wdg_success_main
,
RightToLeft
);
ui
->
btn_success_confirm
->
setFocus
();
}
}
void
FMPPayDialog
::
setRefundSuccessView
(
QJsonObject
json
)
void
FMPPayDialog
::
setRefundSuccessView
(
QJsonObject
json
)
{
{
ui
->
label_tip
->
setVisible
(
false
);
ui
->
verticalLayout
->
removeWidget
(
ui
->
label_tip
);
ui
->
wdg_right_bg
->
setMinimumHeight
(
450
);
ui
->
suc2
->
setText
(
QString
::
fromLocal8Bit
(
"退款成功"
));
ui
->
suc2
->
setText
(
QString
::
fromLocal8Bit
(
"退款成功"
));
ui
->
tlb1
->
setText
(
QString
::
fromLocal8Bit
(
"支 付 渠 道"
));
ui
->
tlb1
->
setText
(
QString
::
fromLocal8Bit
(
"支 付 渠 道"
));
ui
->
lb1
->
setText
(
json
[
SQL_KEY_PAYID
].
toString
());
ui
->
lb1
->
setText
(
json
[
SQL_KEY_PAYID
].
toString
());
...
@@ -377,7 +393,7 @@ void FMPPayDialog::setRefundSuccessView(QJsonObject json)
...
@@ -377,7 +393,7 @@ void FMPPayDialog::setRefundSuccessView(QJsonObject json)
ui
->
tlb3
->
setText
(
QString
::
fromLocal8Bit
(
"支付交易号"
));
ui
->
tlb3
->
setText
(
QString
::
fromLocal8Bit
(
"支付交易号"
));
ui
->
lb3
->
setText
(
json
[
SQL_KEY_PAYTRANSID
].
toString
());
ui
->
lb3
->
setText
(
json
[
SQL_KEY_PAYTRANSID
].
toString
());
ui
->
tlb4
->
setText
(
QString
::
fromLocal8Bit
(
"退 款 金 额"
));
ui
->
tlb4
->
setText
(
QString
::
fromLocal8Bit
(
"退 款 金 额"
));
ui
->
lb4
->
setText
(
json
[
SQL_KEY_TOTALAMOUNT
].
toString
(
));
ui
->
lb4
->
setText
(
QString
::
number
(
json
[
SQL_KEY_TOTALAMOUNT
].
toDouble
()
/
100
));
ui
->
lb5
->
hide
();
ui
->
lb5
->
hide
();
ui
->
tlb5
->
hide
();
ui
->
tlb5
->
hide
();
ui
->
lb6
->
hide
();
ui
->
lb6
->
hide
();
...
@@ -386,6 +402,8 @@ void FMPPayDialog::setRefundSuccessView(QJsonObject json)
...
@@ -386,6 +402,8 @@ void FMPPayDialog::setRefundSuccessView(QJsonObject json)
_success_flag
=
true
;
_success_flag
=
true
;
PlayAnimation
(
findChild
<
QWidget
*>
(
_curt_btn
->
property
(
"pageName"
).
toString
()),
ui
->
wdg_success_main
,
RightToLeft
);
PlayAnimation
(
findChild
<
QWidget
*>
(
_curt_btn
->
property
(
"pageName"
).
toString
()),
ui
->
wdg_success_main
,
RightToLeft
);
ui
->
btn_success_confirm
->
setFocus
();
}
}
void
FMPPayDialog
::
setPayView
()
void
FMPPayDialog
::
setPayView
()
...
@@ -604,7 +622,7 @@ void FMPPayDialog::onBtnConfirmClicked()
...
@@ -604,7 +622,7 @@ void FMPPayDialog::onBtnConfirmClicked()
{
{
_wait
->
SetContent
(
FMPPayWait
::
LOADING
,
QString
::
fromLocal8Bit
(
"退款中..."
));
_wait
->
SetContent
(
FMPPayWait
::
LOADING
,
QString
::
fromLocal8Bit
(
"退款中..."
));
QJsonObject
trans
;
QJsonObject
trans
;
trans
[
"refund_amount"
]
=
(
(
int
)
ui
->
lineedit_num_refund
->
text
().
toDouble
()
+
0.005
)
*
100
;
trans
[
"refund_amount"
]
=
(
int
)((
ui
->
lineedit_num_refund
->
text
().
toDouble
()
+
0.005
)
*
100
)
;
trans
[
"fm_id"
]
=
ui
->
lineedit_code_refund
->
text
();
trans
[
"fm_id"
]
=
ui
->
lineedit_code_refund
->
text
();
_control
->
ControlRefundJson
(
trans
);
_control
->
ControlRefundJson
(
trans
);
}
}
...
@@ -634,7 +652,6 @@ void FMPPayDialog::reject()
...
@@ -634,7 +652,6 @@ void FMPPayDialog::reject()
void
FMPPayDialog
::
on_btn_close_clicked
()
void
FMPPayDialog
::
on_btn_close_clicked
()
{
{
this
->
hide
();
this
->
hide
();
_control
->
Uninit
();
}
}
void
FMPPayDialog
::
onLineeditCodeGetFocus
()
void
FMPPayDialog
::
onLineeditCodeGetFocus
()
...
@@ -699,7 +716,7 @@ void FMPPayDialog::on_pushButton_2_clicked()
...
@@ -699,7 +716,7 @@ void FMPPayDialog::on_pushButton_2_clicked()
_wait
->
SetContent
(
FMPPayWait
::
LOADING
,
QString
::
fromLocal8Bit
(
"退款中..."
));
_wait
->
SetContent
(
FMPPayWait
::
LOADING
,
QString
::
fromLocal8Bit
(
"退款中..."
));
QJsonObject
trans
;
QJsonObject
trans
;
trans
[
"refund_amount"
]
=
(
(
int
)
model
->
data
(
idx
.
sibling
(
idx
.
row
(),
6
)).
toDouble
()
+
0.005
)
*
100
;
trans
[
"refund_amount"
]
=
(
int
)(
model
->
data
(
idx
.
sibling
(
idx
.
row
(),
6
)).
toDouble
()
+
0.005
)
*
100
;
trans
[
"fm_id"
]
=
model
->
data
(
idx
.
sibling
(
idx
.
row
(),
0
)).
toString
();
trans
[
"fm_id"
]
=
model
->
data
(
idx
.
sibling
(
idx
.
row
(),
0
)).
toString
();
_control
->
ControlRefundJson
(
trans
);
_control
->
ControlRefundJson
(
trans
);
...
...
fmp_epayview_dialog.ui
View file @
25d5b650
...
@@ -2017,6 +2017,18 @@ QPushButton:hover {
...
@@ -2017,6 +2017,18 @@ QPushButton:hover {
<height>
460
</height>
<height>
460
</height>
</rect>
</rect>
</property>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
628
</width>
<height>
460
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
628
</width>
<height>
460
</height>
</size>
</property>
<property
name=
"styleSheet"
>
<property
name=
"styleSheet"
>
<string
notr=
"true"
>
background-color: rgb(255, 255, 255);
</string>
<string
notr=
"true"
>
background-color: rgb(255, 255, 255);
</string>
</property>
</property>
...
@@ -2553,8 +2565,14 @@ font: 75 24px "微软雅黑";</string>
...
@@ -2553,8 +2565,14 @@ font: 75 24px "微软雅黑";</string>
</property>
</property>
<property
name=
"minimumSize"
>
<property
name=
"minimumSize"
>
<size>
<size>
<width>
0
</width>
<width>
371
</width>
<height>
0
</height>
<height>
58
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
371
</width>
<height>
58
</height>
</size>
</size>
</property>
</property>
<property
name=
"font"
>
<property
name=
"font"
>
...
@@ -2840,9 +2858,9 @@ QHeaderView::section {
...
@@ -2840,9 +2858,9 @@ QHeaderView::section {
</item>
</item>
</layout>
</layout>
</widget>
</widget>
<zorder>
wdg_success_main
</zorder>
<zorder>
wdg_refund_main
</zorder>
<zorder>
wdg_refund_main
</zorder>
<zorder>
wdg_query_main
</zorder>
<zorder>
wdg_query_main
</zorder>
<zorder>
wdg_success_main
</zorder>
<zorder>
wdg_pay_main
</zorder>
<zorder>
wdg_pay_main
</zorder>
</widget>
</widget>
</item>
</item>
...
...
fmp_epayview_wait.ui
View file @
25d5b650
...
@@ -140,21 +140,14 @@ background-color: rgb(148, 148, 148, 0);
...
@@ -140,21 +140,14 @@ background-color: rgb(148, 148, 148, 0);
<item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
<property
name=
"spacing"
>
<property
name=
"spacing"
>
<number>
0
</number>
<number>
1
0
</number>
</property>
</property>
<item>
<property
name=
"leftMargin"
>
<spacer
name=
"horizontalSpacer"
>
<number>
50
</number>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<property
name=
"rightMargin"
>
<size>
<number>
10
</number>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</property>
</spacer>
</item>
<item>
<item>
<widget
class=
"QLabel"
name=
"label_logo"
>
<widget
class=
"QLabel"
name=
"label_logo"
>
<property
name=
"minimumSize"
>
<property
name=
"minimumSize"
>
...
@@ -181,7 +174,7 @@ background-color: rgb(148, 148, 148, 0);
...
@@ -181,7 +174,7 @@ background-color: rgb(148, 148, 148, 0);
<widget
class=
"QLabel"
name=
"label_msg"
>
<widget
class=
"QLabel"
name=
"label_msg"
>
<property
name=
"minimumSize"
>
<property
name=
"minimumSize"
>
<size>
<size>
<width>
161
</width>
<width>
0
</width>
<height>
0
</height>
<height>
0
</height>
</size>
</size>
</property>
</property>
...
@@ -210,27 +203,14 @@ background-color: rgb(148, 148, 148, 0);
...
@@ -210,27 +203,14 @@ background-color: rgb(148, 148, 148, 0);
<property
name=
"text"
>
<property
name=
"text"
>
<string>
支付中...
</string>
<string>
支付中...
</string>
</property>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
</set>
</property>
<property
name=
"wordWrap"
>
<property
name=
"wordWrap"
>
<bool>
true
</bool>
<bool>
true
</bool>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item>
<spacer
name=
"horizontalSpacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Expanding
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
13
</width>
<height>
57
</height>
</size>
</property>
</spacer>
</item>
</layout>
</layout>
</item>
</item>
<item>
<item>
...
...
version.h
View file @
25d5b650
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#define VER_MINOR 1
#define VER_MINOR 1
#define VER_REVISION 0
#define VER_REVISION 0
#define VER_BUILD 1
6
#define VER_BUILD 1
7
//! Convert version numbers to string
//! Convert version numbers to string
#define _STR(S) #S
#define _STR(S) #S
...
...
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