Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FmTakeaway
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
shangshang.dai
FmTakeaway
Commits
079b0e08
Commit
079b0e08
authored
Jul 03, 2017
by
shangshang.dai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upd 1: 自提订单支持退款
parent
5f8d57bd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
9 deletions
+13
-9
fmTakeaway/Control/flowControl.cpp
+1
-1
fmTakeaway/Model/orderObject.cpp
+1
-0
fmTakeaway/Model/orderObject.h
+3
-0
fmTakeaway/mainForm.cpp
+8
-8
No files found.
fmTakeaway/Control/flowControl.cpp
View file @
079b0e08
...
...
@@ -198,7 +198,7 @@ bool FlowControl::_PullOrder()
}
}
if
(
oldStatus
!=
orderObject
->
status
&&
orderObject
->
order_type
!=
4
&&
orderObject
->
order_type
!=
3
)
if
(
oldStatus
!=
orderObject
->
status
)
{
emit
changeOrderStatus
(
orderObject
,
oldStatus
,
bRed
);
}
...
...
fmTakeaway/Model/orderObject.cpp
View file @
079b0e08
#include "orderObject.h"
#include "preDefine.h"
#include <QJsonArray>
#include <QPushButton>
void
OrderObject
::
FromJson
(
const
QJsonObject
&
json
)
{
...
...
fmTakeaway/Model/orderObject.h
View file @
079b0e08
...
...
@@ -3,6 +3,8 @@
#include "productObject.h"
class
QPushButton
;
class
OrderObject
:
public
BaseObject
{
Q_OBJECT
...
...
@@ -107,6 +109,7 @@ public:
QString
delivery_code
;
// 提货码
QString
meal_num
;
// 堂食桌号
QPushButton
*
curt_table_btn
;
//当前订单所在表对应的按钮
protected
:
...
...
fmTakeaway/mainForm.cpp
View file @
079b0e08
...
...
@@ -301,12 +301,11 @@ void MainForm::onChangeOrderStatus(OrderObject *orderObject, int oldStatus, bool
_SetTablesSortEnable
(
false
);
QTableWidget
*
table
;
QPushButton
*
tabBtn
;
if
(
orderObject
->
order_type
!=
3
&&
orderObject
->
order_type
!=
4
)
{
// 非首次收到的订单需要现在原先表中删除
if
(
oldStatus
!=
-
100
)
{
tabBtn
=
_GetTabBtnByOrderStatus
(
oldStatus
)
;
tabBtn
=
orderObject
->
curt_table_btn
;
table
=
findChild
<
QTableWidget
*>
(
tabBtn
->
property
(
"tableName"
).
toString
());
for
(
int
i
=
0
;
i
<
table
->
rowCount
();
i
++
)
{
...
...
@@ -319,21 +318,22 @@ void MainForm::onChangeOrderStatus(OrderObject *orderObject, int oldStatus, bool
}
}
}
}
// 将数据插入到表中
if
(
orderObject
->
order_type
==
3
)
if
(
orderObject
->
order_type
==
3
&&
orderObject
->
status
==
2
)
{
tabBtn
=
ui
->
mainBtnZTD
;
}
else
if
(
orderObject
->
order_type
==
4
)
}
else
if
(
orderObject
->
order_type
==
4
&&
orderObject
->
status
==
2
)
{
tabBtn
=
ui
->
mainBtnTSD
;
}
else
{
tabBtn
=
_GetTabBtnByOrderStatus
(
orderObject
->
status
);
}
orderObject
->
curt_table_btn
=
tabBtn
;
table
=
findChild
<
QTableWidget
*>
(
tabBtn
->
property
(
"tableName"
).
toString
());
table
->
insertRow
(
0
);
QTableWidgetItem
*
item0
=
new
QTableWidgetItem
(
QString
(
"%1#%2"
).
arg
(
orderObject
->
channelName
).
arg
(
orderObject
->
order_index
));
...
...
@@ -364,7 +364,7 @@ void MainForm::onChangeOrderStatus(OrderObject *orderObject, int oldStatus, bool
item5
->
setTextColor
(
QColor
(
"red"
));
}
if
(
orderObject
->
order_type
==
3
||
orderObject
->
order_type
==
4
)
if
(
(
orderObject
->
order_type
==
3
||
orderObject
->
order_type
==
4
)
&&
orderObject
->
status
==
2
)
{
QTableWidgetItem
*
item6
=
new
QTableWidgetItem
(
orderObject
->
delivery_code
);
item6
->
setTextAlignment
(
Qt
::
AlignCenter
);
...
...
@@ -403,7 +403,7 @@ void MainForm::onChangeOrderStatus(OrderObject *orderObject, int oldStatus, bool
emit
stopRemind
();
}
if
(
orderObject
->
order_type
==
4
||
orderObject
->
order_type
==
3
)
if
(
(
orderObject
->
order_type
==
3
||
orderObject
->
order_type
==
4
)
&&
orderObject
->
status
==
2
)
{
emit
startRemind
(
0
);
m_timerZT
.
start
(
20000
);
...
...
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