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
b23a661a
Commit
b23a661a
authored
Jan 09, 2019
by
xiaoqing.gu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新订单界面优化
parent
f3cf8eae
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
450 additions
and
110 deletions
+450
-110
takeout/view/newdetailform.cpp
+139
-45
takeout/view/newdetailform.h
+10
-1
takeout/view/newdetailform.ui
+301
-64
No files found.
takeout/view/newdetailform.cpp
View file @
b23a661a
...
@@ -14,8 +14,7 @@ NewDetailForm::NewDetailForm(QWidget *parent) :
...
@@ -14,8 +14,7 @@ NewDetailForm::NewDetailForm(QWidget *parent) :
ui
(
new
Ui
::
NewDetailForm
)
ui
(
new
Ui
::
NewDetailForm
)
{
{
ui
->
setupUi
(
this
);
ui
->
setupUi
(
this
);
ui
->
refuseBtn
->
hide
();
ui
->
detailBtn0
->
hide
();
ui
->
reverseBtn
->
hide
();
m_rejectForm
=
NULL
;
m_rejectForm
=
NULL
;
_Init
();
_Init
();
}
}
...
@@ -33,8 +32,10 @@ void NewDetailForm::InitData(OrderObject *orderObject, bool flag)
...
@@ -33,8 +32,10 @@ void NewDetailForm::InitData(OrderObject *orderObject, bool flag)
// 恢复界面
// 恢复界面
ui
->
dishTableWidget
->
clearContents
();
ui
->
dishTableWidget
->
clearContents
();
ui
->
dishTableWidget
->
setRowCount
(
0
);
ui
->
dishTableWidget
->
setRowCount
(
0
);
// ui->detailBtn2->show();
// ui->sumTableWidget->clearContents();
// ui->detailBtn3->show();
// ui->sumTableWidget->setRowCount(0);
ui
->
detailBtn2
->
show
();
ui
->
detailBtn3
->
show
();
//ui->detailBtn1->hide();
//ui->detailBtn1->hide();
//"<h2><i>Hello</i><font color=red>Qt!</font></h2>"
//"<h2><i>Hello</i><font color=red>Qt!</font></h2>"
...
@@ -46,14 +47,14 @@ void NewDetailForm::InitData(OrderObject *orderObject, bool flag)
...
@@ -46,14 +47,14 @@ void NewDetailForm::InitData(OrderObject *orderObject, bool flag)
ui
->
customerInfoLb_dec
->
setText
(
QString
::
fromLocal8Bit
(
"【%1】【<font color=red>%2</font>】"
).
arg
(
orderObject
->
customer
,
ui
->
customerInfoLb_dec
->
setText
(
QString
::
fromLocal8Bit
(
"【%1】【<font color=red>%2</font>】"
).
arg
(
orderObject
->
customer
,
orderObject
->
phone
));
orderObject
->
phone
));
ui
->
addressLb_dec
->
setText
(
QString
::
fromLocal8Bit
(
"【%1】【%2】"
).
arg
(
orderObject
->
address
,
orderObject
->
address
));
ui
->
addressLb_dec
->
setText
(
QString
::
fromLocal8Bit
(
"【%1】【%2】"
).
arg
(
orderObject
->
address
,
orderObject
->
address
));
ui
->
deliveryInfoLb_dec
->
setText
(
QString
::
fromLocal8Bit
(
"【%1】【%2】"
).
arg
(
orderObject
->
delivery_party
,
orderObject
->
delivery_time
));
ui
->
deliveryInfoLb_dec
->
setText
(
QString
::
fromLocal8Bit
(
"【%1】【%2】"
).
arg
(
orderObject
->
delivery_party
,
QString
::
number
(
orderObject
->
delivery_time
)
));
QList
<
DiscountObject
*>
list
=
orderObject
->
disList
;
QList
<
DiscountObject
*>
list
=
orderObject
->
disList
;
QString
disStr
;
QString
disStr
;
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++
)
{
disStr
+=
"【"
;
disStr
+=
QString
::
fromLocal8Bit
(
"【"
)
;
disStr
+=
list
.
at
(
i
)
->
name
;
disStr
+=
list
.
at
(
i
)
->
name
;
disStr
+=
"】"
;
disStr
+=
QString
::
fromLocal8Bit
(
"】"
)
;
}
}
ui
->
promotionInfoLb_dec
->
setText
(
QString
(
disStr
));
ui
->
promotionInfoLb_dec
->
setText
(
QString
(
disStr
));
...
@@ -62,7 +63,7 @@ void NewDetailForm::InitData(OrderObject *orderObject, bool flag)
...
@@ -62,7 +63,7 @@ void NewDetailForm::InitData(OrderObject *orderObject, bool flag)
if
(
orderObject
->
has_invoiced
)
{
if
(
orderObject
->
has_invoiced
)
{
checkStr
=
QString
::
fromLocal8Bit
(
"【%1】"
).
arg
(
orderObject
->
invoice_title
);
checkStr
=
QString
::
fromLocal8Bit
(
"【%1】"
).
arg
(
orderObject
->
invoice_title
);
}
else
{
}
else
{
checkStr
=
QString
::
fromLocal8Bit
(
"
不需要发票
"
);
checkStr
=
QString
::
fromLocal8Bit
(
"
【不需要发票】
"
);
}
}
ui
->
checkInfoLb_dec
->
setText
(
QString
(
checkStr
));
ui
->
checkInfoLb_dec
->
setText
(
QString
(
checkStr
));
...
@@ -126,24 +127,39 @@ void NewDetailForm::InitData(OrderObject *orderObject, bool flag)
...
@@ -126,24 +127,39 @@ void NewDetailForm::InitData(OrderObject *orderObject, bool flag)
ui
->
dishTableWidget
->
setItem
(
i
,
0
,
new
QTableWidgetItem
(
name
));
// 商品名
ui
->
dishTableWidget
->
setItem
(
i
,
0
,
new
QTableWidgetItem
(
name
));
// 商品名
ui
->
dishTableWidget
->
item
(
i
,
0
)
->
setTextAlignment
(
Qt
::
AlignCenter
);
ui
->
dishTableWidget
->
item
(
i
,
0
)
->
setTextAlignment
(
Qt
::
AlignLeft
);
ui
->
dishTableWidget
->
setItem
(
i
,
1
,
new
QTableWidgetItem
(
QString
::
number
(
orderObject
->
proList
.
at
(
i
)
->
price
/
100.0
)));
// 价格
ui
->
dishTableWidget
->
setItem
(
i
,
2
,
new
QTableWidgetItem
(
QString
::
number
(
orderObject
->
proList
.
at
(
i
)
->
price
/
100.0
)));
// 价格
ui
->
dishTableWidget
->
item
(
i
,
1
)
->
setTextAlignment
(
Qt
::
AlignCenter
);
ui
->
dishTableWidget
->
setItem
(
i
,
2
,
new
QTableWidgetItem
(
QString
::
number
(
orderObject
->
proList
.
at
(
i
)
->
product_amount
)));
// 数量
ui
->
dishTableWidget
->
item
(
i
,
2
)
->
setTextAlignment
(
Qt
::
AlignCenter
);
ui
->
dishTableWidget
->
item
(
i
,
2
)
->
setTextAlignment
(
Qt
::
AlignCenter
);
ui
->
dishTableWidget
->
setItem
(
i
,
1
,
new
QTableWidgetItem
(
QString
::
number
(
orderObject
->
proList
.
at
(
i
)
->
product_amount
)));
// 数量
ui
->
dishTableWidget
->
item
(
i
,
1
)
->
setTextAlignment
(
Qt
::
AlignCenter
);
}
}
//商品汇总信息显示在tablewidget中
//商品汇总信息显示在tablewidget中
ui
->
sumTableWidget
->
setItem
(
0
,
0
,
new
QTableWidgetItem
(
orderObject
->
total_amount
));
// ui->sumTableWidget->setItem(0, 0, new QTableWidgetItem(QString::number(orderObject->total_amount)));
ui
->
sumTableWidget
->
setItem
(
0
,
1
,
new
QTableWidgetItem
(
orderObject
->
total_fee
/
100.0
));
// ui->sumTableWidget->item(0, 0)->setTextAlignment(Qt::AlignCenter);
ui
->
sumTableWidget
->
setItem
(
1
,
1
,
new
QTableWidgetItem
(
orderObject
->
package_fee
/
100.0
));
// ui->sumTableWidget->setItem(0, 1, new QTableWidgetItem(QString::number(orderObject->total_fee/100.0)));
ui
->
sumTableWidget
->
setItem
(
2
,
1
,
new
QTableWidgetItem
(
orderObject
->
send_fee
/
100.0
));
// ui->sumTableWidget->item(0, 1)->setTextAlignment(Qt::AlignCenter);
// ui->sumTableWidget->setItem(1, 1, new QTableWidgetItem(QString::number(orderObject->package_fee/100.0)));
// ui->sumTableWidget->item(1, 1)->setTextAlignment(Qt::AlignCenter);
// ui->sumTableWidget->setItem(2, 1, new QTableWidgetItem(QString::number(orderObject->send_fee/100.0)));
// ui->sumTableWidget->item(2, 1)->setTextAlignment(Qt::AlignCenter);
// int dis_amount = -(orderObject->dis_platform_fee + orderObject->dis_shop_fee)/100.0;
// ui->sumTableWidget->setItem(3, 1, new QTableWidgetItem(QString::number(dis_amount)));
// ui->sumTableWidget->item(3, 1)->setTextAlignment(Qt::AlignCenter);
ui
->
product_numLb
->
setText
(
QString
::
number
(
orderObject
->
total_amount
));
ui
->
product_price_Lb
->
setText
(
QString
::
number
(
orderObject
->
total_fee
/
100.0
));
ui
->
package_price_Lb
->
setText
(
QString
::
number
(
orderObject
->
package_fee
/
100.0
));
ui
->
delivery_price_Lb
->
setText
(
QString
::
number
(
orderObject
->
send_fee
/
100.0
));
int
dis_amount
=
-
(
orderObject
->
dis_platform_fee
+
orderObject
->
dis_shop_fee
)
/
100.0
;
int
dis_amount
=
-
(
orderObject
->
dis_platform_fee
+
orderObject
->
dis_shop_fee
)
/
100.0
;
ui
->
promotion_price_Lb
->
setText
(
QString
::
number
(
dis_amount
));
ui
->
sumTableWidget
->
setItem
(
3
,
1
,
new
QTableWidgetItem
(
dis_amount
));
ui
->
sumLb_dec
->
setText
(
QString
::
number
(
orderObject
->
shop_fee
/
100.0
));
ui
->
sumLb_dec
->
setText
(
QString
::
fromLocal8Bit
(
"<font color=red>%1</font>"
).
arg
(
QString
::
number
(
orderObject
->
shop_fee
/
100.0
)
));
// QString records;
// QString records;
// foreach(QString record, orderObject->records)
// foreach(QString record, orderObject->records)
...
@@ -163,37 +179,55 @@ void NewDetailForm::InitData(OrderObject *orderObject, bool flag)
...
@@ -163,37 +179,55 @@ void NewDetailForm::InitData(OrderObject *orderObject, bool flag)
if
(
needbtn3
)
if
(
needbtn3
)
{
{
ui
->
confirmBtn
->
setProperty
(
"orderId"
,
orderObject
->
order_id
);
ui
->
detailBtn3
->
setProperty
(
"orderId"
,
orderObject
->
order_id
);
ui
->
confirmBtn
->
setText
(
btn3name
);
ui
->
detailBtn3
->
setText
(
btn3name
);
ui
->
confirmBtn
->
setProperty
(
"operation"
,
btn3opt
);;
ui
->
detailBtn3
->
setProperty
(
"operation"
,
btn3opt
);
if
(
btn3opt
==
OPERATIONNAME_COMPLETE
)
{
ui
->
detailBtn3
->
setStyleSheet
(
QString
::
fromLocal8Bit
(
"QPushButton{background-color:rgb(255, 43, 42);color:white;font: 9pt
\"
微软雅黑
\"
;}"
));
}
else
if
(
btn3opt
==
OPERATIONNAME_SENDOUT
)
{
ui
->
detailBtn3
->
setStyleSheet
(
QString
::
fromLocal8Bit
(
"QPushButton{background-color:rgb(0, 109, 171);color:white;font: 9pt
\"
微软雅黑
\"
;}"
));
}
else
if
(
btn3opt
==
OPERATIONNAME_GETDELIVERS
)
{
ui
->
detailBtn3
->
setStyleSheet
(
QString
::
fromLocal8Bit
(
"QPushButton{background-color:rgb(0, 169, 115);color:white;font: 9pt
\"
微软雅黑
\"
;}"
));
}
else
if
(
btn3opt
==
OPERATIONNAME_MAKEOVER
)
{
ui
->
detailBtn3
->
setStyleSheet
(
QString
::
fromLocal8Bit
(
"QPushButton{background-color:rgb(0, 109, 171);color:white;font: 9pt
\"
微软雅黑
\"
;}"
));
}
else
if
(
btn3opt
==
OPERATIONNAME_REFUNDORDER
)
{
ui
->
detailBtn3
->
setStyleSheet
(
QString
::
fromLocal8Bit
(
"QPushButton{background-color:rgb(255, 43, 42);color:white;font: 9pt
\"
微软雅黑
\"
;}"
));
}
}
}
else
else
{
{
ui
->
confirmBtn
->
hide
();
ui
->
detailBtn3
->
hide
();
}
}
if
(
needbtn2
)
if
(
needbtn2
)
{
{
ui
->
refuseBtn
->
setProperty
(
"orderId"
,
orderObject
->
order_id
);
ui
->
detailBtn2
->
setProperty
(
"orderId"
,
orderObject
->
order_id
);
ui
->
refuseBtn
->
setText
(
btn2name
);
ui
->
detailBtn2
->
setText
(
btn2name
);
ui
->
refuseBtn
->
setProperty
(
"operation"
,
btn2opt
);;
ui
->
detailBtn2
->
setProperty
(
"operation"
,
btn2opt
);
if
(
btn2opt
==
OPERATIONNAME_REFUNDNEWORDER
)
{
ui
->
detailBtn2
->
setStyleSheet
(
QString
::
fromLocal8Bit
(
"QPushButton{background-color:rgb(255, 43, 42);color:white;font: 9pt
\"
微软雅黑
\"
;}"
));
}
else
if
(
btn2opt
==
OPERATIONNAME_REFUSEREFUND
)
{
ui
->
detailBtn2
->
setStyleSheet
(
QString
::
fromLocal8Bit
(
"QPushButton{background-color:rgb(255, 43, 42);color:white;font: 9pt
\"
微软雅黑
\"
;}"
));
}
}
}
else
else
{
{
ui
->
refuseBtn
->
hide
();
ui
->
detailBtn2
->
hide
();
}
}
if
(
flag
)
if
(
flag
)
{
{
ui
->
printBtn
->
hide
();
ui
->
detailBtn1
->
hide
();
ui
->
confirmBtn
->
hide
();
ui
->
detailBtn3
->
hide
();
ui
->
refuseBtn
->
show
();
ui
->
detailBtn2
->
show
();
ui
->
refuseBtn
->
setProperty
(
"orderId"
,
orderObject
->
order_id
);
ui
->
detailBtn2
->
setProperty
(
"orderId"
,
orderObject
->
order_id
);
ui
->
refuseBtn
->
setText
(
QString
::
fromLocal8Bit
(
OPERATIONNAME_COMPLETE
));
ui
->
detailBtn2
->
setText
(
QString
::
fromLocal8Bit
(
OPERATIONNAME_COMPLETE
));
ui
->
refuseBtn
->
setProperty
(
"operation"
,
OPERATION_COMPLETE
);
ui
->
detailBtn2
->
setProperty
(
"operation"
,
OPERATION_COMPLETE
);
}
}
else
else
ui
->
printBtn
->
show
();
ui
->
detailBtn1
->
show
();
}
}
void
NewDetailForm
::
_Init
()
void
NewDetailForm
::
_Init
()
...
@@ -201,7 +235,13 @@ void NewDetailForm::_Init()
...
@@ -201,7 +235,13 @@ void NewDetailForm::_Init()
setWindowFlags
(
this
->
windowFlags
()
|
Qt
::
FramelessWindowHint
);
setWindowFlags
(
this
->
windowFlags
()
|
Qt
::
FramelessWindowHint
);
setGeometry
(((
QWidget
*
)
parent
())
->
geometry
());
setGeometry
(((
QWidget
*
)
parent
())
->
geometry
());
int
tableWidth
=
this
->
width
()
/
2
-
65
;
ui
->
dishTableWidget
->
verticalHeader
()
->
setHidden
(
true
);
ui
->
dishTableWidget
->
setShowGrid
(
false
);
ui
->
dishTableWidget
->
setEditTriggers
(
QAbstractItemView
::
NoEditTriggers
);
ui
->
dishTableWidget
->
setSelectionBehavior
(
QAbstractItemView
::
SelectRows
);
ui
->
dishTableWidget
->
horizontalHeaderItem
(
0
)
->
setTextAlignment
(
Qt
::
AlignLeft
);
int
tableWidth
=
this
->
width
()
/
2
-
50
;
ui
->
dishTableWidget
->
setColumnWidth
(
0
,
tableWidth
*
5
/
9
);
ui
->
dishTableWidget
->
setColumnWidth
(
0
,
tableWidth
*
5
/
9
);
ui
->
dishTableWidget
->
setColumnWidth
(
1
,
tableWidth
*
2
/
9
);
ui
->
dishTableWidget
->
setColumnWidth
(
1
,
tableWidth
*
2
/
9
);
ui
->
dishTableWidget
->
setColumnWidth
(
2
,
tableWidth
*
2
/
9
);
ui
->
dishTableWidget
->
setColumnWidth
(
2
,
tableWidth
*
2
/
9
);
...
@@ -211,17 +251,67 @@ void NewDetailForm::_Init()
...
@@ -211,17 +251,67 @@ void NewDetailForm::_Init()
//设置QTableWidget表头样式
//设置QTableWidget表头样式
ui
->
dishTableWidget
->
horizontalHeader
()
->
setStyleSheet
(
"QHeaderView::section{background-color:white;font:11pt '微软雅黑';color: rgb(150,150,150);};"
);
ui
->
dishTableWidget
->
horizontalHeader
()
->
setStyleSheet
(
"QHeaderView::section{background-color:white;font:11pt '微软雅黑';color: rgb(150,150,150);};"
);
int
tableHeight
=
this
->
height
()
/
2
-
65
;
ui
->
sumTableWidget
->
setRowHeight
(
0
,
tableHeight
*
1
/
4
);
ui
->
sumTableWidget
->
setRowHeight
(
1
,
tableHeight
*
1
/
4
);
ui
->
sumTableWidget
->
setRowHeight
(
2
,
tableHeight
*
1
/
4
);
ui
->
sumTableWidget
->
setRowHeight
(
3
,
tableHeight
*
1
/
4
);
ui
->
sumTableWidget
->
verticalHeader
()
->
setFixedHeight
(
25
);
ui
->
sumTableWidget
->
verticalHeader
()
->
setSectionResizeMode
(
QHeaderView
::
Fixed
);
//设置QTableWidget表头样式
ui
->
sumTableWidget
->
verticalHeader
()
->
setStyleSheet
(
"QHeaderView::section{background-color:white;font:11pt '微软雅黑';color: rgb(150,150,150);};"
);
// ui->sumTableWidget->setColumnWidth(0, tableWidth*5/9);
// ui->sumTableWidget->setColumnWidth(1, tableWidth*2/9);
// ui->sumTableWidget->setColumnWidth(2, tableWidth*2/9);
// ui->sumTableWidget->horizontalHeader()->setFixedHeight(25);
// ui->sumTableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed);
// ui->sumTableWidget->setShowGrid(false);
// ui->sumTableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
// ui->sumTableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
// ui->sumTableWidget->horizontalHeader()->setHidden(true);
// ui->sumTableWidget->setColumnCount(2);
// ui->sumTableWidget->setColumnWidth(0, tableWidth*2/9);
// ui->sumTableWidget->setColumnWidth(1, tableWidth*2/9);
// ui->sumTableWidget->setRowHeight(0,40);
// ui->sumTableWidget->setRowHeight(1,40);
// ui->sumTableWidget->setRowHeight(2,40);
// ui->sumTableWidget->setRowHeight(3,40);
// ui->sumTableWidget->verticalHeader()->setFixedWidth(tableWidth*5/9);
// ui->sumTableWidget->verticalHeader()->setFixedHeight(25);
// ui->sumTableWidget->verticalHeader()->setSectionResizeMode(QHeaderView::Fixed);
//设置QTableWidget表头样式
// ui->sumTableWidget->verticalHeader()->setStyleSheet("QHeaderView::section{background-color:white;font:11pt '微软雅黑';color: rgb(150,150,150);};");
//显示商品汇总信息
ui
->
productLb
->
setFixedWidth
(
tableWidth
*
5
/
9
);
ui
->
productLb
->
setAlignment
(
Qt
::
AlignLeft
);
ui
->
product_numLb
->
setFixedWidth
(
tableWidth
*
2
/
9
);
ui
->
product_numLb
->
setAlignment
(
Qt
::
AlignHCenter
);
ui
->
product_price_Lb
->
setFixedWidth
(
tableWidth
*
2
/
9
);
ui
->
product_price_Lb
->
setAlignment
(
Qt
::
AlignHCenter
);
ui
->
packageLb
->
setFixedWidth
(
tableWidth
*
5
/
9
);
ui
->
packageLb
->
setAlignment
(
Qt
::
AlignLeft
);
ui
->
package_num_Lb
->
setFixedWidth
(
tableWidth
*
2
/
9
);
ui
->
package_num_Lb
->
setAlignment
(
Qt
::
AlignHCenter
);
ui
->
package_price_Lb
->
setFixedWidth
(
tableWidth
*
2
/
9
);
ui
->
package_price_Lb
->
setAlignment
(
Qt
::
AlignHCenter
);
ui
->
deliveryLb
->
setFixedWidth
(
tableWidth
*
5
/
9
);
ui
->
deliveryLb
->
setAlignment
(
Qt
::
AlignLeft
);
ui
->
delivery_num_Lb
->
setFixedWidth
(
tableWidth
*
2
/
9
);
ui
->
delivery_num_Lb
->
setAlignment
(
Qt
::
AlignHCenter
);
ui
->
delivery_price_Lb
->
setFixedWidth
(
tableWidth
*
2
/
9
);
ui
->
delivery_price_Lb
->
setAlignment
(
Qt
::
AlignHCenter
);
ui
->
promotionLb
->
setFixedWidth
(
tableWidth
*
5
/
9
);
ui
->
promotionLb
->
setAlignment
(
Qt
::
AlignLeft
);
ui
->
promotion_num_Lb
->
setFixedWidth
(
tableWidth
*
2
/
9
);
ui
->
promotion_num_Lb
->
setAlignment
(
Qt
::
AlignHCenter
);
ui
->
promotion_price_Lb
->
setFixedWidth
(
tableWidth
*
2
/
9
);
ui
->
promotion_price_Lb
->
setAlignment
(
Qt
::
AlignHCenter
);
ui
->
sumLb
->
setFixedWidth
(
tableWidth
*
5
/
9
);
ui
->
sumLb
->
setAlignment
(
Qt
::
AlignLeft
);
ui
->
sumLb_dec_1
->
setFixedWidth
(
tableWidth
*
2
/
9
);
ui
->
sumLb_dec
->
setFixedWidth
(
tableWidth
*
2
/
9
);
ui
->
sumLb_dec
->
setAlignment
(
Qt
::
AlignHCenter
);
}
}
void
NewDetailForm
::
onOperaBtnClicked
()
void
NewDetailForm
::
onOperaBtnClicked
()
...
@@ -404,8 +494,7 @@ bool NewDetailForm::getOtherOrderOptAndName(OrderObject *order, QString &optname
...
@@ -404,8 +494,7 @@ bool NewDetailForm::getOtherOrderOptAndName(OrderObject *order, QString &optname
}
}
}
}
void
NewDetailForm
::
on_detailBtn1_clicked
()
void
NewDetailForm
::
on_printBtn_clicked
()
{
{
QVariantMap
map
;
QVariantMap
map
;
...
@@ -414,3 +503,8 @@ void NewDetailForm::on_printBtn_clicked()
...
@@ -414,3 +503,8 @@ void NewDetailForm::on_printBtn_clicked()
POSTEVENTTYPE
(
PosEvent
::
s_order_location
,
map
,
QVariantMap
);
POSTEVENTTYPE
(
PosEvent
::
s_order_location
,
map
,
QVariantMap
);
}
}
void
NewDetailForm
::
on_detailBtn0_clicked
()
{
}
takeout/view/newdetailform.h
View file @
b23a661a
...
@@ -64,6 +64,16 @@ private slots:
...
@@ -64,6 +64,16 @@ private slots:
* 返回:NULL
* 返回:NULL
* */
* */
void
onOperaBtnClicked
();
void
onOperaBtnClicked
();
/* 功能:处理重新打印按钮点击
* 参数:NULL
* 返回:NULL
* */
void
on_detailBtn1_clicked
();
/* 功能:处理补录按钮点击
* 参数:NULL
* 返回:NULL
* */
void
on_detailBtn0_clicked
();
/* 功能:获取订单操作和操作名称
/* 功能:获取订单操作和操作名称
* 参数:[1]订单[2]操作名称[3]按钮名称
* 参数:[1]订单[2]操作名称[3]按钮名称
...
@@ -76,7 +86,6 @@ private slots:
...
@@ -76,7 +86,6 @@ private slots:
* */
* */
bool
getOtherOrderOptAndName
(
OrderObject
*
order
,
QString
&
optname
,
QString
&
name
);
bool
getOtherOrderOptAndName
(
OrderObject
*
order
,
QString
&
optname
,
QString
&
name
);
void
on_printBtn_clicked
();
};
};
#endif // NEWDETAILFORM_H
#endif // NEWDETAILFORM_H
takeout/view/newdetailform.ui
View file @
b23a661a
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<x>
0
</x>
<x>
0
</x>
<y>
0
</y>
<y>
0
</y>
<width>
800
</width>
<width>
800
</width>
<height>
6
00
</height>
<height>
6
22
</height>
</rect>
</rect>
</property>
</property>
<property
name=
"windowTitle"
>
<property
name=
"windowTitle"
>
...
@@ -45,12 +45,77 @@
...
@@ -45,12 +45,77 @@
font: 11pt
"
微软雅黑
"
;
font: 11pt
"
微软雅黑
"
;
color: rgb(150, 150, 150);
color: rgb(150, 150, 150);
background-color:rgb(250, 249, 249);
}
}
#dishTableWidget,#sumTableWidget
#dishTableWidget,#sumTableWidget
{
{
border-size:0px;
border-size:0px;
}
</string>
font: 11pt
"
微软雅黑
"
;
}
#dishTableWidget QHeaderView::section
{
font: 16px
"
微软雅黑
"
;
color: rgb(150, 150, 150);
border: 0px;
}
#dishTableWidget QHeaderView::down-arrow
{
border:0px;
}
#dishTableWidget QHeaderView::up-arrow
{
border: 0px;
}
#sumTableWidget QHeaderView::section
{
font: 16px
"
微软雅黑
"
;
color: rgb(150, 150, 150);
border: 0px;
background-color: rgb(255, 255, 255);
}
#sumLb, #sumLb_dec, #sumLb_dec_1
{
font: 11pt
"
微软雅黑
"
;
}
#orderInfoLb_dec, #orderMemoLb_dec, #customerInfoLb_dec, #addressLb_dec, #deliveryInfoLb_dec, #promotionInfoLb_dec, #checkInfoLb_dec
{
font: 11pt
"
微软雅黑
"
;
background-color:rgb(250, 249, 249);
}
#detailBtn0, #detailBtn1
{
/*color: rgb(0, 0, 0);
background-color: rgb(255, 255, 255);
font: 9pt
"
微软雅黑
"
;
border-width:2px solid;
border-radius:5px;*/
color: #ffffff;
background-color: #3e4d65;
border-radius: 5px;
}
#closeBtn
{
border-image: url(:detailBtn_close_normal.png);
}
#productLb,#product_numLb,#product_price_Lb,#packageLb,#package_num_Lb,#package_price_Lb,#deliveryLb,#delivery_num_Lb,#delivery_price_Lb,#promotionLb,#promotion_num_Lb,#promotion_price_Lb
{
font: 11pt
"
微软雅黑
"
;
}
#productLb,#packageLb,#deliveryLb,#promotionLb
{
color:rgb(150, 150, 150);
}
</string>
</property>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<property
name=
"spacing"
>
<property
name=
"spacing"
>
...
@@ -120,7 +185,6 @@
...
@@ -120,7 +185,6 @@
<weight>
9
</weight>
<weight>
9
</weight>
<italic>
false
</italic>
<italic>
false
</italic>
<bold>
false
</bold>
<bold>
false
</bold>
<kerning>
true
</kerning>
</font>
</font>
</property>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
...
@@ -184,7 +248,7 @@
...
@@ -184,7 +248,7 @@
</item>
</item>
<item>
<item>
<widget
class=
"QWidget"
name=
"detailForm_bottom"
native=
"true"
>
<widget
class=
"QWidget"
name=
"detailForm_bottom"
native=
"true"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_10"
stretch=
"
1
,1"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_10"
stretch=
"
0
,1"
>
<property
name=
"spacing"
>
<property
name=
"spacing"
>
<number>
0
</number>
<number>
0
</number>
</property>
</property>
...
@@ -216,8 +280,24 @@
...
@@ -216,8 +280,24 @@
<number>
10
</number>
<number>
10
</number>
</property>
</property>
<property
name=
"bottomMargin"
>
<property
name=
"bottomMargin"
>
<number>
10
</number>
<number>
20
</number>
</property>
<item>
<spacer
name=
"verticalSpacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
10
</height>
</size>
</property>
</property>
</spacer>
</item>
<item>
<item>
<widget
class=
"QLabel"
name=
"orderDishLabel"
>
<widget
class=
"QLabel"
name=
"orderDishLabel"
>
<property
name=
"minimumSize"
>
<property
name=
"minimumSize"
>
...
@@ -294,59 +374,141 @@
...
@@ -294,59 +374,141 @@
</widget>
</widget>
</item>
</item>
<item>
<item>
<widget
class=
"QTableWidget"
name=
"sumTableWidget"
>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<property
name=
"sizeIncrement"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"productLb"
>
<property
name=
"minimumSize"
>
<size>
<size>
<width>
0
</width>
<width>
0
</width>
<height>
0
</height>
<height>
4
0
</height>
</size>
</size>
</property>
</property>
<property
name=
"base
Size"
>
<property
name=
"maximum
Size"
>
<size>
<size>
<width>
0
</width>
<width>
16777215
</width>
<height>
0
</height>
<height>
4
0
</height>
</size>
</size>
</property>
</property>
<property
name=
"frameShape
"
>
<property
name=
"text
"
>
<enum>
QFrame::NoFrame
</enum
>
<string>
商品汇总
</string
>
</property>
</property>
<property
name=
"verticalScrollBarPolicy"
>
</widget>
<enum>
Qt::ScrollBarAlwaysOff
</enum>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QLabel"
name=
"product_numLb"
>
<property
name=
"text"
>
<string/>
</property>
</property>
<property
name=
"horizontalScrollBarPolicy"
>
</widget>
<enum>
Qt::ScrollBarAlwaysOff
</enum>
</item>
<item
row=
"0"
column=
"2"
>
<widget
class=
"QLabel"
name=
"product_price_Lb"
>
<property
name=
"text"
>
<string/>
</property>
</property>
<property
name=
"iconSize"
>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"packageLb"
>
<property
name=
"minimumSize"
>
<size>
<size>
<width>
0
</width>
<width>
0
</width>
<height>
0
</height>
<height>
4
0
</height>
</size>
</size>
</property>
</property>
<property
name=
"rowCount"
>
<property
name=
"maximumSize"
>
<number>
4
</number>
<size>
<width>
16777215
</width>
<height>
40
</height>
</size>
</property>
</property>
<row>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
商品总计
</string>
<string>
打包费
</string>
</property>
</property>
</row>
</widget>
<row>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QLabel"
name=
"package_num_Lb"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
打包费
</string>
<string/>
</property>
</widget>
</item>
<item
row=
"1"
column=
"2"
>
<widget
class=
"QLabel"
name=
"package_price_Lb"
>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<widget
class=
"QLabel"
name=
"deliveryLb"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
40
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
16777215
</width>
<height>
40
</height>
</size>
</property>
</property>
</row>
<row>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
配送费
</string>
<string>
配送费
</string>
</property>
</property>
</row>
</widget>
<row>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QLabel"
name=
"delivery_num_Lb"
>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
<item
row=
"2"
column=
"2"
>
<widget
class=
"QLabel"
name=
"delivery_price_Lb"
>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QLabel"
name=
"promotionLb"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
40
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
16777215
</width>
<height>
40
</height>
</size>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
优惠费
</string>
<string>
优惠费
</string>
</property>
</property>
</row>
</widget>
</widget>
</item>
</item>
<item
row=
"3"
column=
"1"
>
<widget
class=
"QLabel"
name=
"promotion_num_Lb"
>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
<item
row=
"3"
column=
"2"
>
<widget
class=
"QLabel"
name=
"promotion_price_Lb"
>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<item>
<widget
class=
"Line"
name=
"line_2"
>
<widget
class=
"Line"
name=
"line_2"
>
<property
name=
"minimumSize"
>
<property
name=
"minimumSize"
>
...
@@ -376,6 +538,22 @@
...
@@ -376,6 +538,22 @@
</widget>
</widget>
</item>
</item>
<item>
<item>
<widget
class=
"QLabel"
name=
"sumLb_dec_1"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
40
</height>
</size>
</property>
<property
name=
"text"
>
<string/>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"sumLb_dec"
>
<widget
class=
"QLabel"
name=
"sumLb_dec"
>
<property
name=
"minimumSize"
>
<property
name=
"minimumSize"
>
<size>
<size>
...
@@ -386,6 +564,9 @@
...
@@ -386,6 +564,9 @@
<property
name=
"text"
>
<property
name=
"text"
>
<string/>
<string/>
</property>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
</widget>
</widget>
</item>
</item>
</layout>
</layout>
...
@@ -396,21 +577,22 @@
...
@@ -396,21 +577,22 @@
<item>
<item>
<widget
class=
"QWidget"
name=
"orderContextWgt"
native=
"true"
>
<widget
class=
"QWidget"
name=
"orderContextWgt"
native=
"true"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_3"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_3"
>
<property
name=
"spacing"
>
<item>
<number>
0
</number>
<spacer
name=
"verticalSpacer"
>
</property>
<property
name=
"orientation"
>
<property
name=
"leftMargin"
>
<enum>
Qt::Vertical
</enum>
<number>
20
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
</property>
<property
name=
"rightMargin
"
>
<property
name=
"sizeType
"
>
<number>
20
</number
>
<enum>
QSizePolicy::Fixed
</enum
>
</property>
</property>
<property
name=
"bottomMargin"
>
<property
name=
"sizeHint"
stdset=
"0"
>
<number>
10
</number>
<size>
<width>
20
</width>
<height>
10
</height>
</size>
</property>
</property>
</spacer>
</item>
<item>
<item>
<widget
class=
"QLabel"
name=
"orderContextLabel"
>
<widget
class=
"QLabel"
name=
"orderContextLabel"
>
<property
name=
"minimumSize"
>
<property
name=
"minimumSize"
>
...
@@ -459,10 +641,16 @@
...
@@ -459,10 +641,16 @@
</item>
</item>
<item>
<item>
<widget
class=
"QLabel"
name=
"orderInfoLb_dec"
>
<widget
class=
"QLabel"
name=
"orderInfoLb_dec"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
40
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<property
name=
"maximumSize"
>
<size>
<size>
<width>
16777215
</width>
<width>
16777215
</width>
<height>
40
</height>
<height>
16777215
</height>
</size>
</size>
</property>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
...
@@ -498,10 +686,16 @@
...
@@ -498,10 +686,16 @@
</item>
</item>
<item>
<item>
<widget
class=
"QLabel"
name=
"orderMemoLb_dec"
>
<widget
class=
"QLabel"
name=
"orderMemoLb_dec"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
40
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<property
name=
"maximumSize"
>
<size>
<size>
<width>
16777215
</width>
<width>
16777215
</width>
<height>
40
</height>
<height>
16777215
</height>
</size>
</size>
</property>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
...
@@ -537,10 +731,16 @@
...
@@ -537,10 +731,16 @@
</item>
</item>
<item>
<item>
<widget
class=
"QLabel"
name=
"customerInfoLb_dec"
>
<widget
class=
"QLabel"
name=
"customerInfoLb_dec"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
40
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<property
name=
"maximumSize"
>
<size>
<size>
<width>
16777215
</width>
<width>
16777215
</width>
<height>
40
</height>
<height>
16777215
</height>
</size>
</size>
</property>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
...
@@ -576,10 +776,16 @@
...
@@ -576,10 +776,16 @@
</item>
</item>
<item>
<item>
<widget
class=
"QLabel"
name=
"addressLb_dec"
>
<widget
class=
"QLabel"
name=
"addressLb_dec"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
40
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<property
name=
"maximumSize"
>
<size>
<size>
<width>
16777215
</width>
<width>
16777215
</width>
<height>
40
</height>
<height>
16777215
</height>
</size>
</size>
</property>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
...
@@ -615,10 +821,16 @@
...
@@ -615,10 +821,16 @@
</item>
</item>
<item>
<item>
<widget
class=
"QLabel"
name=
"deliveryInfoLb_dec"
>
<widget
class=
"QLabel"
name=
"deliveryInfoLb_dec"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
40
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<property
name=
"maximumSize"
>
<size>
<size>
<width>
16777215
</width>
<width>
16777215
</width>
<height>
40
</height>
<height>
16777215
</height>
</size>
</size>
</property>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
...
@@ -654,10 +866,16 @@
...
@@ -654,10 +866,16 @@
</item>
</item>
<item>
<item>
<widget
class=
"QLabel"
name=
"promotionInfoLb_dec"
>
<widget
class=
"QLabel"
name=
"promotionInfoLb_dec"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
40
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<property
name=
"maximumSize"
>
<size>
<size>
<width>
16777215
</width>
<width>
16777215
</width>
<height>
40
</height>
<height>
16777215
</height>
</size>
</size>
</property>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
...
@@ -693,10 +911,16 @@
...
@@ -693,10 +911,16 @@
</item>
</item>
<item>
<item>
<widget
class=
"QLabel"
name=
"checkInfoLb_dec"
>
<widget
class=
"QLabel"
name=
"checkInfoLb_dec"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
40
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<property
name=
"maximumSize"
>
<size>
<size>
<width>
16777215
</width>
<width>
16777215
</width>
<height>
40
</height>
<height>
16777215
</height>
</size>
</size>
</property>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
...
@@ -707,27 +931,40 @@
...
@@ -707,27 +931,40 @@
</layout>
</layout>
</item>
</item>
<item>
<item>
<spacer
name=
"verticalSpacer_3"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
45
</height>
</size>
</property>
</spacer>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_9"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_9"
>
<property
name=
"spacing"
>
<property
name=
"spacing"
>
<number>
30
</number>
<number>
30
</number>
</property>
</property>
<property
name=
"leftMargin"
>
<property
name=
"leftMargin"
>
<number>
2
5
</number>
<number>
2
0
</number>
</property>
</property>
<property
name=
"topMargin"
>
<property
name=
"topMargin"
>
<number>
40
</number>
<number>
40
</number>
</property>
</property>
<property
name=
"rightMargin"
>
<property
name=
"rightMargin"
>
<number>
2
5
</number>
<number>
2
0
</number>
</property>
</property>
<property
name=
"bottomMargin"
>
<property
name=
"bottomMargin"
>
<number>
40
</number>
<number>
40
</number>
</property>
</property>
<item>
<item>
<widget
class=
"QPushButton"
name=
"
refuseBtn
"
>
<widget
class=
"QPushButton"
name=
"
detailBtn0
"
>
<property
name=
"minimumSize"
>
<property
name=
"minimumSize"
>
<size>
<size>
<width>
0
</width>
<width>
6
0
</width>
<height>
40
</height>
<height>
40
</height>
</size>
</size>
</property>
</property>
...
@@ -738,15 +975,15 @@
...
@@ -738,15 +975,15 @@
</size>
</size>
</property>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
PushButton
</string>
<string>
重新录单
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item>
<item>
<widget
class=
"QPushButton"
name=
"
confirmBtn
"
>
<widget
class=
"QPushButton"
name=
"
detailBtn1
"
>
<property
name=
"minimumSize"
>
<property
name=
"minimumSize"
>
<size>
<size>
<width>
0
</width>
<width>
6
0
</width>
<height>
40
</height>
<height>
40
</height>
</size>
</size>
</property>
</property>
...
@@ -757,15 +994,15 @@
...
@@ -757,15 +994,15 @@
</size>
</size>
</property>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
制作
</string>
<string>
重新打印
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item>
<item>
<widget
class=
"QPushButton"
name=
"
reverseBtn
"
>
<widget
class=
"QPushButton"
name=
"
detailBtn2
"
>
<property
name=
"minimumSize"
>
<property
name=
"minimumSize"
>
<size>
<size>
<width>
0
</width>
<width>
6
0
</width>
<height>
40
</height>
<height>
40
</height>
</size>
</size>
</property>
</property>
...
@@ -776,15 +1013,15 @@
...
@@ -776,15 +1013,15 @@
</size>
</size>
</property>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
<string
>
PushButton
</string
>
<string
/
>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item>
<item>
<widget
class=
"QPushButton"
name=
"
printBtn
"
>
<widget
class=
"QPushButton"
name=
"
detailBtn3
"
>
<property
name=
"minimumSize"
>
<property
name=
"minimumSize"
>
<size>
<size>
<width>
0
</width>
<width>
6
0
</width>
<height>
40
</height>
<height>
40
</height>
</size>
</size>
</property>
</property>
...
@@ -795,7 +1032,7 @@
...
@@ -795,7 +1032,7 @@
</size>
</size>
</property>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
<string
>
打印
</string
>
<string
/
>
</property>
</property>
</widget>
</widget>
</item>
</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