Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmtakeout
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
李定达
fmtakeout
Commits
305bc828
Commit
305bc828
authored
Sep 14, 2018
by
李定达
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.对接外卖接口;2.订单显示流程调整;
parent
c31d2ce8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
73 additions
and
11 deletions
+73
-11
takeout/base/Arithmetic/util.cpp
+1
-1
takeout/takeout.rc
+4
-4
takeout/view/detailForm.cpp
+42
-2
takeout/view/mainForm.cpp
+24
-2
takeout/view/mainForm.ui
+2
-2
No files found.
takeout/base/Arithmetic/util.cpp
View file @
305bc828
...
...
@@ -80,7 +80,7 @@ QString GetOperNameByStatus(int status, bool bRefuse)
{
return
QString
::
fromLocal8Bit
(
OPERATIONNAME_REFUNDORDER
);
}
return
QString
::
fromLocal8Bit
(
OPERATIONNAME_
SENDOUT
);
return
QString
::
fromLocal8Bit
(
OPERATIONNAME_
COMPLETE
);
break
;
case
4
:
if
(
bRefuse
)
...
...
takeout/takeout.rc
View file @
305bc828
...
...
@@ -4,8 +4,8 @@
#include <winver.h>
#endif
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,0,0,
0
PRODUCTVERSION 2,0,0,
0
FILEVERSION 2,0,0,
1
PRODUCTVERSION 2,0,0,
1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
...
...
@@ -22,12 +22,12 @@ VS_VERSION_INFO VERSIONINFO
BEGIN
VALUE "CompanyName", "ShangHai Freemud Co., Ltd."
VALUE "FileDescription", "FREEMUD Manager System"
VALUE "FileVersion", "2.0.0.
0
"
VALUE "FileVersion", "2.0.0.
1
"
VALUE "InternalName", "FREEMUD"
VALUE "LegalCopyright", "Copyright (C)2017-2020"
VALUE "OriginalFilename", "fmTakeout.exe"
VALUE "ProductName", "fmTakeout"
VALUE "ProductVersion", "2.0.0.
0
"
VALUE "ProductVersion", "2.0.0.
1
"
END
END
BLOCK "VarFileInfo"
...
...
takeout/view/detailForm.cpp
View file @
305bc828
...
...
@@ -11,6 +11,7 @@
#include "event/fmapplication.h"
#include "event/posevent.h"
#include "QsLog.h"
DetailForm
::
DetailForm
(
QWidget
*
parent
)
:
QDialog
(
parent
),
...
...
@@ -57,11 +58,11 @@ void DetailForm::InitData(OrderObject *orderObject)
// ui->detailLab6->setText(orderObject->courier_name.isEmpty() ? QString::fromLocal8Bit("暂未指定") : QString::fromLocal8Bit("[姓名]%1 [电话]%2")
// .arg(orderObject->courier_name, orderObject->courier_phone));
if
(
orderObject
->
disList
.
size
()
>
0
)
ui
->
detailLab6
->
setText
(
QString
::
number
((
-
orderObject
->
disList
[
0
]
->
pric
e
)
/
100.0
,
'f'
,
2
).
append
(
QString
::
fromLocal8Bit
(
"(元)"
)));
ui
->
detailLab6
->
setText
(
QString
::
number
((
orderObject
->
discount_fe
e
)
/
100.0
,
'f'
,
2
).
append
(
QString
::
fromLocal8Bit
(
"(元)"
)));
else
ui
->
detailLab6
->
setText
(
"0"
);
ui
->
detailLab7
->
setText
(
!
orderObject
->
pay_type
.
compare
(
"在线支付"
)
?
"0"
:
Penny2Dollar
(
orderObject
->
shop
_fee
));
ui
->
detailLab7
->
setText
(
!
orderObject
->
pay_type
.
compare
(
"在线支付"
)
?
"0"
:
Penny2Dollar
(
orderObject
->
user
_fee
));
ui
->
detailLab8
->
setText
(
orderObject
->
has_invoiced
?
QString
::
fromLocal8Bit
(
"发票抬头:%1"
).
arg
(
orderObject
->
invoice_title
)
:
QString
::
fromLocal8Bit
(
"不需要发票"
));
ui
->
detailLab8_3
->
setText
(
QString
::
fromLocal8Bit
(
"%1"
).
arg
(
QString
::
number
(
orderObject
->
package_fee
/
100.0
,
'f'
,
2
).
append
(
QString
::
fromLocal8Bit
(
"(元)"
))));
...
...
@@ -113,6 +114,12 @@ void DetailForm::InitData(OrderObject *orderObject)
ui
->
detailBtn2
->
setText
(
GetOperNameByStatus
(
orderObject
->
status
,
true
));
ui
->
detailBtn2
->
setProperty
(
"operation"
,
GetOperByStatus
(
orderObject
->
status
,
true
));
ui
->
detailBtn2
->
setProperty
(
"orderId"
,
orderObject
->
order_id
);
if
(
ui
->
detailBtn2
->
text
().
compare
(
QString
::
fromLocal8Bit
(
OPERATIONNAME_REFUNDORDER
))
==
0
)
ui
->
detailBtn2
->
hide
();
else
ui
->
detailBtn2
->
show
();
if
(
/*orderObject->status != 1 && orderObject->status != 20&& orderObject->status != 2&&*/
orderObject
->
status
!=
4
)
{
ui
->
detailBtn2
->
hide
();
...
...
@@ -121,9 +128,32 @@ void DetailForm::InitData(OrderObject *orderObject)
// {
// ui->detailBtn0->hide();
// }
// if(ui->detailBtn3->text().compare(QString::fromLocal8Bit(OPERATIONNAME_MAKEOVER)) == 0 &&
// (orderObject->order_type == 1 || orderObject->order_type == 2))
// {
// ui->detailBtn3->hide();
// }
// else
// ui->detailBtn3->show();
ui
->
detailBtn3
->
setText
(
GetOperNameByStatus
(
orderObject
->
status
));
ui
->
detailBtn3
->
setProperty
(
"operation"
,
GetOperByStatus
(
orderObject
->
status
));
ui
->
detailBtn3
->
setProperty
(
"orderId"
,
orderObject
->
order_id
);
ui
->
detailBtn3
->
setProperty
(
"ordertype"
,
orderObject
->
order_type
);
if
((
orderObject
->
order_type
==
1
)
||
(
orderObject
->
order_type
==
2
)
&&
ui
->
detailBtn3
->
text
().
compare
(
QString
::
fromLocal8Bit
(
OPERATIONNAME_MAKEOVER
))
==
0
&&
orderObject
->
status
==
2
)
{
ui
->
detailBtn3
->
setText
(
QString
::
fromLocal8Bit
(
OPERATIONNAME_SENDOUT
));
ui
->
detailBtn3
->
setProperty
(
"operation"
,
OPERATION_SENDOUT
);
}
if
(
orderObject
->
status
==
5
||
orderObject
->
status
==
4
)
{
ui
->
detailBtn3
->
setText
(
QString
::
fromLocal8Bit
(
OPERATIONNAME_COMPLETE
));
ui
->
detailBtn3
->
setProperty
(
"operation"
,
OPERATION_COMPLETE
);
}
if
(
!
GetOperByStatus
(
orderObject
->
status
).
compare
(
"NULL"
))
{
...
...
@@ -148,6 +178,16 @@ void DetailForm::onOperaBtnClicked()
{
hide
();
QPushButton
*
pBtn
=
(
QPushButton
*
)
sender
();
// if((pBtn->property("ordertype").toInt() == 1 || pBtn->property("ordertype").toInt() == 2) &&
// pBtn->property("operation").toString().compare(OPERATION_MAKEOVER, Qt::CaseInsensitive) == 0)
// {
// QLOG_DEBUG() << "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&" << "operation : " << pBtn->property("operation").toString() << "; ordertype : " << pBtn->property("ordertype").toInt();
// return ;
// }
//QLOG_INFO() << "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&" << "operation : " << pBtn->property("operation").toString() << "; ordertype : " << pBtn->property("ordertype").toInt();
if
(
m_rejectForm
==
NULL
){
m_rejectForm
=
new
RejectForm
(
this
);}
// if(pBtn->text()=="拒单")
...
...
takeout/view/mainForm.cpp
View file @
305bc828
...
...
@@ -336,6 +336,16 @@ void MainForm::onMainProcBtnClicked()
// }
// else
// emit processOrder(pBtn->property("operation").toString(), pBtn->property("orderId").toString(), DeliverObject());
// if((pBtn->property("ordertype").toInt() == 1 || pBtn->property("ordertype").toInt() == 2) &&
// pBtn->property("operation").toString().compare(OPERATION_MAKEOVER, Qt::CaseInsensitive) == 0)
// {
// QLOG_DEBUG() << "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&" << "operation : " << pBtn->property("operation").toString() << "; ordertype : " << pBtn->property("ordertype").toInt();
// return ;
// }
//QLOG_INFO() << "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&" << "operation : " << pBtn->property("operation").toString() << "; ordertype : " << pBtn->property("ordertype").toInt();
QVariantMap
value
;
value
.
insert
(
EVENT_KEY_ORDERID
,
pBtn
->
property
(
"orderId"
).
toString
());
...
...
@@ -619,8 +629,20 @@ void MainForm::onChangeOrderStatus(OrderObject *orderObject, int oldStatus)
pBtn
->
setFocusPolicy
(
Qt
::
NoFocus
);
pBtn
->
setObjectName
(
"mainProcBtn"
);
pBtn
->
setProperty
(
"orderId"
,
orderObject
->
order_id
);
pBtn
->
setProperty
(
"operation"
,
table
->
property
(
"operation"
).
toString
());
pBtn
->
setText
(
table
->
property
(
"operationName"
).
toString
());
pBtn
->
setProperty
(
"ordertype"
,
orderObject
->
order_type
);
if
(
table
->
property
(
"operation"
).
toString
().
compare
(
OPERATION_MAKEOVER
,
Qt
::
CaseInsensitive
)
==
0
&&
(
orderObject
->
order_type
==
1
||
orderObject
->
order_type
==
2
))
{
pBtn
->
setProperty
(
"operation"
,
OPERATION_SENDOUT
);
pBtn
->
setText
(
QString
::
fromLocal8Bit
(
OPERATIONNAME_SENDOUT
));
}
else
{
pBtn
->
setProperty
(
"operation"
,
table
->
property
(
"operation"
).
toString
());
pBtn
->
setText
(
table
->
property
(
"operationName"
).
toString
());
}
hLayout
->
addWidget
(
pBtn
);
hLayout
->
setMargin
(
0
);
pWdg
->
setLayout
(
hLayout
);
...
...
takeout/view/mainForm.ui
View file @
305bc828
...
...
@@ -764,10 +764,10 @@
<bool>
false
</bool>
</property>
<property
name=
"operationName"
stdset=
"0"
>
<string>
送出
</string>
<string>
完成
</string>
</property>
<property
name=
"operation"
stdset=
"0"
>
<string>
sendOut
</string>
<string>
complete
</string>
</property>
<attribute
name=
"horizontalHeaderCascadingSectionResizes"
>
<bool>
false
</bool>
...
...
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