Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
supplier
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
王宇航
supplier
Commits
4cd86929
Commit
4cd86929
authored
Jun 04, 2020
by
Wyh
Committed by
宁斌
Jun 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
6.04 物流單不顯示結賬按鈕,打印格式修改
parent
4155fd28
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
204 additions
and
246 deletions
+204
-246
main-module/src/main/res/layout/activity_new_main.xml
+1
-1
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/util/OtherOrderUtils.kt
+4
-0
other_order_mode/src/main/res/layout/activity_other_order.xml
+2
-2
other_order_mode/src/main/res/layout/layout_other_order_item.xml
+1
-0
print-module/src/main/java/com/joe/print/mvp/print/PrintOtherOrder.java
+39
-13
print-module/src/main/res/layout/print_confirm_order_view.xml
+120
-203
print-module/src/main/res/layout/print_item_bill.xml
+3
-3
print-module/src/main/res/layout/print_other_order_food.xml
+29
-19
print-module/src/main/res/layout/print_other_order_food_item.xml
+3
-3
print-module/src/main/res/values/styles.xml
+2
-2
No files found.
main-module/src/main/res/layout/activity_new_main.xml
View file @
4cd86929
...
...
@@ -23,7 +23,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_15"
android:text=
"
个
人中心"
android:text=
"
個
人中心"
android:textColor=
"@color/white"
android:textSize=
"@dimen/dp_17"
/>
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/util/OtherOrderUtils.kt
View file @
4cd86929
...
...
@@ -61,6 +61,10 @@ object OtherOrderUtils {
orderStatus
=
"待取餐"
tvStatus
.
setTextColor
(
context
.
resources
.
getColor
(
R
.
color
.
order_state3_color
))
}
else
{
if
(
orderData
.
isDelete
==
0
){
//如果是第三方物流,不顯示結賬按鈕
btnContent
=
""
}
orderStatus
=
"派送中"
tvStatus
.
setTextColor
(
context
.
resources
.
getColor
(
R
.
color
.
order_state2_color
))
}
...
...
other_order_mode/src/main/res/layout/activity_other_order.xml
View file @
4cd86929
...
...
@@ -272,7 +272,7 @@
style=
"@style/otherOrderInfoDialogTextStyle_font_style_twelve"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"外
賣
"
android:text=
"外
送
"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@id/line_today_order_info"
app:layout_constraintTop_toTopOf=
"@id/line_today_order_info"
/>
...
...
@@ -361,7 +361,7 @@
style=
"@style/otherOrderInfoDialogTextStyle_font_style_twelve"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"外
賣
"
android:text=
"外
送
"
app:layout_constraintHorizontal_chainStyle=
"packed"
app:layout_constraintLeft_toRightOf=
"@id/line_today_info"
app:layout_constraintRight_toLeftOf=
"@id/line_today_amount_info"
...
...
other_order_mode/src/main/res/layout/layout_other_order_item.xml
View file @
4cd86929
...
...
@@ -236,6 +236,7 @@
android:text=
"@{@string/amount_unit + data.pAY_AMOUNT}"
android:textColor=
"@color/red_600"
android:textSize=
"@dimen/sp_16"
app:layout_constraintTop_toBottomOf=
"@id/tv_delivery_state"
app:layout_constraintRight_toRightOf=
"@id/tv_order_time"
app:layout_constraintTop_toTopOf=
"@id/tv_address_text"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
...
...
print-module/src/main/java/com/joe/print/mvp/print/PrintOtherOrder.java
View file @
4cd86929
...
...
@@ -153,7 +153,7 @@ public class PrintOtherOrder extends PrinterRoot {
RecyclerView
rvFood
=
view
.
findViewById
(
R
.
id
.
rv_order_food
);
TextView
tvTakeCode
=
view
.
findViewById
(
R
.
id
.
tv_order_take_code
);
if
(
dataBean
.
getOrder_type
()
==
2
)
{
tvOrderType
.
setText
(
"外
賣
"
);
tvOrderType
.
setText
(
"外
送
"
);
}
else
{
tvOrderType
.
setText
(
"自取"
);
}
...
...
@@ -173,22 +173,24 @@ public class PrintOtherOrder extends PrinterRoot {
//創建時間
tvCreateTime
.
setText
(
TimeUtils
.
parseTimeRepeat
(
dataBean
.
getCREATE_TIME
(),
TimeUtils
.
DEFAULT_DATE_FORMAT
));
//訂單號
tvOrderNum
.
setText
(
"
訂
單號:"
+
dataBean
.
getORDER_NO
());
tvOrderNum
.
setText
(
"單號:"
+
dataBean
.
getORDER_NO
());
rvFood
.
setLayoutManager
(
new
LinearLayoutManager
(
context
));
rvFood
.
setAdapter
(
new
OtherOrderAdapter
(
context
,
orderDetail
,
false
));
return
viewToBitmap
(
context
,
view
);
}
private
Bitmap
initPrintView
(
Context
context
,
OrderDetails
.
DataBean
data
)
{
View
view
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
print_confirm_order_view
,
null
,
false
);
//品牌名
setText
(
view
,
R
.
id
.
tv_brand_name
,
GsaCloudApplication
.
getBrandName
(
context
));
//餐廳名
setText
(
view
,
R
.
id
.
tv_restaurant_name
,
GsaCloudApplication
.
getRestaurantName
(
context
));
// 訂單類型
setText
(
view
,
R
.
id
.
tv_order_type
,
data
.
getOrder_type
()
==
2
?
"外送"
:
"自取"
);
// 訂單號
setText
(
view
,
R
.
id
.
tv_order_number
,
"
訂
單號:"
+
data
.
getORDER_NO
());
setText
(
view
,
R
.
id
.
tv_order_number
,
"單號:"
+
data
.
getORDER_NO
());
if
(
data
.
getTakeFoodCode
()
!=
null
&&
!
data
.
getTakeFoodCode
().
equals
(
"0"
))
{
setText
(
view
,
R
.
id
.
tv_order_take_food_code
,
"#"
+
data
.
getTakeFoodCode
());
}
else
{
...
...
@@ -200,7 +202,7 @@ public class PrintOtherOrder extends PrinterRoot {
RecyclerView
rvBill
=
view
.
findViewById
(
R
.
id
.
rv_bill
);
List
<
PrintBillBean
>
billData
=
new
ArrayList
<>();
billData
.
add
(
getBillBean
(
"合計:"
,
amountUnit
+
MoneyUtil
.
sub
(
MoneyUtil
.
sub
(
Double
.
parseDouble
(
Objects
.
requireNonNull
(
data
.
getTOTAL_AMOUNT
())),
data
.
getLunchbox
()),
data
.
getDELIVERY_CHARGE
())));
//
billData.add(getBillBean("合計:", amountUnit + MoneyUtil.sub(MoneyUtil.sub(Double.parseDouble(Objects.requireNonNull(data.getTOTAL_AMOUNT())), data.getLunchbox()), data.getDELIVERY_CHARGE())));
if
(
data
.
getLunchbox
()
!=
0
)
{
billData
.
add
(
getBillBean
(
"餐盒費:"
,
amountUnit
+
data
.
getLunchbox
()));
}
...
...
@@ -216,14 +218,14 @@ public class PrintOtherOrder extends PrinterRoot {
}
}
billData
.
add
(
getBillBean
(
"總金額:"
,
amountUnit
+
MoneyUtil
.
sub
(
Double
.
parseDouble
(
data
.
getTOTAL_AMOUNT
()),
data
.
getDiscount_amount
())));
billData
.
add
(
getBillBean
(
"支付金額:"
,
amountUnit
+
MoneyUtil
.
sub
(
Double
.
parseDouble
(
data
.
getTOTAL_AMOUNT
()),
data
.
getDiscount_amount
())));
//
billData.add(getBillBean("支付金額:", amountUnit + MoneyUtil.sub(Double.parseDouble(data.getTOTAL_AMOUNT()), data.getDiscount_amount())));
BillItemAdapter
adapter
=
new
BillItemAdapter
(
billData
,
context
);
rvBill
.
setLayoutManager
(
new
LinearLayoutManager
(
context
));
rvBill
.
setAdapter
(
adapter
);
//
總金額
//
setText(view, R.id.tv_total, amountUnit + MoneyUtil.sub(MoneyUtil.sub(Double.parseDouble(Objects.requireNonNull(data.getTOTAL_AMOUNT())), data.getLunchbox()), data.getDELIVERY_CHARGE()));
//
合計
setText
(
view
,
R
.
id
.
tv_total
,
amountUnit
+
MoneyUtil
.
sub
(
MoneyUtil
.
sub
(
Double
.
parseDouble
(
Objects
.
requireNonNull
(
data
.
getTOTAL_AMOUNT
())),
data
.
getLunchbox
()),
data
.
getDELIVERY_CHARGE
()));
//餐盒費
// setAmount(data.getLunchbox(), view.findViewById(R.id.tv_lunchbox_cost_text), view.findViewById(R.id.tv_lunchbox_cost), amountUnit);
//配送費
...
...
@@ -233,11 +235,30 @@ public class PrintOtherOrder extends PrinterRoot {
//總金額
// setText(view, R.id.tv_total_amount, amountUnit + MoneyUtil.sub(Double.parseDouble(data.getTOTAL_AMOUNT()), data.getDiscount_amount()));
//支付金額
// setText(view, R.id.tv_pay_amount,
amountUnit + MoneyUtil.sub(Double.parseDouble(data.getTOTAL_AMOUNT()), data.getDiscount_amount()));
setText
(
view
,
R
.
id
.
tv_pay_amount_text
,
"支付金額:"
+
amountUnit
+
MoneyUtil
.
sub
(
Double
.
parseDouble
(
data
.
getTOTAL_AMOUNT
()),
data
.
getDiscount_amount
()));
//支付類型:貨到付款,在線支付
setText
(
view
,
R
.
id
.
tv_pay_type
,
data
.
getOrderPayType
()
==
1
?
"貨到付款"
:
"在線支付"
);
String
payType
=
""
;
if
(
data
.
getPayType
()
==
1
)
{
payType
=
":积分支付"
;
}
else
if
(
data
.
getPayType
()
==
2
)
{
payType
=
":支付宝"
;
}
else
if
(
data
.
getPayType
()
==
3
)
{
payType
=
":财付通"
;
}
else
if
(
data
.
getPayType
()
==
4
)
{
payType
=
":微信支付"
;
}
else
if
(
data
.
getPayType
()
==
5
)
{
payType
=
":货到付款"
;
}
else
if
(
data
.
getPayType
()
==
6
)
{
payType
=
":其他支付"
;
}
if
(
data
.
getOrderPayType
()
==
1
)
{
//貨到付款
setText
(
view
,
R
.
id
.
tv_pay_type
,
"貨到付款"
);
}
else
{
setText
(
view
,
R
.
id
.
tv_pay_type
,
"在線支付"
+
payType
);
}
//收貨時間
setText
(
view
,
R
.
id
.
tv_delivery_time
,
data
.
getOrder_type
()
==
2
?
data
.
get
TakeTime
()
:
data
.
getSEND_TIME
());
setText
(
view
,
R
.
id
.
tv_delivery_time
,
data
.
getOrder_type
()
==
2
?
data
.
get
SEND_TIME
()
:
data
.
getTakeTime
());
//收貨地址
setText
(
view
,
R
.
id
.
tv_address
,
context
.
getString
(
R
.
string
.
address
)
+
data
.
getAddressDetail
());
//收貨人
...
...
@@ -245,7 +266,12 @@ public class PrintOtherOrder extends PrinterRoot {
//手機號
setText
(
view
,
R
.
id
.
tv_phone
,
"手機號:"
+
data
.
getPHONE
());
//備註
setText
(
view
,
R
.
id
.
tv_remark
,
"備註:"
+
data
.
getRemark
());
if
(
data
.
getRemark
()
!=
null
&&
!
data
.
getRemark
().
isEmpty
())
{
setText
(
view
,
R
.
id
.
tv_remark
,
"備註:"
+
data
.
getRemark
());
view
.
findViewById
(
R
.
id
.
tv_remark
).
setVisibility
(
View
.
VISIBLE
);
}
else
{
view
.
findViewById
(
R
.
id
.
tv_remark
).
setVisibility
(
View
.
GONE
);
}
if
(
data
.
getPRODUCT_NAME
()
!=
null
)
{
RecyclerView
rvFoodList
=
view
.
findViewById
(
R
.
id
.
rv_order_print_food
);
...
...
print-module/src/main/res/layout/print_confirm_order_view.xml
View file @
4cd86929
...
...
@@ -5,49 +5,62 @@
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<androidx.constraintlayout.widget.ConstraintLayout
<TextView
android:id=
"@+id/tv_brand_name"
style=
"@style/print_other_order_twenty_two_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"@dimen/dp_20"
android:text=
"品牌名"
/>
<TextView
android:id=
"@+id/tv_restaurant_name"
style=
"@style/print_other_order_twenty_two_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"@dimen/dp_5"
android:text=
"餐廳名"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_10"
>
<TextView
android:layout_width=
"0dp"
android:id=
"@+id/tv_order_type"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:
maxLines=
"1
"
android:text=
"@string/print_split_line"
android:
layout_centerHorizontal=
"true
"
android:text=
'外送'
android:textColor=
"@color/theme_333_color"
app:layout_constraintBottom_toBottomOf=
"@id/tv_order_type"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@id/tv_order_type"
app:layout_constraintTop_toTopOf=
"@id/tv_order_type"
/>
android:textSize=
"@dimen/dp_20"
/>
<TextView
android:id=
"@+id/tv_order_typ
e"
style=
"@style/print_other_order_twenty_two_styl
e"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
'外賣'
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_30"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
android:layout_toLeftOf=
"@id/tv_order_type"
android:maxLines=
"1"
android:text=
"@string/print_split_line"
/>
<TextView
android:layout_width=
"0dp"
style=
"@style/print_other_order_twenty_two_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_toRightOf=
"@id/tv_order_type"
android:maxLines=
"1"
android:text=
"@string/print_split_line"
android:textColor=
"@color/theme_333_color"
app:layout_constraintBottom_toBottomOf=
"@id/tv_order_type"
app:layout_constraintLeft_toRightOf=
"@id/tv_order_type"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/tv_order_type"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
android:text=
"@string/print_split_line"
/>
</RelativeLayout>
<TextView
android:id=
"@+id/tv_pay_type"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"@dimen/dp_5"
android:text=
"在線支付:"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_26"
...
...
@@ -64,11 +77,11 @@
android:textStyle=
"bold"
/>
<TextView
style=
"@style/print_other_order_twenty_two_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:maxLines=
"1"
android:text=
"@string/print_split_line"
android:textColor=
"@color/theme_333_color"
/>
android:text=
"@string/print_split_line"
/>
<LinearLayout
android:layout_width=
"match_parent"
...
...
@@ -77,10 +90,10 @@
<TextView
android:id=
"@+id/tv_order_number"
style=
"@style/print
OtherOrderTextStyle_font_style_twenty
"
style=
"@style/print
_other_order_twenty_two_style
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
'
訂
單號:'
/>
android:text=
'單號:'
/>
<TextView
android:id=
"@+id/tv_order_take_food_code"
...
...
@@ -94,209 +107,123 @@
<TextView
android:id=
"@+id/tv_order_create"
style=
"@style/print
OtherOrderTextStyle_font_style_twenty
"
style=
"@style/print
_other_order_twenty_two_style
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
'開單時間'
/>
<TextView
android:id=
"@+id/tv_remark"
style=
"@style/print
OtherOrderTextStyle_font_style_twenty
"
style=
"@style/print
_other_order_twenty_two_style
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:
text=
"備註:
"
android:
layout_marginTop=
"@dimen/dp_5
"
android:textSize=
"@dimen/dp_26"
android:textStyle=
"bold"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:maxLines=
"1"
android:text=
"@string/print_split_line"
android:textColor=
"@color/theme_333_color"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_order_print_food"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:maxLines=
"1"
android:text=
"@string/print_split_line"
android:textColor=
"@color/theme_333_color"
/>
<androidx.constraintlayout.widget.ConstraintLayout
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<!-- <androidx.constraintlayout.widget.Barrier-->
<!-- android:id="@+id/barrier"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="vertical"-->
<!-- app:barrierDirection="left"-->
<!-- app:constraint_referenced_ids="tv_pay_amount,tv_total_amount,tv_total,tv_lunchbox_cost,tv_delivery_fee,tv_discount" />-->
<TextView
android:id=
"@+id/tv_
total_text
"
style=
"@style/print
OtherOrderInfoPrintBoldTextS
tyle"
android:id=
"@+id/tv_
application
"
style=
"@style/print
_other_order_twenty_two_s
tyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_10"
android:text=
"合計:"
android:visibility=
"gone"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
android:layout_centerHorizontal=
"true"
android:text=
"項目"
/>
<TextView
android:id=
"@+id/tv_total"
style=
"@style/printOtherOrderInfoPrintBoldTextStyle"
style=
"@style/print_other_order_twenty_two_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/tv_total_text"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_bill"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_lunchbox_cost_text"
style=
"@style/printOtherOrderInfoPrintBoldTextStyle"
android:layout_width=
"wrap_content"
android:visibility=
"gone"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_10"
android:text=
"餐盒費:"
android:textStyle=
"normal"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_total"
/>
android:layout_toLeftOf=
"@id/tv_application"
android:maxLines=
"1"
android:text=
"@string/print_split_line"
/>
<TextView
android:id=
"@+id/tv_lunchbox_cost"
style=
"@style/printOtherOrderInfoPrintBoldTextStyle"
style=
"@style/print_other_order_twenty_two_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:
visibility=
"gone
"
a
pp:layout_constraintRight_toRightOf=
"parent
"
a
pp:layout_constraintTop_toTopOf=
"@id/tv_lunchbox_cost_text
"
/>
android:
layout_toRightOf=
"@id/tv_application
"
a
ndroid:maxLines=
"1
"
a
ndroid:text=
"@string/print_split_line
"
/>
</RelativeLayout>
<TextView
android:id=
"@+id/tv_delivery_fee_text"
style=
"@style/printOtherOrderInfoPrintBoldTextStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_10"
android:text=
"送貨費:"
android:visibility=
"gone"
android:textStyle=
"normal"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_lunchbox_cost"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_order_print_food"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<TextView
android:id=
"@+id/tv_delivery_fee"
style=
"@style/printOtherOrderInfoPrintBoldTextStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/tv_delivery_fee_text"
/>
<TextView
style=
"@style/print_other_order_twenty_two_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:maxLines=
"1"
android:text=
"@string/print_split_line"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:id=
"@+id/tv_
discount
_text"
android:id=
"@+id/tv_
total
_text"
style=
"@style/printOtherOrderInfoPrintBoldTextStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_10"
android:visibility=
"gone"
android:text=
"折扣:"
android:textStyle=
"normal"
android:text=
"合計:"
android:textSize=
"@dimen/dp_26"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_delivery_fee"
/>
<TextView
android:id=
"@+id/tv_discount"
style=
"@style/printOtherOrderInfoPrintBoldTextStyle"
android:layout_width=
"wrap_content"
android:visibility=
"gone"
android:layout_height=
"wrap_content"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/tv_discount_text"
/>
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_total
_amount_text
"
android:id=
"@+id/tv_total"
style=
"@style/printOtherOrderInfoPrintBoldTextStyle"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
0dp
"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_10"
android:
text=
"總金額:
"
android:
visibility=
"gone
"
android:textS
tyle=
"normal
"
android:
layout_weight=
"1
"
android:
gravity=
"right
"
android:textS
ize=
"@dimen/dp_26
"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_discount"
/>
<TextView
android:id=
"@+id/tv_total_amount"
style=
"@style/printOtherOrderInfoPrintBoldTextStyle"
android:layout_width=
"wrap_content"
android:visibility=
"gone"
android:layout_height=
"wrap_content"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/tv_total_amount_text"
/>
app:layout_constraintTop_toTopOf=
"parent"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_amount_line"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:maxLines=
"1"
android:text=
"@string/print_split_line"
android:textColor=
"@color/theme_333_color"
app:layout_constraintTop_toBottomOf=
"@id/rv_bill"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_bill"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
app:layout_constraintTop_toBottomOf=
"@id/tv_total_text"
/>
<TextView
android:id=
"@+id/tv_pay_amount_text"
style=
"@style/printOtherOrderInfoPrintBoldTextStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
android:text=
"支付金額:"
android:textSize=
"@dimen/dp_26"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_amount_line"
/>
<TextView
style=
"@style/print_other_order_twenty_two_style"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:maxLines=
"1"
android:text=
"@string/print_split_line"
/>
<TextView
android:id=
"@+id/tv_pay_amount"
style=
"@style/printOtherOrderInfoPrintBoldTextStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
""
android:visibility=
"gone"
android:textSize=
"@dimen/dp_26"
android:textStyle=
"bold"
app:layout_constraintLeft_toRightOf=
"@id/tv_pay_amount_text"
app:layout_constraintTop_toTopOf=
"@id/tv_pay_amount_text"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id=
"@+id/tv_pay_amount_text"
style=
"@style/printOtherOrderInfoPrintBoldTextStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"支付金額:"
android:textSize=
"@dimen/dp_26"
/>
<TextView
style=
"@style/print_other_order_twenty_two_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:maxLines=
"1"
android:visibility=
"gone"
android:text=
"@string/print_split_line"
android:textColor=
"@color/theme_333_color"
/>
android:text=
"@string/print_split_line"
/>
<TextView
android:id=
"@+id/tv_address"
style=
"@style/print
OtherOrderTextStyle_font_style_twenty
"
style=
"@style/print
_other_order_twenty_two_style
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"地址:"
...
...
@@ -304,7 +231,7 @@
<TextView
android:id=
"@+id/tv_receiver"
style=
"@style/print
OtherOrderTextStyle_font_style_twenty
"
style=
"@style/print
_other_order_twenty_two_style
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
...
...
@@ -312,7 +239,7 @@
<TextView
android:id=
"@+id/tv_phone"
style=
"@style/print
OtherOrderTextStyle_font_style_twenty
"
style=
"@style/print
_other_order_twenty_two_style
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
...
...
@@ -326,51 +253,41 @@
android:textColor=
"@color/theme_333_color"
/>
<TextView
style=
"@style/print
OtherOrderTextStyle_font_style_twenty
"
style=
"@style/print
_other_order_twenty_two_style
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"親愛的顧客,祝您用餐愉快,如您遇到任何問題請撥打8200 2022聯繫我們,期待您的下次光臨。"
android:visibility=
"gone"
/>
<
androidx.constraintlayout.widget.Constraint
Layout
<
Relative
Layout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_10"
>
<TextView
android:id=
"@+id/tv_bottom_time_left_line"
android:id=
"@+id/tv_bottom_time"
style=
"@style/print_other_order_twenty_two_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:maxLines=
"1"
android:text=
"@string/print_split_line"
android:textColor=
"@color/theme_333_color"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@id/tv_bottom_time"
app:layout_constraintTop_toTopOf=
"parent"
/>
android:layout_centerHorizontal=
"true"
android:text=
"2020-04-25 12:00:36 GS Support pos1"
/>
<TextView
android:id=
"@+id/tv_bottom_time"
style=
"@style/printOtherOrderTextStyle_font_style_twenty"
style=
"@style/print_other_order_twenty_two_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"2020-04-25 12:00:36 GS Support pos1"
app:layout_constraintLeft_toRightOf=
"@id/tv_bottom_time_left_line"
app:layout_constraintRight_toLeftOf=
"@id/tv_bottom_time_right_line"
/>
android:layout_toLeftOf=
"@id/tv_bottom_time"
android:maxLines=
"1"
android:text=
"@string/print_split_line"
/>
<TextView
android:id=
"@+id/tv_bottom_time_right_line"
style=
"@style/print_other_order_twenty_two_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_toRightOf=
"@id/tv_bottom_time"
android:maxLines=
"1"
android:text=
"@string/print_split_line"
android:textColor=
"@color/theme_333_color"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toRightOf=
"@id/tv_bottom_time"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
android:text=
"@string/print_split_line"
/>
</RelativeLayout>
</LinearLayout>
print-module/src/main/res/layout/print_item_bill.xml
View file @
4cd86929
...
...
@@ -6,14 +6,14 @@
<TextView
android:id=
"@+id/print_bill_name"
style=
"@style/print
OtherOrderInfoPrintBoldTextS
tyle"
style=
"@style/print
_other_order_twenty_two_s
tyle"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
/>
android:layout_weight=
"1"
/>
<TextView
android:id=
"@+id/print_bill_value"
style=
"@style/print
OtherOrderInfoPrintBoldTextS
tyle"
style=
"@style/print
_other_order_twenty_two_s
tyle"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_5"
...
...
print-module/src/main/res/layout/print_other_order_food.xml
View file @
4cd86929
...
...
@@ -5,45 +5,64 @@
android:orientation=
"vertical"
>
<!-- 接單的廚房單-->
<TextView
android:id=
"@+id/tv_order_type"
android:layout_width=
"wrap_content"
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"外賣"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_26"
/>
android:gravity=
"center_vertical"
>
<TextView
android:id=
"@+id/tv_order_type"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_26"
/>
<TextView
android:id=
"@+id/tv_order_number"
style=
"@style/print_other_order_twenty_two_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_15"
android:text=
"單號:"
android:textColor=
"@color/theme_333_color"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_order_create_time"
style=
"@style/print_other_order_
eighteen
_style"
style=
"@style/print_other_order_
twenty_two
_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:text=
"廚房時間:"
/>
<TextView
android:id=
"@+id/tv_order_take_code"
style=
"@style/print_other_order_
eighteen
_style"
style=
"@style/print_other_order_
twenty_two
_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:text=
"取餐碼:"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_operator_name"
style=
"@style/print_other_order_
eighteen
_style"
style=
"@style/print_other_order_
twenty_two
_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:text=
"操作"
/>
<TextView
android:id=
"@+id/tv_order_send_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:text=
"送貨時間:"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_22"
/>
<TextView
style=
"@style/print_other_order_twenty_two_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:maxLines=
"1"
...
...
@@ -55,18 +74,10 @@
android:layout_height=
"wrap_content"
/>
<TextView
style=
"@style/print_other_order_twenty_two_style"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:maxLines=
"1"
android:text=
"@string/print_split_line"
/>
<TextView
android:id=
"@+id/tv_order_number"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"訂單號:"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_18"
/>
</LinearLayout>
\ No newline at end of file
print-module/src/main/res/layout/print_other_order_food_item.xml
View file @
4cd86929
...
...
@@ -11,7 +11,7 @@
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
app:layout_constraintHorizontal_weight=
"0.
7
"
app:layout_constraintHorizontal_weight=
"0.
6
"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@id/tv_food_number"
app:layout_constraintTop_toTopOf=
"parent"
>
...
...
@@ -31,7 +31,7 @@
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_2
0
"
android:textSize=
"@dimen/dp_2
2
"
app:layout_constraintLeft_toRightOf=
"@id/iv_food_item_next"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
...
...
@@ -43,7 +43,7 @@
android:layout_height=
"wrap_content"
android:gravity=
"right"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_2
0
"
android:textSize=
"@dimen/dp_2
2
"
app:layout_constraintHorizontal_weight=
"0.2"
app:layout_constraintLeft_toRightOf=
"@id/layout_food_name"
app:layout_constraintRight_toLeftOf=
"@id/tv_food_price"
...
...
print-module/src/main/res/values/styles.xml
View file @
4cd86929
...
...
@@ -23,9 +23,9 @@
<item
name=
"android:textColor"
>
@color/theme_333_color
</item>
<item
name=
"android:textSize"
>
@dimen/dp_18
</item>
</style>
<style
name=
"printOtherOrderTextStyle_font_style_twenty"
parent=
"font_style_twenty"
>
<style
name=
"print_other_order_twenty_two_style"
>
<item
name=
"android:textColor"
>
@color/theme_333_color
</item>
<item
name=
"android:textSize"
>
@dimen/dp_22
</item>
</style>
<style
name=
"printOtherOrderInfoPrintBoldTextStyle"
>
...
...
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